org.openpermis.editor.policy.configuration
Class ConfigurationSection

java.lang.Object
  extended by org.openpermis.editor.policy.configuration.ConfigurationElement
      extended by org.openpermis.editor.policy.configuration.ConfigurationSection
Direct Known Subclasses:
ConfigurationGenericSection, ConfigurationGroupSection, ConfigurationScopedSection

public abstract class ConfigurationSection
extends ConfigurationElement

Describes a section in the configuration file.

Toplevel elements under the document root element are considered to be section elements.

Since:
0.9.0

Nested Class Summary
static class ConfigurationSection.Factory
          Factory for generic configuration sections.
 
Field Summary
static String ORDER
          Class setting key that describes the order of section elements.
 
Constructor Summary
ConfigurationSection(org.dom4j.Element element)
          Creates a new section element for the specified parameters.
 
Method Summary
protected  void addChild(ClassSettings settings, org.picocontainer.MutablePicoContainer pico, ClassLoader classLoader, ConfigurationChild child)
          Processes a single child element of this section.
protected  void addChildren(ClassSettings settings, org.picocontainer.MutablePicoContainer pico, ClassLoader classLoader)
          Processes all child elements of this section.
abstract  void addComponents(ConfigurationSectionFactory factory, ClassSettings settings, org.picocontainer.MutablePicoContainer pico, ClassLoader classLoader)
          Adds the component implementations listed in this section to the container specified.
 
Methods inherited from class org.openpermis.editor.policy.configuration.ConfigurationElement
attributeValue, getElement, getParentValue, getPath, getValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORDER

public static final String ORDER
Class setting key that describes the order of section elements.

The value is a list of implementation classes (List<Class<?>>).

Constant Field Value:
"order"
Since:
0.9.0
Constructor Detail

ConfigurationSection

public ConfigurationSection(org.dom4j.Element element)
Creates a new section element for the specified parameters.

Parameters:
element - the underlying DOM element.
Since:
0.9.0
Method Detail

addComponents

public abstract void addComponents(ConfigurationSectionFactory factory,
                                   ClassSettings settings,
                                   org.picocontainer.MutablePicoContainer pico,
                                   ClassLoader classLoader)
                            throws ConfigurationException
Adds the component implementations listed in this section to the container specified.

Parameters:
factory - the factory to create new configuration sections if required.
settings - object to store additional type based settings to.
pico - the pico container to add components to, must not be null.
classLoader - the class loader to use, must not be null.
Throws:
ConfigurationException - passed on.
Since:
0.9.0

addChildren

protected void addChildren(ClassSettings settings,
                           org.picocontainer.MutablePicoContainer pico,
                           ClassLoader classLoader)
                    throws ConfigurationException
Processes all child elements of this section.

Calls addChild(org.openpermis.editor.policy.configuration.ClassSettings, org.picocontainer.MutablePicoContainer, java.lang.ClassLoader, org.openpermis.editor.policy.configuration.ConfigurationChild) for each embedded element.

Parameters:
settings - object to store additional type based settings to.
pico - the pico container to add components to, must not be null.
classLoader - the class loader to use, must not be null.
Throws:
ConfigurationException - passed on.
Since:
0.9.0

addChild

protected void addChild(ClassSettings settings,
                        org.picocontainer.MutablePicoContainer pico,
                        ClassLoader classLoader,
                        ConfigurationChild child)
                 throws ConfigurationException
Processes a single child element of this section.

The default implementation does nothing.

Called by addChildren(org.openpermis.editor.policy.configuration.ClassSettings, org.picocontainer.MutablePicoContainer, java.lang.ClassLoader).

Parameters:
settings - object to store additional type based settings to.
pico - the pico container to add components to, must not be null.
classLoader - the class loader to use, must not be null.
child - the child to process.
Throws:
ConfigurationException - passed on.
Since:
0.9.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG