SAP NetWeaver '04

com.sapportals.wcm.crt.configuration
Interface IConfiguration

[contained in: com.sap.netweaver.bc.crt.par - bc.crt_api.jar]
All Known Implementing Classes:
AbstractConfiguration

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
 java.lang.String getAttribute(java.lang.String name)
          Returns the string value of the specified attribute.
 java.lang.String getAttribute(java.lang.String name, java.lang.String defaultValue)
          Returns the string value of the specified attribute.
 boolean getAttributeAsBoolean(java.lang.String paramName)
          Returns the boolean value of the specified attribute.
 boolean getAttributeAsBoolean(java.lang.String name, boolean defaultValue)
          Returns the boolean value of the specified attribute.
 float getAttributeAsFloat(java.lang.String paramName)
          Returns the float value of the specified attribute.
 float getAttributeAsFloat(java.lang.String name, float defaultValue)
          Returns the float value of the specified attribute.
 int getAttributeAsInteger(java.lang.String paramName)
          Returns the integer value of the specified attribute.
 int getAttributeAsInteger(java.lang.String name, int defaultValue)
          Returns the integer value of the specified attribute.
 long getAttributeAsLong(java.lang.String name)
          Returns the long value of the specified attribute.
 long getAttributeAsLong(java.lang.String name, long defaultValue)
          Returns the long value of the specified attribute.
 java.lang.String[] getAttributeNames()
          Returns an array of all attribute names.
 IConfiguration getChild(java.lang.String child)
          Returns the child node with the specified name.
 IConfiguration getChild(java.lang.String child, boolean createNew)
          Returns the specified child node.
 IConfiguration[] getChildren()
          Returns an array of all child nodes.
 IConfiguration[] getChildren(java.lang.String name)
          Returns an array of all child nodes with the specified name.
 java.lang.String getLocation()
          Returns a string describing the location of the configuration data.
 java.lang.String getName()
          Returns the name of the node (not null ).
 java.lang.String getNamespace()
          Returns the namespace this configuration node belongs to.
 java.lang.String getValue()
          Returns the string value of this node.
 java.lang.String getValue(java.lang.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

public java.lang.String getName()
Returns the name of the node (not null ).
Returns:
the name of the node (not null ).

getLocation

public java.lang.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

public java.lang.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

public IConfiguration getChild(java.lang.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

public IConfiguration getChild(java.lang.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

public 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

public IConfiguration[] getChildren(java.lang.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 - TBD: Description of the incoming method parameter
Returns:
an array of all child nodes.

getAttributeNames

public java.lang.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

public java.lang.String getAttribute(java.lang.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

public int getAttributeAsInteger(java.lang.String paramName)
                          throws ConfigurationException
Returns the integer value of the specified attribute.
Parameters:
paramName - TBD: Description of the incoming method parameter
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

public long getAttributeAsLong(java.lang.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

public float getAttributeAsFloat(java.lang.String paramName)
                          throws ConfigurationException
Returns the float value of the specified attribute.
Parameters:
paramName - TBD: Description of the incoming method parameter
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

public boolean getAttributeAsBoolean(java.lang.String paramName)
                              throws ConfigurationException
Returns the boolean value of the specified attribute.
Parameters:
paramName - TBD: Description of the incoming method parameter
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

public java.lang.String getValue()
                          throws ConfigurationException
Returns the string value of this node.
Returns:
the string value of this node.
Throws:
ConfigurationException -  

getValueAsInteger

public 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

public 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

public 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

public 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

public java.lang.String getValue(java.lang.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

public 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

public 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

public 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

public 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

public java.lang.String getAttribute(java.lang.String name,
                                     java.lang.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

public int getAttributeAsInteger(java.lang.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

public long getAttributeAsLong(java.lang.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

public float getAttributeAsFloat(java.lang.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

public boolean getAttributeAsBoolean(java.lang.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.

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.