|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.nds.dirxml.engine.gcv.GCValue
com.novell.nds.dirxml.engine.gcv.GCStructuredValue
public class GCStructuredValue
Class representing "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.
Nested Class Summary | |
---|---|
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 . |
Nested classes/interfaces inherited from class com.novell.nds.dirxml.engine.gcv.GCValue |
---|
GCValue.IllegalCloneStateException, GCValue.XmlComment, GCValue.XmlItem, GCValue.XmlProcessingInstruction |
Field Summary | |
---|---|
static String |
DEFAULT_INSTANCE_SEPARATOR
The default value for the instance separator used when converting a GCStructuredValue
to a string. |
static String |
DEFAULT_VALUE_SEPARATOR
The default value for the value separator used when converting a GCStructuredValue
to a string. |
protected List |
instances
|
protected GCOwner |
owner
|
protected GCStructuredValue.Template |
template
|
Fields inherited from class com.novell.nds.dirxml.engine.gcv.GCValue |
---|
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 |
Method Summary | |
---|---|
GCStructuredValue.Instance |
addInstance()
Add an Instance to this structured value. |
protected void |
appendInstance(GCStructuredValue.Instance newInstance)
Add an instance to this GCStructuredValue. |
GCValue |
cloneValue(String name)
Clone this GCValue instance and return the cloned instance. |
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 . |
String |
getValue()
Return the current value of this instance as a delimited string. |
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. |
Iterator |
instanceIterator()
Return an Iterator that returns all Instance values in this
GCStructuredValue . |
Iterator |
iterator()
Return an Iterator instance that can be used to iterate
through all descendant GCVs. |
void |
parseValue(String value)
Parse the passed value based on the type lexical rules for "structured" GCVs. |
void |
setInstanceSeparator(String newSeparator)
Set the character(s) used to separate instances when the structured value is converted to a string. |
void |
setValue(String value)
Set the value for this instance. |
void |
setValueSeparator(String newSeparator)
Set the character(s) used to separate individual instance values when the structured value is converted to a string. |
Iterator |
shallowIterator()
Return an Iterator instance that can be used to iterate
through the list of GCVs. |
Methods inherited from class com.novell.nds.dirxml.engine.gcv.GCValue |
---|
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, typeFromString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_VALUE_SEPARATOR
GCStructuredValue
to a string.
public static final String DEFAULT_INSTANCE_SEPARATOR
GCStructuredValue
to a string.
protected GCOwner owner
protected GCStructuredValue.Template template
protected List instances
Method Detail |
---|
public GCValue cloneValue(String name)
GCValue
instance and return the cloned instance.
cloneValue
in class GCValue
the
- name for the cloned value.
protected void appendInstance(GCStructuredValue.Instance newInstance)
newInstance
- the Instance to add.public String getValueSeparator()
String
.
public void setValueSeparator(String newSeparator)
String
is null
then
DEFAULT_VALUE_SEPARATOR
is used.
newSeparator
- the separator characterspublic String getInstanceSeparator()
String
.
public void setInstanceSeparator(String newSeparator)
String
is null
then
DEFAULT_INSTANCE_SEPARATOR
is used.
newSeparator
- the separator characterspublic GCOwner getOwner()
getOwner
in class GCValue
null
)public GCStructuredValue.Template getTemplate()
GCStructureValue
instance's Template
.
Template
public Iterator instanceIterator()
Iterator
that returns all Instance
values in this
GCStructuredValue
.
Iterator
public GCStructuredValue.Instance addInstance() throws GCVStateException
IllegalStateException
- if a maximum number of instances is set on the template
and adding an instance would exceed the maximum.
GCVStateException
public 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 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 called
hasBeenModified
in interface ConfigElement
hasBeenModified
in class GCValue
true
or false
GCValue.resetModified()
public void parseValue(String value) throws GCVException
"structured"
GCVs.
parseValue
in class GCValue
value
- Value String
to parse
GCVException
- thrown if value does not match "structured"
constraints.public String getValue()
getValue
in class GCValue
public void setValue(String value) throws GCVException
The passed value must conform to the rules noted under parseValue()
.
setValue
in class GCValue
value
- Value String
for this instance.
GCVException
- thrown if value is doesn't not parse correctly.parseValue(java.lang.String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |