|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.novell.nds.dirxml.engine.gcv.GCValue
com.novell.nds.dirxml.engine.gcv.GCParent
public class GCParent
Base class for 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.
| Field Summary | |
|---|---|
protected List |
defsList
|
protected Map |
defsMap
|
protected GCDefinitions |
owner
|
| 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_SUBORDINATES |
| Constructor Summary | |
|---|---|
protected |
GCParent(int type,
Element definition,
GCDefinitions owner)
Constructor for use by GCValue.construct() method. |
protected |
GCParent(int type,
GCDefinitions owner)
Constructor for use by GCValue construct() method. |
| Method Summary | |
|---|---|
void |
appendValue(GCValue value)
Add a GCV to the end of the current list of GCVs. |
GCDefinitions |
getOwner()
Return the GCDefinitions instance that owns this instance. |
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,
String insertionPoint)
Insert a GCV into the current list of GCVs. |
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 "password-ref" GCVs. |
boolean |
removeValue(GCValue value)
Remove a GCV from the list of GCVs. |
boolean |
removeValue(String name)
Remove a GCV from the list of GCVs. |
void |
setValue(String value)
Set the value for this instance. |
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 |
|---|
construct, construct, constructGCVRef, constructGroup, constructHeader, constructSubordinates, getDescription, getDescriptionRef, getDisplayName, getDisplayNameRef, getHidden, getName, getType, getTypeString, getXMLValue, hasBeenModified, localize, resetModified, setDescription, setDescriptionRef, setDisplayName, setDisplayNameRef, setHidden, toXML, typeFromString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map defsMap
protected List defsList
protected GCDefinitions owner
| Constructor Detail |
|---|
protected GCParent(int type,
GCDefinitions owner)
throws GCVArgumentException
GCValue construct() method.
type - int value of derived class
GCVArgumentException - thrown if name is invalid
protected GCParent(int type,
Element definition,
GCDefinitions 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.| Method Detail |
|---|
public GCDefinitions getOwner()
GCDefinitions instance that owns this instance.
public void appendValue(GCValue value)
throws GCVArgumentException
value - GCValue object to add.
GCVArgumentException - thrown if value has the same
name as a GCV already in the list.
public void insertValue(GCValue newValue,
String insertionPoint)
throws GCVArgumentException
newValue - 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
newValue - 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 boolean removeValue(String name)
name - name of GCV to remove.
true if name was found and removed,
false otherwise.public boolean removeValue(GCValue value)
value - the GCV to remove.
true if the GCV was found and removed,
false otherwise.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.
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.
Iterator instance.iterator()
public void parseValue(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 parse
GCVException - thrown if value does not match "password-ref" 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 GCValuevalue - 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 | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||