Coverage Report - org.mule.module.xml.util.NamespaceManager
 
Classes in this File Line Coverage Branch Coverage Complexity
NamespaceManager
0%
0/16
0%
0/2
1.143
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.module.xml.util;
 8  
 
 9  
 import org.mule.api.lifecycle.Initialisable;
 10  
 import org.mule.api.lifecycle.InitialisationException;
 11  
 
 12  
 import java.util.HashMap;
 13  
 import java.util.Map;
 14  
 
 15  
 /**
 16  
  * A simple manager that holds a registry of global namespaces that will be recognised by all xml queries and transforms
 17  
  */
 18  0
 public class NamespaceManager implements Initialisable
 19  
 {
 20  
 
 21  0
     private Map namespaces = new HashMap(2);
 22  0
     private Map configNamespaces = new HashMap(8);
 23  
 
 24  0
     private boolean includeConfigNamespaces = false;
 25  
 
 26  
 
 27  
     public void initialise() throws InitialisationException
 28  
     {
 29  0
         if (isIncludeConfigNamespaces())
 30  
         {
 31  0
             namespaces.putAll(configNamespaces);
 32  
         }
 33  0
     }
 34  
 
 35  
     public boolean isIncludeConfigNamespaces()
 36  
     {
 37  0
         return includeConfigNamespaces;
 38  
     }
 39  
 
 40  
     public void setIncludeConfigNamespaces(boolean includeConfigNamespaces)
 41  
     {
 42  0
         this.includeConfigNamespaces = includeConfigNamespaces;
 43  0
     }
 44  
 
 45  
     public Map getNamespaces()
 46  
     {
 47  0
         return namespaces;
 48  
     }
 49  
 
 50  
     public void setNamespaces(Map namespaces)
 51  
     {
 52  0
         this.namespaces = namespaces;
 53  0
     }
 54  
 
 55  
     public Map getConfigNamespaces()
 56  
     {
 57  0
         return configNamespaces;
 58  
     }
 59  
 
 60  
     public void setConfigNamespaces(Map configNamespaces)
 61  
     {
 62  0
         this.configNamespaces = configNamespaces;
 63  0
     }
 64  
 }