|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.extensions.config.element.ConfigElementAdapter
public abstract class ConfigElementAdapter
Adapter class for implementing ConfigElement's. Extend this class and provide the implementation specific behaviour.
| Field Summary | |
|---|---|
protected Map<String,String> |
attributes
|
protected List<ConfigElement> |
children
|
protected String |
name
|
protected String |
value
|
| Constructor Summary | |
|---|---|
ConfigElementAdapter(String name)
Default constructor |
|
| Method Summary | |
|---|---|
abstract ConfigElement |
combine(ConfigElement configElement)
Combines the given config element with this config element and returns a new instance containing the resulting combination. |
String |
getAttribute(String name)
Gets the value of the attrbiute with the given name |
int |
getAttributeCount()
Returns the number of attributes this config element has |
Map<String,String> |
getAttributes()
Returns the list of attributes held by this config element |
ConfigElement |
getChild(String name)
Returns a child config element of the given name |
int |
getChildCount()
Returns the number of children this config element has |
List<ConfigElement> |
getChildren()
Returns a list of children held by this ConfigElement |
List<ConfigElement> |
getChildren(String name)
Returns a list of children held by this ConfigElement with the given name. |
Map<String,List<ConfigElement>> |
getChildrenMap()
|
String |
getChildValue(String name)
Shortcut method to return a child config element value of the given name. |
String |
getName()
Returns the name of this config element |
String |
getValue()
Gets the value of this config element. |
boolean |
hasAttribute(String name)
Determines whether the config element has the named attribute |
boolean |
hasChildren()
Determines whether this config element has any children. |
void |
setValue(String value)
Sets the value of this config element |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String name
protected String value
protected Map<String,String> attributes
protected List<ConfigElement> children
| Constructor Detail |
|---|
public ConfigElementAdapter(String name)
name - Name of the config element| Method Detail |
|---|
public String getAttribute(String name)
ConfigElement
getAttribute in interface ConfigElementname - The name of the attrbiute to get the value for
public Map<String,String> getAttributes()
ConfigElement
getAttributes in interface ConfigElementpublic int getAttributeCount()
ConfigElement
getAttributeCount in interface ConfigElementpublic List<ConfigElement> getChildren()
ConfigElement
getChildren in interface ConfigElementpublic List<ConfigElement> getChildren(String name)
ConfigElement
getChildren in interface ConfigElementname - The name of the config element to retrieve
public int getChildCount()
ConfigElement
getChildCount in interface ConfigElementpublic ConfigElement getChild(String name)
ConfigElement
getChild in interface ConfigElementname - The name of the config element to retrieve
public String getChildValue(String name)
ConfigElement
getChildValue in interface ConfigElementname - The name of the config element to retrieve the value from.
public Map<String,List<ConfigElement>> getChildrenMap()
public String getName()
ConfigElement
getName in interface ConfigElementpublic String getValue()
ConfigElement
getValue in interface ConfigElementpublic void setValue(String value)
value - The value to set.public boolean hasAttribute(String name)
ConfigElement
hasAttribute in interface ConfigElementname - Name of the attribute to check existence for
public boolean hasChildren()
ConfigElement
hasChildren in interface ConfigElementpublic String toString()
toString in class Objectpublic abstract ConfigElement combine(ConfigElement configElement)
ConfigElement
combine in interface ConfigElementconfigElement - The config element to combine into this one
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||