com.novell.nds.dirxml.engine.gcv
Class GCSubordinates

java.lang.Object
  extended by com.novell.nds.dirxml.engine.gcv.GCValue
      extended by com.novell.nds.dirxml.engine.gcv.GCParent
          extended by com.novell.nds.dirxml.engine.gcv.GCSubordinates
All Implemented Interfaces:
GCOwner, ConfigElement

public class GCSubordinates
extends GCParent

Class representing a GCV subordinate section.

A GCV subordinate section is a group of related GCV definitions under a GCV group. The UI may conditionally display subordinate sections based on the value of the group leader. Whether a subordinate section is displayed or not is controlled by the "active-value" attribute of the subordinate section.

Although a GCV subordinate section is not an actual GCV, the objects are represented programmatically as GCValues for ease of manipulation via the GCDefinitions class.

See Also:
GCGroup

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
 
Fields inherited from class com.novell.nds.dirxml.engine.gcv.GCParent
cloning, 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 GCSubordinates(Element definition, GCOwner owner)
          Constructor for use by GCValue.construct() method.
protected GCSubordinates(String activeValue, GCOwner owner)
          Constructor for use by GCValue construct() method.
 
Method Summary
 GCValue cloneValue(String name)
          Clone this GCValue instance and return the cloned instance.
 String getActiveValue()
          Get the active-value for this subordinates group.
 void setActiveValue(String activeValue)
          Set the active-value for this subordinates section.
protected  boolean validateActiveValue()
          Validate the current active value against the current group leader.
 
Methods inherited from class com.novell.nds.dirxml.engine.gcv.GCParent
addName, appendValue, checkAllowedType, cloneCommon, getOwner, getValue, insertValue, insertValue, isNameAllowed, iterator, parseValue, removeName, removeValue, removeValue, replaceValue, setValue, shallowIterator
 
Methods inherited from class com.novell.nds.dirxml.engine.gcv.GCValue
addXmlComment, addXmlItems, addXmlProcessingInstruction, 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
 

Constructor Detail

GCSubordinates

protected GCSubordinates(String activeValue,
                         GCOwner owner)
                  throws GCVArgumentException
Constructor for use by GCValue construct() method.

Parameters:
activeValue - active-value value
owner - GCDefinitions instance that owns the subordinate section
Throws:
GCVArgumentException - thrown if name is invalid

GCSubordinates

protected GCSubordinates(Element definition,
                         GCOwner owner)
                  throws GCVException
Constructor for use by GCValue.construct() method.

Parameters:
definition - <group> element defining data.
owner - GCDefinitions instance that owns the group
Throws:
GCVException - thrown if XML is not complete or correct.
Method Detail

cloneValue

public GCValue cloneValue(String name)
Clone this GCValue instance and return the cloned instance.

Specified by:
cloneValue in class GCValue
Parameters:
the - name for the cloned value (ignored).
Returns:
the cloned instance

setActiveValue

public void setActiveValue(String activeValue)
                    throws GCVArgumentException
Set the active-value for this subordinates section. The value must not be null or empty.

Parameters:
activeValue - active-value
Throws:
GCVArgumentException - thrown is activeValue is incorrect.

getActiveValue

public String getActiveValue()
Get the active-value for this subordinates group.

Returns:
active-value

validateActiveValue

protected boolean validateActiveValue()
Validate the current active value against the current group leader.

Returns:
true if active value is valid.