com.novell.nds.dirxml.engine.gcv
Interface GCOwner

All Known Implementing Classes:
EngineControls, GCDefinitions, GCGroup, GCParent, GCStructuredValue.Instance, GCStructuredValue.Template, GCSubordinates, JobParams, ResourceParams, ShimParams

public interface GCOwner

Interface for objects that "own" control values.


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.
 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 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)
           
 Iterator shallowIterator()
          Return an Iterator instance that can be used to iterate through the list of GCVs.
 

Method Detail

appendValue

void appendValue(GCValue value)
                 throws GCVArgumentException
Add a GCV to the end of the current list of GCVs.

Parameters:
value - GCValue object to add.
Throws:
GCVArgumentException - thrown if value has the same name as a GCV already in the list.

insertValue

void insertValue(GCValue newValue,
                 String insertionPoint)
                 throws GCVArgumentException
Insert a GCV into the current list of GCVs.

Parameters:
newValue - GCValue object to add.
insertionPoint - name of GCV in front of which newValue is to be inserted.
Throws:
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.

insertValue

void insertValue(GCValue newValue,
                 GCValue insertionPoint)
                 throws GCVArgumentException
Insert a GCV into the current list of GCVs.

Parameters:
newValue - GCValue object to add.
insertionPoint - GCV in front of which newValue is to be inserted.
Throws:
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.

replaceValue

void replaceValue(GCValue newValue,
                  GCValue oldValue)
                  throws GCVArgumentException
Throws:
GCVArgumentException

removeValue

boolean removeValue(String name)
Remove a GCV from the list of GCVs.

Parameters:
name - name of GCV to remove.
Returns:
true if name was found and removed, false otherwise.

removeValue

boolean removeValue(GCValue value)
Remove a GCV from the list of GCVs.

Parameters:
value - the GCV to remove.
Returns:
true if the GCV was found and removed, false otherwise.

iterator

Iterator iterator()
Return an 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.

Returns:
an Iterator instance.
See Also:
shallowIterator()

shallowIterator

Iterator shallowIterator()
Return an 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.

Returns:
an Iterator instance.
See Also:
iterator()

isNameAllowed

boolean isNameAllowed(String name)
Check to see if a name is allowed.

Parameters:
name - the name to check
Returns:
true or false

addName

void addName(GCValue newValue)
             throws GCVArgumentException
Add a name to the defsList map. This is designed to be called from GCParent.

Parameters:
newValue - new GCValue
Throws:
GCVArgumentException

removeName

void removeName(GCValue oldValue)
Remove a name from the defsList map. This is designed to be called from GCParent.

Parameters:
oldValue - GCValue being removed.

checkAllowedType

boolean checkAllowedType(int type)
Check whether or not a particular Control Value type is allowed in this collection of GCVs.

Classes derived from GCDefinitions (e.g., ShimParams) may allow more or fewer types.

Parameters:
type - GCValue.TYPE_STRING, etc.
Returns:
true if allowed, false otherwise