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

java.lang.Object
  extended bycom.novell.nds.dirxml.engine.gcv.GCValue
      extended bycom.novell.nds.dirxml.engine.gcv.GCParent
          extended bycom.novell.nds.dirxml.engine.gcv.GCSubordinates
All Implemented Interfaces:
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

Field Summary
 
Fields inherited from class com.novell.nds.dirxml.engine.gcv.GCParent
defsList, defsMap, 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 GCSubordinates(Element definition, GCDefinitions owner)
          Constructor for use by GCValue.construct() method.
protected GCSubordinates(String activeValue, GCDefinitions owner)
          Constructor for use by GCValue construct() method.
 
Method Summary
 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
appendValue, getOwner, getValue, insertValue, insertValue, iterator, parseValue, removeValue, removeValue, setValue, shallowIterator
 
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
 

Constructor Detail

GCSubordinates

protected GCSubordinates(String activeValue,
                         GCDefinitions 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,
                         GCDefinitions 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

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.