|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This service define a resource interface for accessing the configuration information of the application.
Since implementations of this service are used by Turbine itself and
the TurbineServices
depends on their proper operation, they
must respect some specific implementation rules:
ServletConfig
init parameters are the only way
to retrieve parameters for this service. It's impossible to use
TurbineServices utility methods for this purpose
Field Summary | |
static java.lang.String |
SERVICE_NAME
|
Method Summary | |
boolean |
getBoolean(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as a boolean value. |
boolean |
getBoolean(java.lang.String name,
boolean def)
The purppose of this method is to get the configuration resource with the given name as a boolean value, or a default value. |
org.apache.commons.configuration.Configuration |
getConfiguration(java.lang.String prefix)
The purpose of this method is to extract a subset configuration sharing a common name prefix. |
double |
getDouble(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as a double. |
double |
getDouble(java.lang.String name,
double def)
The purpose of this method is to get the configuration resource with the given name as a double, or a default value. |
float |
getFloat(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as a float. |
float |
getFloat(java.lang.String name,
float def)
The purpose of this method is to get the configuration resource with the given name as a float, or a default value. |
int |
getInt(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as an integer. |
int |
getInt(java.lang.String name,
int def)
The purpose of this method is to get the configuration resource with the given name as an integer, or a default value. |
java.util.Iterator |
getKeys()
Get the list of the keys contained in the configuration repository. |
java.util.Iterator |
getKeys(java.lang.String prefix)
Get the list of the keys contained in the configuration repository that match the specified prefix. |
long |
getLong(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as a long. |
long |
getLong(java.lang.String name,
long def)
The purpose of this method is to get the configuration resource with the given name as a long, or a default value. |
ResourceService |
getResources(java.lang.String prefix)
The purpose of this method is to extract a subset of configuration resources sharing a common name prefix. |
java.lang.String |
getString(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as a string. |
java.lang.String |
getString(java.lang.String name,
java.lang.String def)
The purpose of this method is to get the configuration resource with the given name as a string, or a default value. |
java.lang.String[] |
getStringArray(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as a string array. |
java.util.Vector |
getVector(java.lang.String name)
The purpose of this method is to get the configuration resource with the given name as a vector. |
java.util.Vector |
getVector(java.lang.String name,
java.util.Vector def)
The purpose of this method is to get the configuration resource with the given name as a vector, or a default value. |
void |
setProperty(java.lang.String key,
java.lang.String value)
Set a property in with a key=value pair. |
Methods inherited from interface org.apache.turbine.services.Service |
getConfiguration, getName, getProperties, setName, setServiceBroker |
Methods inherited from interface org.apache.turbine.services.Initable |
getInit, init, init, setInitableBroker, shutdown |
Field Detail |
public static final java.lang.String SERVICE_NAME
Method Detail |
public void setProperty(java.lang.String key, java.lang.String value)
String
- keyString
- valuepublic boolean getBoolean(java.lang.String name)
name
- The resource name.public boolean getBoolean(java.lang.String name, boolean def)
name
- The resource name.def
- The default value of the resource.public double getDouble(java.lang.String name)
name
- The resoource name.public double getDouble(java.lang.String name, double def)
name
- The resource name.def
- The default value of the resource.public float getFloat(java.lang.String name)
name
- The resource name.public float getFloat(java.lang.String name, float def)
name
- The resource name.def
- The default value of the resource.public int getInt(java.lang.String name)
name
- The resource name.public int getInt(java.lang.String name, int def)
name
- The resource name.def
- The default value of the resource.public java.util.Iterator getKeys()
public java.util.Iterator getKeys(java.lang.String prefix)
prefix
- A String prefix to test against.public long getLong(java.lang.String name)
name
- The resource name.public long getLong(java.lang.String name, long def)
name
- The resource name.def
- The default value of the resource.public java.lang.String getString(java.lang.String name)
name
- The resource name.public java.lang.String getString(java.lang.String name, java.lang.String def)
name
- The resource name.def
- The default value of the resource.public java.lang.String[] getStringArray(java.lang.String name)
name
- The resource name.public java.util.Vector getVector(java.lang.String name)
name
- The resource name.public java.util.Vector getVector(java.lang.String name, java.util.Vector def)
name
- The resource name.def
- The default value of the resource.public ResourceService getResources(java.lang.String prefix)
prefix
- the common name prefixpublic org.apache.commons.configuration.Configuration getConfiguration(java.lang.String prefix)
prefix
- the common name prefix
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |