org.openpermis.editor.policy.configuration
Class ConfigurationChild

java.lang.Object
  extended by org.openpermis.editor.policy.configuration.ConfigurationElement
      extended by org.openpermis.editor.policy.configuration.ConfigurationChild

public class ConfigurationChild
extends ConfigurationElement

Configuration child element.

Since:
0.9.0

Field Summary
protected static String CONFIGURATION_KEY
          Attribute key constant for the configuration key.
protected static String IMPLEMENTATION_CLASS
          Attribute key constant for the implementation class.
protected static String IMPLEMENTATION_TYPE
          Attribute key constant for the implementation type.
 
Constructor Summary
ConfigurationChild(org.dom4j.Element element)
          Creates a new configuration element for the specified DOM element.
 
Method Summary
 void addSettings(ClassSettings settings, ClassLoader classLoader)
          Adds the implementation class specific settings of this child element.
 String getConfigurationKey()
          Returns the configuration key for child element.
 TypeKey getConfigurationKey(Class<?> scope, ClassLoader classLoader)
          Returns the configuration key for the specified scope.
 Class<?> getImplementationClass(ClassLoader classLoader)
          Returns the implementation class value.
 Class<?> getImplementationType(ClassLoader classLoader)
          Returns the implementation type value as class.
 
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

CONFIGURATION_KEY

protected static final String CONFIGURATION_KEY
Attribute key constant for the configuration key.

Constant Field Value:
"key"
Since:
0.9.0

IMPLEMENTATION_TYPE

protected static final String IMPLEMENTATION_TYPE
Attribute key constant for the implementation type.

Constant Field Value:
"type"
Since:
0.9.0

IMPLEMENTATION_CLASS

protected static final String IMPLEMENTATION_CLASS
Attribute key constant for the implementation class.

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

ConfigurationChild

public ConfigurationChild(org.dom4j.Element element)
Creates a new configuration element for the specified DOM element.

Parameters:
element - the DOM element of this configuration element.
Since:
0.9.0
Method Detail

getImplementationType

public Class<?> getImplementationType(ClassLoader classLoader)
                               throws ConfigurationException
Returns the implementation type value as class.

Parameters:
classLoader - the class loader to use.
Returns:
the implementation type value as class or null if undefined.
Throws:
ConfigurationException - if the class cannot be loaded.
Since:
0.9.0

getConfigurationKey

public String getConfigurationKey()
Returns the configuration key for child element.

Use this method only if the child element is not scoped.

Returns:
the configuration key for the child element, null if undefined.
Since:
0.9.0

getConfigurationKey

public TypeKey getConfigurationKey(Class<?> scope,
                                   ClassLoader classLoader)
                            throws ConfigurationException
Returns the configuration key for the specified scope.

Parameters:
scope - the scope class for the configuration key, must not be null.
classLoader - the class loader to use to check the implementation type, must not be null otherwise.
Returns:
the configuration key for the child element, never null.
Throws:
ConfigurationException - if the element does not have a valid implementation type.
Since:
0.9.0

getImplementationClass

public Class<?> getImplementationClass(ClassLoader classLoader)
                                throws ConfigurationException
Returns the implementation class value.

Parameters:
classLoader - the class loader to use, must not be null.
Returns:
the implementation class value, null if undefined.
Throws:
ConfigurationException - if the class cannot be loaded.
Since:
0.9.0

addSettings

public void addSettings(ClassSettings settings,
                        ClassLoader classLoader)
                 throws ConfigurationException
Adds the implementation class specific settings of this child element.

Parameters:
settings - the settings to add the configuration to.
classLoader - the class loader to use, must not be null.
Throws:
ConfigurationException - if the implementation class cannot be loaded.
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