public class ConfiguratorItem
extends java.lang.Object
ConfiguratorItem
instance.
This class holds all information related to such an element.Constructor and Description |
---|
ConfiguratorItem(java.lang.String xpath,
java.lang.String val,
java.util.HashMap<java.lang.String,java.lang.String> attributes)
Construct a
ConfiguratorItem instance using the given parameters. |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Return the attribute names and values for this item.
|
java.lang.String |
getAttributeValue(java.lang.String attribute)
Gets the value for the given attribute name.
|
java.lang.String |
getPath()
Returns the XPath of this element.
|
java.lang.String |
getValue()
Gets the element value.
|
boolean |
isProtected()
Returns whether this element is protected or not.
|
void |
removeAttribute(java.lang.String attribute)
Remove a particular attribute.
|
void |
setAttributes(java.util.HashMap<java.lang.String,java.lang.String> attributes)
Set the attribute names and values for to be set for this element.
|
void |
setAttributeValue(java.lang.String attribute,
java.lang.String attrValue)
Set the value for the attribute with the given name.
|
void |
setProtected(boolean isProtected)
Set whether the element should be protected or not.
|
void |
setValue(java.lang.String value)
Sets the element value.
|
java.lang.String |
toString() |
public ConfiguratorItem(java.lang.String xpath, java.lang.String val, java.util.HashMap<java.lang.String,java.lang.String> attributes) throws CLLException
ConfiguratorItem
instance using the given parameters.xpath
- The XPath of this element from the root XML elementval
- The value that this element holdsattributes
- The possible attribute names and values as key value pairs for this elementCLLException
- If the xpath or val parameters are null or emptypublic java.lang.String getPath()
ConfiguratorItem
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
Map
of attribute key value pairs for the elementpublic void setAttributes(java.util.HashMap<java.lang.String,java.lang.String> attributes)
attributes
- The attributes to setpublic java.lang.String getValue()
public void setValue(java.lang.String value)
value
- The element value to setpublic boolean isProtected()
public void setProtected(boolean isProtected)
isProtected
- If true, the element is set to protectedpublic java.lang.String getAttributeValue(java.lang.String attribute)
attribute
- The attribute name whose value is requiredpublic void setAttributeValue(java.lang.String attribute, java.lang.String attrValue)
attribute
- The name of the attributeattrValue
- The value to be set for the attributepublic void removeAttribute(java.lang.String attribute)
attribute
- The attribute to remove.public java.lang.String toString()
toString
in class java.lang.Object