| java.lang.Object com.jcorporate.expresso.kernel.digester.ComponentConfig
ComponentConfig | public class ComponentConfig implements java.io.Serializable(Code) | | 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
author: Michael Rimov |
Constructor Summary | |
public | ComponentConfig() Default initialization system. |
Method Summary | |
public void | addChildComponent(ComponentConfig newComponent) Adds a nested ComponentConfig bean to represent nested components. | public void | addIndexedProperty(String name, int index, String value) | public void | addMappedProperty(String name, String key, String value) Add a mapped property. | public void | addProperty(String name, String value) | public boolean | equals(Object parm1) Determine if two component configuration beans are equal by checking
all fields and all child component's configurations. | public Map | getAllIndexedProperties() Retrieve a map of all indexed properties. | public Map | getAllMappedProperties() Retrieve a map of all mapped properties. | public ComponentConfig | getChildComponent(String componentName) | public java.util.List | getChildComponents() Retrieves a list of child component configurations. | public String | getClassName() Retrieve the classname for this component. | public Map | getIndexedProperties(String name) Retrieve a map of index properties. | public String | getIndexedProperty(String key, int index) Retrieve a particular indexed property. | public Map | getMappedProperties(String name) | public String | getMappedProperty(String name, String key) | public String | getName() | public Map | getProperties() Retrieve a read-only map of all 'normal' properties keyed by the property name. | public String | getProperty(String name) | public int | hashCode() Custom hashcode... | public void | setClassName(String className) | public void | setIndexedProperty(String key, int index, String value) Sets an indexed property value. | public void | setMappedProperty(String key, String name, String value) Sets an mapped property value. | public void | setName(String name) | public void | setProperty(String name, String value) | public void | updateConfig(ComponentConfig newConfiguration) A semi-copy constructor that allows you to update the configuration for
this component only, not it's children. |
ComponentConfig | public ComponentConfig()(Code) | | Default initialization system.
|
addChildComponent | public void addChildComponent(ComponentConfig newComponent)(Code) | | Adds a nested ComponentConfig bean to represent nested components.
Parameters: newComponent - the new ComponentConfig bean |
addIndexedProperty | public void addIndexedProperty(String name, int index, String value)(Code) | | Add an indexed property (often seen in the javabean world as arrays)
Parameters: name - the name of the property Parameters: index - the index of the property Parameters: value - the value of the property at the given index. |
addMappedProperty | public void addMappedProperty(String name, String key, String value)(Code) | | Add a mapped property.
Parameters: name - the name of the mapped property Parameters: key - the property key Parameters: value - the value of the key |
addProperty | public void addProperty(String name, String value)(Code) | | Add a property for the component
Parameters: name - the name of the property Parameters: value - the value of the named property. |
equals | public boolean equals(Object parm1)(Code) | | Determine if two component configuration beans are equal by checking
all fields and all child component's configurations.
Parameters: parm1 - the other object to check against true if this function determines that the two beans are equal. |
getAllIndexedProperties | public Map getAllIndexedProperties()(Code) | | Retrieve a map of all indexed properties. The map is keyed by strings which in
turn point to maps that are keyed by Integers representing the array
indexes for each property name.
java.util.Map |
getAllMappedProperties | public Map getAllMappedProperties()(Code) | | 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
java.util.Map |
getChildComponent | public ComponentConfig getChildComponent(String componentName)(Code) | | Search for a child component by the given component name
Parameters: componentName - the name of the component to retrieve ComponentConfig if one is found or null if it couldn't be found throws: IllegalArgumentException - if componentName is null or zero length |
getChildComponents | public java.util.List getChildComponents()(Code) | | Retrieves a list of child component configurations.
an unmodifiable list of child components. |
getClassName | public String getClassName()(Code) | | Retrieve the classname for this component.
java.lang.String |
getIndexedProperties | public Map getIndexedProperties(String name)(Code) | | Retrieve a map of index properties. The keys in the map correspond to
the indexes in a typical array as they are used in a javabean.
Parameters: name - the name of the property to retrieve java.util.Map keyed by java.lang.Integer |
getIndexedProperty | public String getIndexedProperty(String key, int index)(Code) | | Retrieve a particular indexed property.
Parameters: key - the property name Parameters: index - the index of the property who's value we wish to retrieve java.lang.String |
getMappedProperties | public Map getMappedProperties(String name)(Code) | | Retrieve all mapped property key/value pairs for a given property name
Parameters: name - the name of the property String:String Map that corresponds to all mapped values for thisgiven property |
getMappedProperty | public String getMappedProperty(String name, String key)(Code) | | Retrieve the value of a mapped property
Parameters: name - the property name Parameters: key - the key in the mapped property java.lang.String the actual property value |
getName | public String getName()(Code) | | Retrieve the name of the component
java.lang.String |
getProperties | public Map getProperties()(Code) | | Retrieve a read-only map of all 'normal' properties keyed by the property name.
java.util.Map |
getProperty | public String getProperty(String name)(Code) | | Retrieve the value of a property
Parameters: name - the name of the property java.lang.String |
hashCode | public int hashCode()(Code) | | Custom hashcode... name and classname basically make a unique
component config.
integer |
setClassName | public void setClassName(String className)(Code) | | Sets the classname for this component
Parameters: className - java.lang.String (Should be a valid class) |
setIndexedProperty | public void setIndexedProperty(String key, int index, String value)(Code) | | Sets an indexed property value.
Parameters: key - The property name Parameters: index - the index of the property Parameters: value - the value for the property. |
setMappedProperty | public void setMappedProperty(String key, String name, String value)(Code) | | Sets an mapped property value.
Parameters: key - The property name Parameters: name - the name of the property Parameters: value - the value for the property. |
setName | public void setName(String name)(Code) | | Sets the name of the component
Parameters: name - java.lang.String |
setProperty | public void setProperty(String name, String value)(Code) | | Sets the value of a particular property
Parameters: name - the name of the property Parameters: value - the value of the property. |
updateConfig | public void updateConfig(ComponentConfig newConfiguration)(Code) | | A semi-copy constructor that allows you to update the configuration for
this component only, not it's children. Overrites the current properties,
etc for everything except childComponents
Parameters: newConfiguration - the new configuration to update |
|
|