org.apache.cocoon.util
Interface Settings

All Known Implementing Classes:
PropertySettings

public interface Settings

This object holds the property settings for Cocoon. This interface is loosely based on the Settings interface introduced in 2.2 but is note equivalent to it as it is only meant to hold configuration properties.

Version:
$Id: Settings.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Field Summary
static String PROPERTY_USER_SETTINGS
          Name of the property specifying a custom user properties file.
static String ROLE
          The role to lookup this bean.
 
Method Summary
 List getProperties()
          Return all available properties
 List getProperties(String keyPrefix)
          Return all available properties starting with the prefix.
 String getProperty(String key)
          Get the value of a property.
 String getProperty(String key, String defaultValue)
          Get the value of a property.
 int size()
          Return the number of properties that have been defined
 

Field Detail

ROLE

static final String ROLE
The role to lookup this bean.


PROPERTY_USER_SETTINGS

static final String PROPERTY_USER_SETTINGS
Name of the property specifying a custom user properties file.

See Also:
Constant Field Values
Method Detail

getProperty

String getProperty(String key)
Get the value of a property.

Parameters:
key - The name of the property.
Returns:
The value of the property or null.

getProperty

String getProperty(String key,
                   String defaultValue)
Get the value of a property.

Parameters:
key - The name of the property.
defaultValue - The value returned if the property is not available.
Returns:
The value of the property or if the property cannot be found the default value.

getProperties

List getProperties(String keyPrefix)
Return all available properties starting with the prefix.

Parameters:
keyPrefix - The prefix each property name must have.
Returns:
A list of property names (including the prefix) or an empty list.

getProperties

List getProperties()
Return all available properties

Returns:
A list of all property names or an empty list.

size

int size()
Return the number of properties that have been defined

Returns:
The number of properties that have been defined.


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.