public abstract class GCParent extends GCValue implements GCOwner
GCGroup and GCSubordinates classes. Manages child values.
Although groups and subordinates are not actual GCVs, the objects are represented programmatically as GCValues for ease of manipulation via the GCDefinitions class.
GCValue.IllegalCloneStateException, GCValue.XmlComment, GCValue.XmlItem, GCValue.XmlProcessingInstruction| Modifier and Type | Field and Description |
|---|---|
protected boolean |
cloning |
protected GCOwner |
owner |
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 | Constructor and Description |
|---|---|
protected |
GCParent(int type,
org.w3c.dom.Element definition,
GCOwner owner)
Constructor for use by
GCValue.construct() method. |
protected |
GCParent(int type,
GCOwner owner)
Constructor for use by
GCValue construct() method. |
| Modifier and Type | Method and Description |
|---|---|
void |
addName(GCValue newValue)
Add a name to the defsList map.
|
void |
appendValue(GCValue value)
Add a GCV to the end of the current list of GCVs.
|
boolean |
checkAllowedType(int type)
Check whether or not a particular Control Value type is allowed in this collection of
GCVs.
|
protected void |
cloneCommon(GCValue newValue)
Helper function for derived classes to implement
cloneValue. |
GCOwner |
getOwner()
Return the
GCDefinitions instance that owns this instance. |
java.lang.String |
getValue()
Return the current value of this instance.
|
void |
insertValue(GCValue newValue,
GCValue insertionPoint)
Insert a GCV into the current list of GCVs.
|
void |
insertValue(GCValue newValue,
java.lang.String insertionPoint)
Insert a GCV into the current list of GCVs.
|
boolean |
isNameAllowed(java.lang.String name)
Check to see if a name is allowed.
|
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 "password-ref" GCVs.
|
void |
removeName(GCValue oldValue)
Remove a name from the defsList map.
|
boolean |
removeValue(GCValue value)
Remove a GCV from the list of GCVs.
|
boolean |
removeValue(java.lang.String name)
Remove a GCV from the list of GCVs.
|
void |
replaceValue(GCValue newValue,
GCValue oldValue) |
void |
setValue(java.lang.String value)
Set the value for this instance.
|
java.util.Iterator |
shallowIterator()
Return an
Iterator instance that can be used to iterate
through the list of GCVs. |
addXmlComment, addXmlItems, addXmlProcessingInstruction, cloneValue, construct, construct, constructGCVRef, constructGCVRef, constructGroup, constructHeader, constructStructuredValue, constructSubordinates, getDescription, getDescriptionRef, getDisplayName, getDisplayNameRef, getHidden, getMandatory, getName, getParent, getType, getTypeString, getXmlItemsIterator, getXMLValue, hasBeenModified, localize, resetModified, setDescription, setDescriptionRef, setDisplayName, setDisplayNameRef, setHidden, setMandatory, toXML, typeFromStringprotected GCOwner owner
protected boolean cloning
protected GCParent(int type,
GCOwner owner)
throws GCVArgumentException
GCValue construct() method.type - int value of derived classGCVArgumentException - thrown if name is invalidprotected GCParent(int type,
org.w3c.dom.Element definition,
GCOwner owner)
throws GCVException
GCValue.construct() method.type - int value of derived classdefinition - <group> or <subordinates> element defining data.owner - GCDefinitions instance that owns the GCParent. Must not be null.GCVException - thrown if XML is not complete or
correct.protected void cloneCommon(GCValue newValue)
cloneValue.
Clones data common to all GCValue instances.cloneCommon in class GCValuenewValue - the value to which to copypublic GCOwner getOwner()
GCDefinitions instance that owns this instance.public void appendValue(GCValue value) throws GCVArgumentException
appendValue in interface GCOwnervalue - GCValue object to add.GCVArgumentException - thrown if value has the same
name as a GCV already in the list.public void insertValue(GCValue newValue, java.lang.String insertionPoint) throws GCVArgumentException
insertValue in interface GCOwnernewValue - GCValue object to add.insertionPoint - name of GCV in front of which newValue is to
be inserted.GCVArgumentException - thrown if insertionPoint doesn't match the
name of any GCV in the list, or if the name of newValue matches the
name of a GCV already in the list.public void insertValue(GCValue newValue, GCValue insertionPoint) throws GCVArgumentException
insertValue in interface GCOwnernewValue - GCValue object to add.insertionPoint - GCV in front of which newValue is to
be inserted.GCVArgumentException - thrown if insertionPoint doesn't appear in
the list, or if the name of newValue matches the
name of a GCV already in the list.public void replaceValue(GCValue newValue, GCValue oldValue) throws GCVArgumentException
replaceValue in interface GCOwnerGCVArgumentExceptionpublic boolean removeValue(java.lang.String name)
removeValue in interface GCOwnername - name of GCV to remove.true if name was found and removed,
false otherwise.public boolean removeValue(GCValue value)
removeValue in interface GCOwnervalue - the GCV to remove.true if the GCV was found and removed,
false otherwise.public boolean isNameAllowed(java.lang.String name)
isNameAllowed in interface GCOwnername - the name to checktrue or falsepublic void addName(GCValue newValue) throws GCVArgumentException
GCParent.addName in interface GCOwnernewValue - new GCValueGCVArgumentExceptionpublic void removeName(GCValue oldValue)
GCParent.removeName in interface GCOwneroldValue - GCValue being removed.public 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.
iterator in interface GCOwnerIterator 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.
shallowIterator in interface GCOwnerIterator instance.iterator()public boolean checkAllowedType(int type)
Classes derived from GCDefinitions (e.g., ShimParams) may allow more or
fewer types.
checkAllowedType in interface GCOwnertype - GCValue.TYPE_STRING, etc.true if allowed, false otherwisepublic void parseValue(java.lang.String value)
throws GCVException
The passed value must match the production described in the description of this class.
parseValue in class GCValuevalue - Value String to parseGCVException - thrown if value does not match "password-ref" 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)