|
|||||||||
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 abstract 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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.novell.nds.dirxml.engine.gcv.GCValue |
---|
GCValue.IllegalCloneStateException, GCValue.XmlComment, GCValue.XmlItem, GCValue.XmlProcessingInstruction |
Field Summary | |
---|---|
protected boolean |
cloning
|
protected GCOwner |
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_STRUCTURED, TYPE_SUBORDINATES, xmlItems |
Constructor Summary | |
---|---|
protected |
GCParent(int type,
Element definition,
GCOwner owner)
Constructor for use by GCValue.construct() method. |
protected |
GCParent(int type,
GCOwner owner)
Constructor for use by GCValue construct() method. |
Method Summary | |
---|---|
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. |
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. |
boolean |
isNameAllowed(String name)
Check to see if a name is allowed. |
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. |
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(String name)
Remove a GCV from the list of GCVs. |
void |
replaceValue(GCValue newValue,
GCValue oldValue)
|
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 |
---|
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, typeFromString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected GCOwner owner
protected boolean cloning
Constructor Detail |
---|
protected GCParent(int type, GCOwner owner) throws GCVArgumentException
GCValue
construct()
method.
type
- int value of derived class
GCVArgumentException
- thrown if name is invalidprotected GCParent(int type, 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.Method Detail |
---|
protected void cloneCommon(GCValue newValue)
cloneValue
.
Clones data common to all GCValue
instances.
cloneCommon
in class GCValue
newValue
- the value to which to copypublic GCOwner getOwner()
GCDefinitions
instance that owns this instance.
getOwner
in class GCValue
public void appendValue(GCValue value) throws GCVArgumentException
appendValue
in interface GCOwner
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
insertValue
in interface GCOwner
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
insertValue
in interface GCOwner
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 void replaceValue(GCValue newValue, GCValue oldValue) throws GCVArgumentException
replaceValue
in interface GCOwner
GCVArgumentException
public boolean removeValue(String name)
removeValue
in interface GCOwner
name
- name of GCV to remove.
true
if name
was found and removed,
false
otherwise.public boolean removeValue(GCValue value)
removeValue
in interface GCOwner
value
- the GCV to remove.
true
if the GCV was found and removed,
false
otherwise.public boolean isNameAllowed(String name)
isNameAllowed
in interface GCOwner
name
- the name to check
true
or false
public void addName(GCValue newValue) throws GCVArgumentException
GCParent
.
addName
in interface GCOwner
newValue
- new GCValue
GCVArgumentException
public void removeName(GCValue oldValue)
GCParent
.
removeName
in interface GCOwner
oldValue
- GCValue
being removed.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
in interface GCOwner
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.
shallowIterator
in interface GCOwner
Iterator
instance.iterator()
public boolean checkAllowedType(int type)
Classes derived from GCDefinitions
(e.g., ShimParams
) may allow more or
fewer types.
checkAllowedType
in interface GCOwner
type
- GCValue.TYPE_STRING
, etc.
true
if allowed, false
otherwisepublic void parseValue(String value) throws GCVException
The passed value must match the production described in the description of this class.
parseValue
in class GCValue
value
- 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 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 | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |