|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.kernel.digester.ComponentConfig
This class represents the configuration of a component as parsed from the xxpresso-services.xml file. It is set by the Digester that fills it.
This is different from the ConfigurationBean used in the kernel package in that all data is string based. It is up to the system factory to convert the string data to the appropriate data type as specified by the component's metadata
| Constructor Summary | |
ComponentConfig()
Default initialization system. |
|
| Method Summary | |
void |
addChildComponent(ComponentConfig newComponent)
Adds a nested ComponentConfig bean to represent nested components. |
void |
addIndexedProperty(String name,
int index,
String value)
Add an indexed property (often seen in the javabean world as arrays) |
void |
addMappedProperty(String name,
String key,
String value)
Add a mapped property. |
void |
addProperty(String name,
String value)
Add a property for the component |
boolean |
equals(Object parm1)
Determine if two component configuration beans are equal by checking all fields and all child component's configurations. |
Map |
getAllIndexedProperties()
Retrieve a map of all indexed properties. |
Map |
getAllMappedProperties()
Retrieve a map of all mapped properties. |
ComponentConfig |
getChildComponent(String componentName)
Search for a child component by the given component name |
List |
getChildComponents()
Retrieves a list of child component configurations. |
String |
getClassName()
Retrieve the classname for this component. |
Map |
getIndexedProperties(String name)
Retrieve a map of index properties. |
String |
getIndexedProperty(String key,
int index)
Retrieve a particular indexed property. |
Map |
getMappedProperties(String name)
Retrieve all mapped property key/value pairs for a given property name |
String |
getMappedProperty(String name,
String key)
Retrieve the value of a mapped property |
String |
getName()
Retrieve the name of the component |
Map |
getProperties()
Retrieve a read-only map of all 'normal' properties keyed by the property name. |
String |
getProperty(String name)
Retrieve the value of a property |
int |
hashCode()
Custom hashcode... name and classname basically make a unique component config. |
void |
setClassName(String className)
Sets the classname for this component |
void |
setIndexedProperty(String key,
int index,
String value)
Sets an indexed property value. |
void |
setMappedProperty(String key,
String name,
String value)
Sets an mapped property value. |
void |
setName(String name)
Sets the name of the component |
void |
setProperty(String name,
String value)
Sets the value of a particular property |
void |
updateConfig(ComponentConfig newConfiguration)
A semi-copy constructor that allows you to update the configuration for this component only, not it's children. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ComponentConfig()
| Method Detail |
public String getName()
public void setName(String name)
name - java.lang.Stringpublic void setClassName(String className)
className - java.lang.String (Should be a valid class)public String getClassName()
public void addProperty(String name,
String value)
name - the name of the propertyvalue - the value of the named property.
public void addMappedProperty(String name,
String key,
String value)
name - the name of the mapped propertykey - the property keyvalue - the value of the key
public void addIndexedProperty(String name,
int index,
String value)
name - the name of the propertyindex - the index of the propertyvalue - the value of the property at the given index.public String getProperty(String name)
name - the name of the property
public void setProperty(String name,
String value)
name - the name of the propertyvalue - the value of the property.
public String getMappedProperty(String name,
String key)
name - the property namekey - the key in the mapped property
public void setMappedProperty(String key,
String name,
String value)
key - The property namename - the name of the propertyvalue - the value for the property.public Map getMappedProperties(String name)
name - the name of the property
public Map getAllMappedProperties()
Retrieve a map of all mapped properties. All objects in the map are Strings and are the format:
Map keyed by property names
Map for each property name keyed by 'key'
The actual property values
public Map getIndexedProperties(String name)
name - the name of the property to retrieve
public Map getAllIndexedProperties()
public String getIndexedProperty(String key,
int index)
key - the property nameindex - the index of the property who's value we wish to retrieve
public void setIndexedProperty(String key,
int index,
String value)
key - The property nameindex - the index of the propertyvalue - the value for the property.public void addChildComponent(ComponentConfig newComponent)
newComponent - the new ComponentConfig beanpublic List getChildComponents()
public ComponentConfig getChildComponent(String componentName)
componentName - the name of the component to retrieve
IllegalArgumentException - if componentName is null or zero lengthpublic Map getProperties()
public boolean equals(Object parm1)
parm1 - the other object to check against
public void updateConfig(ComponentConfig newConfiguration)
newConfiguration - the new configuration to updatepublic int hashCode()
|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||