Expresso 5-6

com.jcorporate.expresso.kernel.metadata
Class IndexedProperty

java.lang.Object
  extended bycom.jcorporate.expresso.kernel.metadata.Property
      extended bycom.jcorporate.expresso.kernel.metadata.IndexedProperty

public class IndexedProperty
extends Property

Bean describing an indexed property. Note because of the potential weirdness of receiving indexed values, this class simply implements the index as a key in a TreeMap so that we can retrieve all the values in order

Version:
$Revision: 1.6 $ on $Date: 2004/11/17 20:48:17 $
Author:
Michael Rimov

Constructor Summary
IndexedProperty()
          Default Constructor
 
Method Summary
 Configuration createConfigBean(DefaultConfigBean targetBean, ComponentConfig config, ComponentMetadata metadata)
          Load the configBean with values for this property.
 String getIndexedValue(int index)
          Retrieve a value at a certain index
 Map getValues()
          Retrieve a map of all indicies and their corresponding values for this property
 void setIndexedValue(int index, String value)
          Set an indexed value
 
Methods inherited from class com.jcorporate.expresso.kernel.metadata.Property
getAccess, getDescription, getName, getType, setAccess, setDescription, setName, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexedProperty

public IndexedProperty()
Default Constructor

Method Detail

setIndexedValue

public void setIndexedValue(int index,
                            String value)
Set an indexed value

Parameters:
index - the index of the property
value - the value to set for that index

getValues

public Map getValues()
Retrieve a map of all indicies and their corresponding values for this property

Returns:
java.util.Map

getIndexedValue

public String getIndexedValue(int index)
Retrieve a value at a certain index

Parameters:
index - the index to retrieve the value for
Returns:
java.lang.String

createConfigBean

public Configuration createConfigBean(DefaultConfigBean targetBean,
                                      ComponentConfig config,
                                      ComponentMetadata metadata)
Load the configBean with values for this property. If there are any values present in the ComponentConfig, then use those properties, if empty, use your own default values as specified in the ComponentMetadata

Specified by:
createConfigBean in class Property
Parameters:
targetBean - The configBean to populate with this property.
config - the current configuration as loaded from the expresso config.xml file
metadata - the current metadata for this component
Returns:
the Configuration interface (actually uslaly the configbean parameter)

Expresso 5-6

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