Coverage Report - org.kuali.rice.kew.rule.xmlrouting.WorkflowNamespaceContext
 
Classes in this File Line Coverage Branch Coverage Complexity
WorkflowNamespaceContext
0%
0/12
0%
0/8
3.667
 
 1  
 /**
 2  
  * Copyright 2005-2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.kew.rule.xmlrouting;
 17  
 
 18  
 import java.util.Iterator;
 19  
 
 20  
 import javax.xml.namespace.NamespaceContext;
 21  
 
 22  
 /**
 23  
  * An XML NamespaceContext for KEW.
 24  
  *
 25  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 26  
  */
 27  0
 public class WorkflowNamespaceContext implements NamespaceContext {
 28  
         public String getNamespaceURI(String prefix) {
 29  0
                 if (prefix == null) {
 30  0
                         throw new IllegalArgumentException("The prefix cannot be null.");
 31  
                 }
 32  
 
 33  0
                 if (prefix.equals("wf")) {
 34  0
                         return "http://nothingfornowwf.com";
 35  
                 } else {
 36  0
                         return null;
 37  
                 }
 38  
         }
 39  
 
 40  
         public String getPrefix(String namespace) {
 41  0
                 if (namespace == null) {
 42  0
                         throw new IllegalArgumentException("The namespace uri cannot be null.");
 43  
                 }
 44  0
                 if (namespace.equals("http://nothingfornowwf.com")) {
 45  0
                         return "wf";
 46  
                 } else {
 47  0
                         return null;
 48  
                 }
 49  
         }
 50  
 
 51  
         public Iterator getPrefixes(String namespace) {
 52  0
                 return null;
 53  
         }
 54  
 }