|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.novell.admin.ns.ObjectAttribute
Model for object attibutes that have associated values.
Inner Class Summary | |
class |
ObjectAttribute.ModifyValue
Model for a modified attribute value. |
Field Summary | |
protected java.util.Vector |
addedValues
|
protected AttributeDefinition |
attrDefinition
The attribute definition associated with this attribute. |
protected java.util.Vector |
deletedValues
|
protected java.util.Vector |
modifiedValues
|
protected java.util.Vector |
values
All values that are associated with this attribute. |
Constructor Summary | |
ObjectAttribute(AttributeDefinition attrDef)
Constructor that does not initialize its list of values. |
|
ObjectAttribute(AttributeDefinition attrDef,
ValueComponent[] comps)
Constructor that initializes its list of values. |
Method Summary | |
void |
addComponent(ValueComponent comp)
Adds a ValueComponent to this attribute. |
void |
addComponents(ValueComponent[] comp)
Adds a ValueComponent to this attribute. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
This method is used to register a listener for changes to this attribute. |
void |
clearAddedAttributeValues()
This method removes all the values intended to be added to this attribute. |
void |
clearDeletedAttributeValues()
This method removes all the values intended to be deleted from this attribute. |
void |
clearModifiedAttributeValues()
This method removes all the values intended to be modified for this attribute. |
java.lang.Object |
clone()
Creates an exact duplicate of this ObjectAttribute. |
boolean |
contains(ValueComponent comp)
Tests if the attribute contains a specifed ValueComponent. |
ValueComponent[] |
getAddedComponents()
Returns all value components added to this attribute. |
AttributeDefinition |
getAttributeDefinition()
Returns the associated attribute definition. |
ValueComponent[] |
getBeginingComponents()
Returns all value components at the initialization of this attribute. |
int |
getComponentCount()
Returns a count of all components associated with this attribute. |
ValueComponent[] |
getDeletedComponents()
Returns all value components deleted from this attribute. |
ObjectAttribute.ModifyValue[] |
getModifiedComponents()
Returns all value components modified in this attribute. |
java.lang.String |
getName()
Returns the name of this attribute. |
java.util.Enumeration |
getValueComponents()
Returns all components associated with this attribute. |
protected void |
notifyPropertyChangeListeners(java.beans.PropertyChangeEvent event)
Helper method that notifies all listeners of this attribute that the attribute has changed. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
This method is called when an property change event occurs. |
void |
removeAllComponents()
Removes all ValueComponents from this attribute if the attribute is not read-only. |
boolean |
removeComponent(ValueComponent comp)
Removes a specific ValueComponent from this attribute. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
This method is used to remove a listener from being notified when changes are made to this attribute. |
void |
replaceComponent(ValueComponent oldComp,
ValueComponent newComp)
Replaces one ValueComponent with another. |
void |
resetBeginingAttributeValues()
This method sets the initial values to the values intended for the attribue after the attribute update. |
java.lang.String |
toString()
Converts an attribute to a String. |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected AttributeDefinition attrDefinition
protected java.util.Vector values
protected java.util.Vector addedValues
protected java.util.Vector deletedValues
protected java.util.Vector modifiedValues
Constructor Detail |
public ObjectAttribute(AttributeDefinition attrDef)
Do not use this constructor if this is a read-only attribute because the attribute value(s) will not be initialized.
attrDef
- Attribute definition.public ObjectAttribute(AttributeDefinition attrDef, ValueComponent[] comps) throws NamespaceException
This constructor may be used for attributes including read-only. It ensures that only one value is added for single-valued attributes, as determined by the attribute syntax. This method also ensures that if the values are sized they will only be added to the attribute if they are within the limits. You should call getComponentCount to ensure that all ValueComponents were added because no error is returned when they are not added.
attrDef
- Attribute definition.comps
- Value(s) to put in the attribute.Method Detail |
public final void clearAddedAttributeValues()
This method is used by the namespace. When the values to add are written out the namespace calls this method to prevent the values from being added again on the next write.
public final void clearDeletedAttributeValues()
This method is used by the namespace. When the values to delete are written out the namespace calls this method to prevent the values from being deleted again on the next write.
public final void clearModifiedAttributeValues()
This method is used by the namespace. When the values to be modified are written out the namespace calls this method to prevent the values from being modified again on the next write.
public final void resetBeginingAttributeValues()
This method is used by the namespace. When the values are all written out this method sets the initial values to the current state of the attribute that exists after the write.
public boolean contains(ValueComponent comp)
comp
- ValueComponent to test for.public final AttributeDefinition getAttributeDefinition()
public void addComponent(ValueComponent comp) throws NamespaceException
This method may or may not add the specified ValueComponent to the attribute depending certain criteria. In order to successfully add a ValueComponent to this attribute the following criteria must be met:
comp
- The ValueComponent to be added.public void addComponents(ValueComponent[] comp) throws NamespaceException
This method may or may not add a specified ValueComponent to the attribute depending certain criteria. Id doesn't check for duplicate values in the ValueComponent array passed in. You should call getComponentCount to make sure all the ValueComponents were added because no error is returned when they aren't. In order to successfully add a ValueComponent to this attribute the following criteria must be met.
comp
- The ValueComponents to be added.One of the following conditions.
public void replaceComponent(ValueComponent oldComp, ValueComponent newComp) throws NamespaceException
A component can only be replaced under the following conditions:
oldComp
- A currently associated ValueComponent.newComp
- The replacement ValueComponent.public final ValueComponent[] getAddedComponents()
This method is used by the namespace to retrieve the values to add to the attribute when written out.
public final ValueComponent[] getBeginingComponents()
public final ValueComponent[] getDeletedComponents()
This method is used by the namespace to retrieve the values to be deleted from the attribute when it is written out.
public final ObjectAttribute.ModifyValue[] getModifiedComponents()
This method is used by the namespace to retrieve the values to be modified in the attribute when it is written out.
public java.util.Enumeration getValueComponents()
public int getComponentCount()
public java.lang.String toString()
public void removeAllComponents()
public boolean removeComponent(ValueComponent comp)
comp
- The specific ValueComponent to remove from this attribute.public final java.lang.String getName()
public java.lang.Object clone()
public void propertyChange(java.beans.PropertyChangeEvent event)
event
- The event.protected void notifyPropertyChangeListeners(java.beans.PropertyChangeEvent event)
event
- The event.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |