|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.admin.ns.ValueComponent
com.novell.admin.ns.ValueList
Storage for all composite syntax types.
This class is used to store syntaxes that are composed of more than one atomic type, even of the same type. This class is mutable and generates PropertyChangeEvents when any change occurs.
Constructor Summary | |
ValueList(Syntax syn)
Constructs a ValueList object. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a property change listener. |
boolean |
canInsertComponent(ValueComponent comp)
Determines if this a specific typed of ValueComponent can be inserted into this ValueList. |
boolean |
canRemoveComponent(ValueComponent comp)
Tests to determine if a specific ValueComponent can be removed from this list. |
java.lang.Object |
clone()
Creates an exact duplicate of this ValueList. |
boolean |
contains(ValueComponent comp)
Determines if the current list contains a specific ValueComponent. |
java.lang.Object |
createFacade()
Returns the facade for this value list. |
int |
getComponentCount()
Returns the number of components in the list. |
java.util.Enumeration |
getComponents()
Returns an Enumeration of the ValueComponents in the list. |
ValueComponent |
getElementAt(int index)
Returns a ValueComponent located at a specific location in the list. |
ValueList |
getRootListClone()
ObjectAttribute calls this to get the old value component for the root list. |
int |
indexOf(ValueComponent comp)
Returns the index of a specific ValueComponent in the list. |
void |
initList(ValueComponent comp)
Shortcut method used to populate the list with ValueComponents. |
boolean |
insertComponent(ValueComponent comp)
Inserts a ValueComponent at the end of this list. |
boolean |
insertComponentAt(ValueComponent comp,
int index)
Inserts a ValueComponent into a specific position in this list. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Handles property change notification from subordinate ValueLists. |
boolean |
removeComponent(ValueComponent comp)
Removes a specific ValueComponent from this list. |
boolean |
removeComponentAt(int index)
Removes a ValueComponent from a specific position. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a property change listener. |
boolean |
replaceComponent(ValueComponent oldComp,
ValueComponent newComp)
Replaces a specific ValueComponent with another. |
boolean |
replaceComponentAt(ValueComponent newComp,
int index)
Replaces a specific ValueComponent with another. |
void |
setListAsRoot()
Sets the current list as the root ValueList. |
Methods inherited from class com.novell.admin.ns.ValueComponent |
compareTo, equals, getSyntax, isWithinBounds, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ValueList(Syntax syn)
syn
- The syntax associated with this list.Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener being added.public boolean canInsertComponent(ValueComponent comp)
comp
- ValueComponent to test.
public boolean canRemoveComponent(ValueComponent comp)
comp
- The ValueComponent to test.
public java.lang.Object clone()
public boolean contains(ValueComponent comp)
comp
- The component to check for.
public java.lang.Object createFacade()
public int getComponentCount()
public java.util.Enumeration getComponents()
public ValueComponent getElementAt(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- The index of the specific item in the list.
java.lang.ArrayIndexOutOfBoundsException
- Thrown when the index is not in the value list.public ValueList getRootListClone()
This is used as the oldComponent for changes made in this value list.
public int indexOf(ValueComponent comp)
comp
- The component to return.
public void initList(ValueComponent comp)
This method does not check for compatibility and does not notify listeners. This should be called only by syntax strategies. Applications should not call this method directly.
comp
- The ValueComponent to insert into the list.public boolean insertComponent(ValueComponent comp)
comp
- The ValueComponent to insert.
public boolean insertComponentAt(ValueComponent comp, int index) throws java.lang.ArrayIndexOutOfBoundsException
comp
- The ValueComponent to insert.
java.lang.ArrayIndexOutOfBoundsException
- index is not in the value list.public void propertyChange(java.beans.PropertyChangeEvent event)
ValueLists are registered as listeners to subordinate value lists. If subordinate value lists are modified, the current ValueList is notified. Values are not mutable, so Value objects do not return events.
propertyChange
in interface java.beans.PropertyChangeListener
event
- The event that caused a property change to occur.public boolean removeComponent(ValueComponent comp)
comp
- The ValueComponent to remove.
public boolean removeComponentAt(int index)
This method should only be used on syntaxes with optional components at the end, such as NameAndUID. It does not call the canRemoveComponent() check.
index
- The index of the ValueComponent to remove.
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener being removed.public boolean replaceComponent(ValueComponent oldComp, ValueComponent newComp)
This is the only way to modify a ValueList when individual values cannot be removed or inserted.
oldComp
- The ValueComponent to be replacednewComp
- The replacement ValueComponent.
public boolean replaceComponentAt(ValueComponent newComp, int index) throws java.lang.ArrayIndexOutOfBoundsException
This is the only way to modify a ValueList when individual values cannot be removed or inserted.
newComp
- The replacement ValueComponent.index
- The location of the component to replace.
java.lang.ArrayIndexOutOfBoundsException
- Thrown when the index is not in the value list.public void setListAsRoot()
An ObjectAttribute calls this method to indicate this is the top-most top ValueList. This is used as the oldComponent for changes made in this value list.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |