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