com.sapportals.wcm.crt.configuration

Interface IConfiguration

All Known Implementing Classes:
AbstractConfiguration, DefaultConfiguration

public interface IConfiguration

This interface represents a node of hierarchical configuration data. A configuration data node has a name, attributes (name/value pairs) and child nodes.

Copyright (c) SAP AG 2001-2002


Method Summary
 String getAttribute(String name)
          Returns the string value of the specified attribute.
 String getAttribute(String name, String defaultValue)
          Returns the string value of the specified attribute.
 boolean getAttributeAsBoolean(String paramName)
          Returns the boolean value of the specified attribute.
 boolean getAttributeAsBoolean(String name, boolean defaultValue)
          Returns the boolean value of the specified attribute.
 float getAttributeAsFloat(String paramName)
          Returns the float value of the specified attribute.
 float getAttributeAsFloat(String name, float defaultValue)
          Returns the float value of the specified attribute.
 int getAttributeAsInteger(String paramName)
          Returns the integer value of the specified attribute.
 int getAttributeAsInteger(String name, int defaultValue)
          Returns the integer value of the specified attribute.
 long getAttributeAsLong(String name)
          Returns the long value of the specified attribute.
 long getAttributeAsLong(String name, long defaultValue)
          Returns the long value of the specified attribute.
 String[] getAttributeNames()
          Returns an array of all attribute names.
 IConfiguration getChild(String child)
          Returns the child node with the specified name.
 IConfiguration getChild(String child, boolean createNew)
          Returns the specified child node.
 IConfiguration[] getChildren()
          Returns an array of all child nodes.
 IConfiguration[] getChildren(String name)
          Returns an array of all child nodes with the specified name.
 String getLocation()
          Returns a string describing the location of the configuration data.
 String getName()
          Returns the name of the node (not null ).
 String getNamespace()
          Returns the namespace this configuration node belongs to.
 String getValue()
          Returns the string value of this node.
 String getValue(String defaultValue)
          Returns the string value of this node.
 boolean getValueAsBoolean()
          Returns the boolean value of this node.
 boolean getValueAsBoolean(boolean defaultValue)
          Returns the boolean value of this node.
 float getValueAsFloat()
          Returns the float value of this node.
 float getValueAsFloat(float defaultValue)
          Returns the float value of this node.
 int getValueAsInteger()
          Returns the integer value of this node.
 int getValueAsInteger(int defaultValue)
          Returns the integer value of this node.
 long getValueAsLong()
          Returns the long value of this node.
 long getValueAsLong(long defaultValue)
          Returns the long value of this node.
 

Method Detail

getName

String getName()
Returns the name of the node (not null ).

Returns:
the name of the node (not null ).

getLocation

String getLocation()
Returns a string describing the location of the configuration data. This string is client specific, examples: line number (for file-based persistence), identifier, URI, database table, ...

Returns:
location

getNamespace

String getNamespace()
                    throws ConfigurationException
Returns the namespace this configuration node belongs to.

Returns:
the namespace this configuration node belongs to.
Throws:
ConfigurationException - Exception raised in failure situation

getChild

IConfiguration getChild(String child)
Returns the child node with the specified name. If no such child node exists, an empty configuration will be returned.

Parameters:
child - The name of the child node.
Returns:
the child node with the specified name.

getChild

IConfiguration getChild(String child,
                        boolean createNew)
Returns the specified child node.

Parameters:
child - The name of the child node.
createNew - If true , an empty IConfiguration node will be created and returned if the specified child does not exist. If false , null will be returned if the specified child doesn't exist.
Returns:
<{IConfiguration}>

getChildren

IConfiguration[] getChildren()
Returns an array of all child nodes. If the node has no children the array is empty.

Returns:
an array of all child nodes.

getChildren

IConfiguration[] getChildren(String name)
Returns an array of all child nodes with the specified name. If the node has no children with the specified name the array is empty.

Parameters:
name - the name of the nodes to be returned
Returns:
an array of all child nodes.

getAttributeNames

String[] getAttributeNames()
Returns an array of all attribute names. The order of attributes is the array is undefinded.

Returns:
an array of all attribute names.

getAttribute

String getAttribute(String name)
                    throws ConfigurationException
Returns the string value of the specified attribute.

Parameters:
name - The name of the attribute.
Returns:
the string value of the specified attribute.
Throws:
ConfigurationException - If the attribute does not exist.

getAttributeAsInteger

int getAttributeAsInteger(String paramName)
                          throws ConfigurationException
Returns the integer value of the specified attribute.

Parameters:
paramName - the name of the attribute
Returns:
the integer value of the specified attribute.
Throws:
ConfigurationException - If the attribute does not exist or if the value is not an integer.

getAttributeAsLong

long getAttributeAsLong(String name)
                        throws ConfigurationException
Returns the long value of the specified attribute.

Parameters:
name - The name of the attribute.
Returns:
the long value of the specified attribute.
Throws:
ConfigurationException - If the attribute does not exist or if the value is not a long.

getAttributeAsFloat

float getAttributeAsFloat(String paramName)
                          throws ConfigurationException
Returns the float value of the specified attribute.

Parameters:
paramName - the name of the attribute
Returns:
the float value of the specified attribute.
Throws:
ConfigurationException - If the attribute does not exist or if the value is not a float.

getAttributeAsBoolean

boolean getAttributeAsBoolean(String paramName)
                              throws ConfigurationException
Returns the boolean value of the specified attribute.

Parameters:
paramName - the name of the attribute
Returns:
the boolean value of the specified attribute.
Throws:
ConfigurationException - If the attribute does not exist or if the value is not a boolean.

getValue

String getValue()
                throws ConfigurationException
Returns the string value of this node.

Returns:
the string value of this node.
Throws:
ConfigurationException

getValueAsInteger

int getValueAsInteger()
                      throws ConfigurationException
Returns the integer value of this node.

Returns:
the integer value of this node.
Throws:
ConfigurationException - If the value is not an integer.

getValueAsFloat

float getValueAsFloat()
                      throws ConfigurationException
Returns the float value of this node.

Returns:
the float value of this node.
Throws:
ConfigurationException - If the value is not an float.

getValueAsBoolean

boolean getValueAsBoolean()
                          throws ConfigurationException
Returns the boolean value of this node.

Returns:
the boolean value of this node.
Throws:
ConfigurationException - If the value is not an boolean.

getValueAsLong

long getValueAsLong()
                    throws ConfigurationException
Returns the long value of this node.

Returns:
the long value of this node.
Throws:
ConfigurationException - If the value is not an long.

getValue

String getValue(String defaultValue)
Returns the string value of this node.

Parameters:
defaultValue - The default for the returned value if the node has no value.
Returns:
the integer value of this node.

getValueAsInteger

int getValueAsInteger(int defaultValue)
Returns the integer value of this node.

Parameters:
defaultValue - The default for the returned value if the node has no value.
Returns:
the integer value of this node.

getValueAsLong

long getValueAsLong(long defaultValue)
Returns the long value of this node.

Parameters:
defaultValue - The default for the returned value if the node has no value.
Returns:
the long value of this node.

getValueAsFloat

float getValueAsFloat(float defaultValue)
Returns the float value of this node.

Parameters:
defaultValue - The default for the returned value if the node has no value.
Returns:
the float value of this node.

getValueAsBoolean

boolean getValueAsBoolean(boolean defaultValue)
Returns the boolean value of this node.

Parameters:
defaultValue - The default for the returned value if the node has no value.
Returns:
the boolean value of this node.

getAttribute

String getAttribute(String name,
                    String defaultValue)
Returns the string value of the specified attribute.

Parameters:
defaultValue - The default for the returned value if the attribute does not exist.
name - The name of the attribute.
Returns:
the string value of the specified attribute.

getAttributeAsInteger

int getAttributeAsInteger(String name,
                          int defaultValue)
Returns the integer value of the specified attribute.

Parameters:
defaultValue - The default for the returned value if the attribute does not exist.
name - The name of the attribute.
Returns:
the integer value of the specified attribute.

getAttributeAsLong

long getAttributeAsLong(String name,
                        long defaultValue)
Returns the long value of the specified attribute.

Parameters:
defaultValue - The default for the returned value if the attribute does not exist.
name - The name of the attribute.
Returns:
the long value of the specified attribute.

getAttributeAsFloat

float getAttributeAsFloat(String name,
                          float defaultValue)
Returns the float value of the specified attribute.

Parameters:
defaultValue - The default for the returned value if the attribute does not exist.
name - The name of the attribute.
Returns:
the float value of the specified attribute.

getAttributeAsBoolean

boolean getAttributeAsBoolean(String name,
                              boolean defaultValue)
Returns the boolean value of the specified attribute.

Parameters:
defaultValue - The default for the returned value if the attribute does not exist.
name - The name of the attribute.
Returns:
the boolean value of the specified attribute.
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice