Expresso 5-5-0

com.jcorporate.expresso.kernel
Interface Configuration

All Known Implementing Classes:
DefaultConfigBean

public interface Configuration

This interface is a read-only interface into a dyna-bean. It is used to contracturally enforce a component only being able to read it's own configuration. DefaultConfigBean is the typical implementation of this interface

Since:
Expresso 5.1
Version:
$Revision: 1.4 $ on $Date: 2003/06/03 06:12:21 $
Author:
Michael Rimov
See Also:
DefaultConfigBean

Method Summary
 boolean contains(String name, String key)
          Does the specified mapped property contain a value for the specified key value?
 Object get(String name)
          Return the value of a simple property with the specified name
 Object get(String name, int index)
          Return the value of an indexed property with the specified name.
 Object get(String name, String key)
          Return the value of a mapped property with the specified name, or null if there is no value for the specified key
 List getIndexedProperties(String name)
          Retrieve ALL the indexed properties defined by parameter name.
 Map getMappedProperties(String name)
          Retrieved all the mapped properties defined by name
 

Method Detail

get

public Object get(String name)
Return the value of a simple property with the specified name

Parameters:
name - Name of the property whose value is to be retrieved
Returns:
java.lang.Object representing the property value.
Throws:
IllegalArgumentException - If there is no property of the specified name

get

public Object get(String name,
                  int index)
Return the value of an indexed property with the specified name.

Parameters:
name - Name of the property whose value is to be retrieved
index - Index of the value to be retrieved
Returns:
java.lang.Object representing the property value.
Throws:
IllegalArgumentException - if there is no property of the specified name
IndexOutOfBoundsException - If the specified index is outside the range of the underlying property
NullPointerException - If no array or List has been initialized for this property

getIndexedProperties

public List getIndexedProperties(String name)
Retrieve ALL the indexed properties defined by parameter name.

Parameters:
name - the name of the property
Returns:
java.util.List

get

public Object get(String name,
                  String key)
Return the value of a mapped property with the specified name, or null if there is no value for the specified key

Parameters:
name - Name of the property whose value is to be retrieved
key - Key of the value to be retrieved
Returns:
java.lang.Object representing the property value.
Throws:
IllegalArgumentException - If there is no property of the specified name

getMappedProperties

public Map getMappedProperties(String name)
Retrieved all the mapped properties defined by name

Parameters:
name - the name of the mapped properties to retrieve
Returns:
java.util.Map of all properties keyed by the property key.

contains

public boolean contains(String name,
                        String key)
Does the specified mapped property contain a value for the specified key value?

Parameters:
name - Name of the property to check
key - Name of the key to check
Returns:
true if the property exists.
Throws:
IllegalArgumentException - upon error

Expresso 5-5-0

Please see www.jcorporate.com for information about new Expresso releases.