public class GCStructuredValue extends GCValue
"structured" type Configuration Values.
A "structured" value is a one which contains a template specifying one or more simple values, and which has zero or more instances of the template values.
| Modifier and Type | Class and Description |
|---|---|
static class |
GCStructuredValue.Instance
Class representing an instance of a
GCStructuredValue's template. |
static class |
GCStructuredValue.Template
Class representing the template definitions for a
GCStructuredValue. |
GCValue.IllegalCloneStateException, GCValue.XmlComment, GCValue.XmlItem, GCValue.XmlProcessingInstruction| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_INSTANCE_SEPARATOR
The default value for the instance separator used when converting a
GCStructuredValue
to a string. |
static java.lang.String |
DEFAULT_VALUE_SEPARATOR
The default value for the value separator used when converting a
GCStructuredValue
to a string. |
protected java.util.List |
instances |
protected GCOwner |
owner |
protected GCStructuredValue.Template |
template |
modified, parent, TYPE_BOOLEAN, TYPE_DN, TYPE_DN_REF, TYPE_ENUM, TYPE_GCV_REF, TYPE_GROUP, TYPE_HEADER, TYPE_INTEGER, TYPE_LIST, TYPE_PASSWORD_REF, TYPE_REAL, TYPE_STRING, TYPE_STRUCTURED, TYPE_SUBORDINATES, xmlItems| Modifier and Type | Method and Description |
|---|---|
GCStructuredValue.Instance |
addInstance()
Add an Instance to this structured value.
|
protected void |
appendInstance(GCStructuredValue.Instance newInstance)
Add an instance to this GCStructuredValue.
|
GCValue |
cloneValue(java.lang.String name)
Clone this
GCValue instance and return the cloned instance. |
java.lang.String |
getInstanceSeparator()
Get the characters used to separate instances when the structured value
is converted to a
String. |
GCOwner |
getOwner()
Return the owner of this instance.
|
GCStructuredValue.Template |
getTemplate()
Return this
GCStructureValue instance's Template. |
java.lang.String |
getValue()
Return the current value of this instance as a delimited string.
|
java.lang.String |
getValueSeparator()
Get the characters used to separate individual instance values when the structured value
is converted to a
String. |
boolean |
hasBeenModified()
Return
true if this instance has been modified. |
java.util.Iterator |
instanceIterator()
Return an
Iterator that returns all Instance values in this
GCStructuredValue. |
java.util.Iterator |
iterator()
Return an
Iterator instance that can be used to iterate
through all descendant GCVs. |
void |
parseValue(java.lang.String value)
Parse the passed value based on the type lexical rules
for
"structured" GCVs. |
void |
setInstanceSeparator(java.lang.String newSeparator)
Set the character(s) used to separate instances when the structured value
is converted to a string.
|
void |
setValue(java.lang.String value)
Set the value for this instance.
|
void |
setValueSeparator(java.lang.String newSeparator)
Set the character(s) used to separate individual instance values when the structured value
is converted to a string.
|
java.util.Iterator |
shallowIterator()
Return an
Iterator instance that can be used to iterate
through the list of GCVs. |
addXmlComment, addXmlItems, addXmlProcessingInstruction, cloneCommon, construct, construct, constructGCVRef, constructGCVRef, constructGroup, constructHeader, constructStructuredValue, constructSubordinates, getDescription, getDescriptionRef, getDisplayName, getDisplayNameRef, getHidden, getMandatory, getName, getParent, getType, getTypeString, getXmlItemsIterator, getXMLValue, localize, resetModified, setDescription, setDescriptionRef, setDisplayName, setDisplayNameRef, setHidden, setMandatory, toXML, typeFromStringpublic static final java.lang.String DEFAULT_VALUE_SEPARATOR
GCStructuredValue
to a string.public static final java.lang.String DEFAULT_INSTANCE_SEPARATOR
GCStructuredValue
to a string.protected GCOwner owner
protected GCStructuredValue.Template template
protected java.util.List instances
public GCValue cloneValue(java.lang.String name)
GCValue instance and return the cloned instance.cloneValue in class GCValuethe - name for the cloned value.protected void appendInstance(GCStructuredValue.Instance newInstance)
newInstance - the Instance to add.public java.lang.String getValueSeparator()
String.public void setValueSeparator(java.lang.String newSeparator)
String is null then
DEFAULT_VALUE_SEPARATOR is used.newSeparator - the separator characterspublic java.lang.String getInstanceSeparator()
String.public void setInstanceSeparator(java.lang.String newSeparator)
String is null then
DEFAULT_INSTANCE_SEPARATOR is used.newSeparator - the separator characterspublic GCOwner getOwner()
public GCStructuredValue.Template getTemplate()
GCStructureValue instance's Template.Templatepublic java.util.Iterator instanceIterator()
Iterator that returns all Instance values in this
GCStructuredValue.Iteratorpublic GCStructuredValue.Instance addInstance() throws GCVStateException
java.lang.IllegalStateException - if a maximum number of instances is set on the template
and adding an instance would exceed the maximum.GCVStateExceptionpublic java.util.Iterator iterator()
Iterator instance that can be used to iterate
through all descendant GCVs. This iterator will return all descendant
GCVs that are real GCVs (not Group or Subordinates).
The Iterator's next() method returns
GCValue instances.
The "deep" iterator returned for this GCStructuredValue instance
will iterate through all of the values in each value Instance.
Iterator instance.shallowIterator()public java.util.Iterator shallowIterator()
Iterator instance that can be used to iterate
through the list of GCVs. The iterator returned will iterate through
only GCValues that are direct children of this instance.
The Iterator's next() method returns
GCValue instances.
The "shallow" iterator returned for this GCStructuredValue instance
will iterate through all of the values in each value Instance.
Iterator instance.iterator()public boolean hasBeenModified()
true if this instance has been modified.
The instance is considered to have been modified if a change was made
that affects the persistent representation since:
resetModified() was last calledhasBeenModified in interface ConfigElementhasBeenModified in class GCValuetrue or falseGCValue.resetModified()public void parseValue(java.lang.String value)
throws GCVException
"structured" GCVs.
parseValue in class GCValuevalue - Value String to parseGCVException - thrown if value does not match "structured" constraints.public java.lang.String getValue()
public void setValue(java.lang.String value)
throws GCVException
The passed value must conform to the rules noted under parseValue().
setValue in class GCValuevalue - Value String for this instance.GCVException - thrown if value is doesn't not parse correctly.parseValue(java.lang.String)