|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.feide.moria.directory.DirectoryManagerConfiguration
public class DirectoryManagerConfiguration
Configuration handler for the Directory Manager. Parses the configuration file.
| Field Summary | |
|---|---|
private org.jdom.Element |
backendConfiguration
Internal representation of the backend configuration file structure. |
private java.lang.Class |
backendFactoryClass
Internal representation of the backend class. |
static java.lang.String |
CONFIGURATION_PROPERTY
The required configuration file property, for external reference. |
private java.lang.String |
indexFilename
The location of the index file. |
private long |
indexUpdateFrequency
The index update frequency, in milliseconds. |
| Constructor Summary | |
|---|---|
DirectoryManagerConfiguration(java.util.Properties config)
Constructor. |
|
| Method Summary | |
|---|---|
org.jdom.Element |
getBackendElement()
Gets the backend configuration element. |
java.lang.Class |
getBackendFactoryClass()
Gets the backend factory class implementation. |
java.lang.String |
getIndexFilename()
Gets the serialized index file name. |
long |
getIndexUpdateFrequency()
Gets the index update frequency. |
private org.jdom.Element |
parseBackendConfig(org.jdom.Element rootElement)
Parses the subsection of the configuration file common to all backend implementations and updates the configuration. |
private void |
parseIndexConfig(org.jdom.Element rootElement)
Parses the subsection of the configuration file related to the index and updates the configuration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String indexFilename
private long indexUpdateFrequency
private java.lang.Class backendFactoryClass
private org.jdom.Element backendConfiguration
public static final java.lang.String CONFIGURATION_PROPERTY
no.feide.moria.directory.configuration.
| Constructor Detail |
|---|
public DirectoryManagerConfiguration(java.util.Properties config)
parseIndexConfig(Element) and
parseBackendConfig(Element).
config - The Directory Manager configuration passed on from
DirectoryManager.setConfig(Properties). Must
include the property given by
DirectoryManagerConfiguration.CONFIGURATION_PROPERTY.
java.lang.NullPointerException - If config is null.
DirectoryManagerConfigurationException - If the property given by
DirectoryManagerConfiguration.CONFIGURATION_PROPERTY
is not set or is an empty string. Also thrown if unable to
read from or parse the configuration file.DirectoryManager.setConfig(Properties),
CONFIGURATION_PROPERTY,
parseBackendConfig(Element),
parseIndexConfig(Element)| Method Detail |
|---|
public final org.jdom.Element getBackendElement()
Element.clone().Element.clone()private void parseIndexConfig(org.jdom.Element rootElement)
Index element is found, only the first is
considered.
rootElement - The root configuration element. Cannot be null.
java.lang.NullPointerException - If rootElement is null.
DirectoryManagerConfigurationException - If index file (attribute file in element
Index) is not set, or if index update
frequency (attribute update in element
Index) is not set or is less than zero.public final java.lang.String getIndexFilename()
public final long getIndexUpdateFrequency()
private org.jdom.Element parseBackendConfig(org.jdom.Element rootElement)
class in the
Backend element; further parsing of the element is left to
the backend implementation. If more than one Backend
element is found, only the first is considered.
rootElement - The root configuration element. Cannot be null.
Element.clone().
java.lang.NullPointerException - If rootElement is null.
DirectoryManagerConfigurationException - If backend factory class (attribute class in
element Backend) is not set, or if the given
backend factory class cannot be resolved.Element.clone(),
DirectoryManagerBackendFactory.setConfig(Element)public final java.lang.Class getBackendFactoryClass()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||