|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jsieve.ConfigurationManager
Singleton class ConfigurationManager
parses the XML statements
in the Sieve configuration file and translates them to Java objects.
The Sieve configuration is read from 3 properties file. They are located by searching the classpath of the current ClassLoader. org/apache/jsieve/commandsmap.properties org/apache/jsieve/testsmap.properties org/apache/jsieve/comparatorsmap.properties
Method Summary | |
protected static ConfigurationManager |
computeInstance()
Returns a new instance of the receiver. |
java.util.Map |
getCommandMap()
Method getCommandMap answers a Map of Command names and their associated class names, lazily initialized if required. |
java.util.Map |
getComparatorMap()
Method getComparatorMap answers a Map of Comparator names and their associated class names, lazily initialized if required. |
protected static java.io.InputStream |
getConfigStream(java.lang.String configName)
Method getConfigStream answers an InputStream over the Sieve configuration file. |
static ConfigurationManager |
getInstance()
Returns the sole instance of the receiver, lazily initialised if required. |
java.util.Map |
getTestMap()
Method getTestMap answers a Map of Test names and their associated class names, lazily initialized if required. |
protected void |
parse()
Method parse uses the Digester to parse the XML statements in the Sieve configuration file into Java objects. |
protected void |
setCommandMap(java.util.Map commandMap)
Sets the commandMap. |
protected void |
setComparatorMap(java.util.Map comparatorMap)
Sets the comparatorMap. |
protected static void |
setInstance(ConfigurationManager instance)
Sets the instance. |
protected void |
setTestMap(java.util.Map testMap)
Sets the testMap. |
protected static void |
updateInstance()
Updates the instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static ConfigurationManager getInstance() throws SieveConfigurationException
SieveConfigurationException
protected static ConfigurationManager computeInstance() throws SieveConfigurationException
SieveConfigurationException
protected static void setInstance(ConfigurationManager instance)
instance
- The instance to setprotected static void updateInstance() throws SieveConfigurationException
SieveConfigurationException
protected static java.io.InputStream getConfigStream(java.lang.String configName) throws java.io.IOException
Method getConfigStream answers an InputStream over the Sieve configuration file. It is located by searching the classpath of the current ClassLoader.
The context classloader is searched first. If a suitably named resource is found then this is returned. Otherwise, the classloader used to load this class is searched for the resource.
java.io.IOException
public java.util.Map getCommandMap()
public java.util.Map getTestMap()
public java.util.Map getComparatorMap()
protected void parse() throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
java.io.IOException
protected void setCommandMap(java.util.Map commandMap)
commandMap
- The commandMap to setprotected void setTestMap(java.util.Map testMap)
testMap
- The testMap to setprotected void setComparatorMap(java.util.Map comparatorMap)
comparatorMap
- The comparatorMap to set
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |