|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.util.config.AbstractConfigurationHelper
public abstract class AbstractConfigurationHelper
This is an abstract Configuration implementation that deals
with methods that can be abstracted away from underlying implementations.
| Constructor Summary | |
|---|---|
AbstractConfigurationHelper()
|
|
| Method Summary | |
|---|---|
String |
getAttribute(String name,
String defaultValue)
Returns the value of the attribute specified by its name as a String. |
boolean |
getAttributeAsBoolean(String name)
Returns the value of the attribute specified by its name as a boolean. |
boolean |
getAttributeAsBoolean(String name,
boolean defaultValue)
Returns the value of the attribute specified by its name as a boolean. |
float |
getAttributeAsFloat(String name)
Returns the value of the attribute specified by its name as a float. |
float |
getAttributeAsFloat(String name,
float defaultValue)
Returns the value of the attribute specified by its name as a float. |
int |
getAttributeAsInteger(String name)
Returns the value of the attribute specified by its name as an int. |
int |
getAttributeAsInteger(String name,
int defaultValue)
Returns the value of the attribute specified by its name as an int. |
long |
getAttributeAsLong(String name)
Returns the value of the attribute specified by its name as a long. |
long |
getAttributeAsLong(String name,
long defaultValue)
Returns the value of the attribute specified by its name as a long. |
ConfigurationHelper |
getChild(String name)
Return the first Configuration object child of this
associated with the given name. |
ConfigurationHelper |
getChild(String name,
boolean createNew)
Return the first Configuration object child of this
associated with the given name. |
protected abstract String |
getPrefix()
Returns the prefix of the namespace. |
String |
getValue(String defaultValue)
Returns the value of the configuration element as a String. |
boolean |
getValueAsBoolean()
Returns the value of the configuration element as a boolean. |
boolean |
getValueAsBoolean(boolean defaultValue)
Returns the value of the configuration element as a boolean. |
float |
getValueAsFloat()
Returns the value of the configuration element as a float. |
float |
getValueAsFloat(float defaultValue)
Returns the value of the configuration element as a float. |
int |
getValueAsInteger()
Returns the value of the configuration element as an int. |
int |
getValueAsInteger(int defaultValue)
Returns the value of the configuration element as an int. |
long |
getValueAsLong()
Returns the value of the configuration element as a long. |
long |
getValueAsLong(long defaultValue)
Returns the value of the configuration element as a long. |
String |
toString()
The toString() operation is used for debugging information. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.compass.core.util.config.ConfigurationHelper |
|---|
getAttribute, getAttributeNames, getAttributeOrValue, getChildren, getChildren, getChildren, getLocation, getName, getValue, makeReadOnly |
| Constructor Detail |
|---|
public AbstractConfigurationHelper()
| Method Detail |
|---|
protected abstract String getPrefix()
throws ConfigurationException
ConfigurationException - if no prefix was defined (prefix is null.
public int getValueAsInteger()
throws ConfigurationException
int.
Hexadecimal numbers begin with 0x, Octal numbers begin with 0o and binary
numbers begin with 0b, all other values are assumed to be decimal.
getValueAsInteger in interface ConfigurationHelperConfigurationExceptionpublic int getValueAsInteger(int defaultValue)
int.
Hexadecimal numbers begin with 0x, Octal numbers begin with 0o and binary
numbers begin with 0b, all other values are assumed to be decimal.
getValueAsInteger in interface ConfigurationHelper
public long getValueAsLong()
throws ConfigurationException
long.
Hexadecimal numbers begin with 0x, Octal numbers begin with 0o and binary
numbers begin with 0b, all other values are assumed to be decimal.
getValueAsLong in interface ConfigurationHelperConfigurationExceptionpublic long getValueAsLong(long defaultValue)
long.
Hexadecimal numbers begin with 0x, Octal numbers begin with 0o and binary
numbers begin with 0b, all other values are assumed to be decimal.
getValueAsLong in interface ConfigurationHelper
public float getValueAsFloat()
throws ConfigurationException
float.
getValueAsFloat in interface ConfigurationHelperConfigurationExceptionpublic float getValueAsFloat(float defaultValue)
float.
getValueAsFloat in interface ConfigurationHelper
public boolean getValueAsBoolean()
throws ConfigurationException
boolean.
getValueAsBoolean in interface ConfigurationHelperConfigurationExceptionpublic boolean getValueAsBoolean(boolean defaultValue)
boolean.
getValueAsBoolean in interface ConfigurationHelperpublic String getValue(String defaultValue)
String.
getValue in interface ConfigurationHelper
public int getAttributeAsInteger(String name)
throws ConfigurationException
int. Hexadecimal numbers begin with 0x, Octal numbers
begin with 0o and binary numbers begin with 0b, all other values are
assumed to be decimal.
getAttributeAsInteger in interface ConfigurationHelperConfigurationException
public int getAttributeAsInteger(String name,
int defaultValue)
int. Hexadecimal numbers begin with 0x, Octal numbers
begin with 0o and binary numbers begin with 0b, all other values are
assumed to be decimal.
getAttributeAsInteger in interface ConfigurationHelper
public long getAttributeAsLong(String name)
throws ConfigurationException
long. Hexadecimal numbers begin with 0x, Octal numbers
begin with 0o and binary numbers begin with 0b, all other values are
assumed to be decimal.
getAttributeAsLong in interface ConfigurationHelperConfigurationException
public long getAttributeAsLong(String name,
long defaultValue)
long. Hexadecimal numbers begin with 0x, Octal numbers
begin with 0o and binary numbers begin with 0b, all other values are
assumed to be decimal.
getAttributeAsLong in interface ConfigurationHelper
public float getAttributeAsFloat(String name)
throws ConfigurationException
float.
getAttributeAsFloat in interface ConfigurationHelperConfigurationException
public float getAttributeAsFloat(String name,
float defaultValue)
float.
getAttributeAsFloat in interface ConfigurationHelper
public boolean getAttributeAsBoolean(String name)
throws ConfigurationException
boolean.
getAttributeAsBoolean in interface ConfigurationHelperConfigurationException
public boolean getAttributeAsBoolean(String name,
boolean defaultValue)
boolean.
getAttributeAsBoolean in interface ConfigurationHelper
public String getAttribute(String name,
String defaultValue)
String.
getAttribute in interface ConfigurationHelperpublic ConfigurationHelper getChild(String name)
Configuration object child of this
associated with the given name. If no such child exists, a new one will
be created.
getChild in interface ConfigurationHelper
public ConfigurationHelper getChild(String name,
boolean createNew)
Configuration object child of this
associated with the given name.
getChild in interface ConfigurationHelperpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||