|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.components.slide.impl.SlideConfigurationAdapter
public class SlideConfigurationAdapter
The class represent an adapter for the configuration class from jakarta slide
Constructor Summary | |
---|---|
SlideConfigurationAdapter(Configuration configuration)
Create a new adapter to map a Avalon configuration to a Slide configuration |
Method Summary | |
---|---|
String |
getAttribute(String paramName)
Return the value of specified attribute. |
String |
getAttribute(String name,
String defaultValue)
Returns the value of the attribute specified by its name as a String , or the default value if no attribute by
that name exists or is empty. |
boolean |
getAttributeAsBoolean(String paramName)
Return the boolean value of the specified parameter contained
in this node. |
boolean |
getAttributeAsBoolean(String name,
boolean defaultValue)
Returns the value of the attribute specified by its name as a boolean , or the default value if no attribute by
that name exists or is empty. |
float |
getAttributeAsFloat(String paramName)
Return the float value of the specified parameter contained
in this node. |
float |
getAttributeAsFloat(String name,
float defaultValue)
Returns the value of the attribute specified by its name as a float , or the default value if no attribute by
that name exists or is empty. |
int |
getAttributeAsInt(String paramName)
Return the int value of the specified attribute contained
in this node. |
int |
getAttributeAsInt(String name,
int defaultValue)
Returns the value of the attribute specified by its name as a int , or the default value if no attribute by
that name exists or is empty. |
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 , or the default value if no attribute by
that name exists or is empty. |
org.apache.slide.util.conf.Configuration |
getConfiguration(String child)
Return a new Configuration instance encapsulating the
specified child node. |
Enumeration |
getConfigurations(String name)
Return an Enumeration of Configuration |
String |
getLocation()
Return a String indicating the position of this
configuration element in a source file or URI. |
String |
getName()
Return the name of the node. |
String |
getValue()
Return the String value of the node. |
String |
getValue(String defaultValue)
Returns the value of the configuration element as a String . |
boolean |
getValueAsBoolean()
Return the boolean value of the node. |
boolean |
getValueAsBoolean(boolean defaultValue)
Returns the value of the configuration element as a boolean . |
float |
getValueAsFloat()
Return the float value of the node. |
float |
getValueAsFloat(float defaultValue)
Returns the value of the configuration element as a float . |
int |
getValueAsInt()
Return the int value of the node. |
int |
getValueAsInt(int defaultValue)
Returns the value of the configuration element as an int . |
long |
getValueAsLong()
Return the long value of the node. |
long |
getValueAsLong(long defaultValue)
Returns the value of the configuration element as a long . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SlideConfigurationAdapter(Configuration configuration)
configuration
- Avalon configurationMethod Detail |
---|
public String getName()
getName
in interface org.apache.slide.util.conf.Configuration
Configuration
node.public org.apache.slide.util.conf.Configuration getConfiguration(String child) throws org.apache.slide.util.conf.ConfigurationException
Configuration
instance encapsulating the
specified child node.
getConfiguration
in interface org.apache.slide.util.conf.Configuration
child
- The name of the child node.
org.apache.slide.util.conf.ConfigurationException
- If no child with that name exists.public Enumeration getConfigurations(String name)
Enumeration
of Configuration
elements containing all node children with the specified name.
- Specified by:
getConfigurations
in interface org.apache.slide.util.conf.Configuration
- Parameters:
name
- The name of the children to get.
- Returns:
- Enumeration. The
Enumeration
will be
empty if there are no nodes by the specified name.
public String getAttribute(String paramName) throws org.apache.slide.util.conf.ConfigurationException
getAttribute
in interface org.apache.slide.util.conf.Configuration
paramName
- The name of the parameter you ask the value of.
org.apache.slide.util.conf.ConfigurationException
- If no attribute with that name exists.public int getAttributeAsInt(String paramName) throws org.apache.slide.util.conf.ConfigurationException
int
value of the specified attribute contained
in this node.
getAttributeAsInt
in interface org.apache.slide.util.conf.Configuration
paramName
- The name of the parameter you ask the value of.
org.apache.slide.util.conf.ConfigurationException
- If no parameter with that name exists.
or if conversion to int
fails.public long getAttributeAsLong(String name) throws org.apache.slide.util.conf.ConfigurationException
long
.
getAttributeAsLong
in interface org.apache.slide.util.conf.Configuration
name
-
org.apache.slide.util.conf.ConfigurationException
- If no parameter with that name exists.
or if conversion to long
fails.public float getAttributeAsFloat(String paramName) throws org.apache.slide.util.conf.ConfigurationException
float
value of the specified parameter contained
in this node.
getAttributeAsFloat
in interface org.apache.slide.util.conf.Configuration
paramName
- The name of the parameter you ask the value of.
org.apache.slide.util.conf.ConfigurationException
- If no parameter with that name exists.
or if conversion to float
fails.public boolean getAttributeAsBoolean(String paramName) throws org.apache.slide.util.conf.ConfigurationException
boolean
value of the specified parameter contained
in this node.
getAttributeAsBoolean
in interface org.apache.slide.util.conf.Configuration
paramName
- The name of the parameter you ask the value of.
org.apache.slide.util.conf.ConfigurationException
- If no parameter with that name exists.
or if conversion to boolean
fails.public String getValue()
String
value of the node.
getValue
in interface org.apache.slide.util.conf.Configuration
public int getValueAsInt() throws org.apache.slide.util.conf.ConfigurationException
int
value of the node.
getValueAsInt
in interface org.apache.slide.util.conf.Configuration
org.apache.slide.util.conf.ConfigurationException
- If conversion to int
fails.public float getValueAsFloat() throws org.apache.slide.util.conf.ConfigurationException
float
value of the node.
getValueAsFloat
in interface org.apache.slide.util.conf.Configuration
org.apache.slide.util.conf.ConfigurationException
- If conversion to float
fails.public boolean getValueAsBoolean() throws org.apache.slide.util.conf.ConfigurationException
boolean
value of the node.
getValueAsBoolean
in interface org.apache.slide.util.conf.Configuration
org.apache.slide.util.conf.ConfigurationException
- If conversion to boolean
fails.public long getValueAsLong() throws org.apache.slide.util.conf.ConfigurationException
long
value of the node.
getValueAsLong
in interface org.apache.slide.util.conf.Configuration
org.apache.slide.util.conf.ConfigurationException
- If conversion to long
fails.public String getValue(String defaultValue)
String
.
If the configuration value is not set, the default value will be
used.
getValue
in interface org.apache.slide.util.conf.Configuration
defaultValue
- The default value desired.
Configuration
, or default
if none specified.public int getValueAsInt(int defaultValue)
int
.
If the configuration value is not set, the default value will be
used.
getValueAsInt
in interface org.apache.slide.util.conf.Configuration
defaultValue
- The default value desired.
Configuration
, or default
if none specified.public long getValueAsLong(long defaultValue)
long
.
If the configuration value is not set, the default value will be
used.
getValueAsLong
in interface org.apache.slide.util.conf.Configuration
defaultValue
- The default value desired.
Configuration
, or default
if none specified.public float getValueAsFloat(float defaultValue)
float
.
If the configuration value is not set, the default value will be
used.
getValueAsFloat
in interface org.apache.slide.util.conf.Configuration
defaultValue
- The default value desired.
Configuration
, or default
if none specified.public boolean getValueAsBoolean(boolean defaultValue)
boolean
.
If the configuration value is not set, the default value will be
used.
getValueAsBoolean
in interface org.apache.slide.util.conf.Configuration
defaultValue
- The default value desired.
Configuration
, or default
if none specified.public String getAttribute(String name, String defaultValue)
String
, or the default value if no attribute by
that name exists or is empty.
getAttribute
in interface org.apache.slide.util.conf.Configuration
name
- The name of the attribute you ask the value of.defaultValue
- The default value desired.
public int getAttributeAsInt(String name, int defaultValue)
int
, or the default value if no attribute by
that name exists or is empty.
getAttributeAsInt
in interface org.apache.slide.util.conf.Configuration
name
- The name of the attribute you ask the value of.defaultValue
- The default value desired.
public long getAttributeAsLong(String name, long defaultValue)
long
, or the default value if no attribute by
that name exists or is empty.
getAttributeAsLong
in interface org.apache.slide.util.conf.Configuration
name
- The name of the attribute you ask the value of.defaultValue
- The default value desired.
public float getAttributeAsFloat(String name, float defaultValue)
float
, or the default value if no attribute by
that name exists or is empty.
getAttributeAsFloat
in interface org.apache.slide.util.conf.Configuration
name
- The name of the attribute you ask the value of.defaultValue
- The default value desired.
public boolean getAttributeAsBoolean(String name, boolean defaultValue)
boolean
, or the default value if no attribute by
that name exists or is empty.
getAttributeAsBoolean
in interface org.apache.slide.util.conf.Configuration
name
- The name of the attribute you ask the value of.defaultValue
- The default value desired.
public String getLocation()
String
indicating the position of this
configuration element in a source file or URI.
getLocation
in interface org.apache.slide.util.conf.Configuration
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |