org.openpermis.editor.policy.configuration
Class ConfigurationElement

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

public class ConfigurationElement
extends Object

Describes a configuration element in the configuration file.

Since:
0.9.0

Constructor Summary
ConfigurationElement(org.dom4j.Element element)
          Creates a new configuration element for the specified DOM element.
 
Method Summary
protected  String attributeValue(org.dom4j.Element target, String key)
          Returns the value of an attribute.
protected  org.dom4j.Element getElement()
          Returns the DOM element of this configuration element.
protected  String getParentValue(String key)
          Retrieves the value of the attribute with the specified key defined at the parent element.
protected  String getPath()
          Returns the path of this element in the configuration file.
protected  String getValue(String key)
          Retrieves the value of the attribute with the specified key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationElement

public ConfigurationElement(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

getElement

protected final org.dom4j.Element getElement()
Returns the DOM element of this configuration element.

Returns:
the DOM element of this configuration element.
Since:
0.9.0

getPath

protected final String getPath()
Returns the path of this element in the configuration file.

Returns:
the path of this element in the configuration file.
Since:
0.9.0

attributeValue

protected final String attributeValue(org.dom4j.Element target,
                                      String key)
Returns the value of an attribute.

Parameters:
target - the target element for which to determine the attribute value, may be null which causes a null return value.
key - the name of the attribute for which to retrieve its value.
Returns:
the attribute value or null if there is no such attribute or its value is the empty string.
Since:
0.9.0

getParentValue

protected String getParentValue(String key)
Retrieves the value of the attribute with the specified key defined at the parent element.

Parameters:
key - the attribute name for which to determine its value.
Returns:
the attribute value or null if there is no such attribute or its value is the empty string.
Since:
0.9.0

getValue

protected String getValue(String key)
Retrieves the value of the attribute with the specified key.

Parameters:
key - the attribute name for which to determine its value.
Returns:
the attribute value or null if there is no such attribute or its value is the empty string.
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