|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.novell.admin.ns.NSObject
com.novell.admin.ns.DefaultNSObject
Memory model for objects stored in a namespace.
This model is provided for applications to access and modify all elements associated with a directory object. Elements such as attributes, flags, and schema for an object should be retrieved using this class.
This class reads all attributes of an object into memory. It was designed for property books where one generally needs all the attributes. It's an expensive class to use if one only needs to read or modify a few attributes of an object.
| Field Summary | |
protected java.util.Hashtable |
addedAttributeDefinitions
Running list of newly added attribute definitions. |
protected AdminNamespace |
namespace
Namespace that can be used to get class definition |
protected ObjectEntry |
objectEntry
The associated ObjectEntry. |
| Fields inherited from class com.novell.admin.ns.NSObject |
addedAttributes, attributes, classDefinition, deletedAttributes, modifiedAttributes, propertyListeners, revision |
| Constructor Summary | |
protected |
DefaultNSObject(ObjectEntry objEntry,
java.util.Vector attributes,
long rev)
Constructor. |
| Method Summary | |
void |
addAttribute(ObjectAttribute attr)
Adds a newly valued attribute to the object. |
boolean |
addAuxiliaryClassDefinition(ClassDefinition classDef,
ObjectAttribute[] attrs)
Adds an auxiliary class Definition. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds this listener to the listener list for this object. |
protected void |
checkAdd(ObjectAttribute attr,
boolean isForAuxClass)
Checks to make sure an attribute can be added to this object. |
void |
clearAddedAttribute(java.lang.String attrName)
Removes an attribute from the attributes to add. |
void |
clearAddedAttributeDefinitions()
Removes an attribute from the attributes to add. |
void |
clearDeletedAttribute(java.lang.String attrName)
Removes an attribute from the attributes to delete. |
void |
clearModifiedAttribute(java.lang.String attrName)
Removes an attribute from the attributes to modify. |
NSObject |
clone(ObjectEntry newIdentity)
Creates an exact duplicate of this NSObject but gives it a new identity. |
boolean |
deleteAttribute(java.lang.String attrName)
Deletes a currently valued attribute of this object. |
boolean |
deleteAuxiliaryClassDefinition(ClassDefinition classDef)
Deletes an auxiliary class definition. |
java.util.Hashtable |
getAddedAttributeDefinitions()
Retrieves the attributes that have been added to the object. |
java.lang.String[] |
getAddedAttributes()
Retrieves the attributes that have been added to the object. |
ObjectAttribute |
getAttribute(java.lang.String attrName)
Retrieves a specific attribute of this object. |
java.lang.String[] |
getAttributes()
Retrieves the names of the valued attributes of the object. |
ClassDefinition[] |
getClassDefinitions()
Retrieves the schema class definition for the object. |
java.lang.String[] |
getDeletedAttributes()
Retrieves the attributes that have been deleted from the object. |
java.lang.String[] |
getMandatoryAttributes()
Retrieves the mandatory attributes of the object. |
java.lang.String[] |
getModifiedAttributes()
Retrieves the attributes that have been modified in the object. |
ObjectEntry |
getObjectEntry()
Retrieves the object entry representation of the object. |
java.lang.String[] |
getOptionalAttributes()
Retrieves the optional attributes of the object. |
long |
getRevision()
Retrieves the revision of the object. |
java.lang.String[] |
getUnvaluedAttributes()
Retrieves the names of the attributes that are not valued. |
boolean |
isAttributeMandatory(java.lang.String attrName)
Checks to see if a particular attribute is mandatory for the Object Entry's schema class or its associated auxiliary classes. |
boolean |
isAttributeOptional(java.lang.String attrName)
Checks to see if a particular attribute is optional for the Object Entry's schema class or its associated auxiliary classes. |
boolean |
isNamedBy(java.lang.String attrName)
Checks to see if a particular attribute is a naming for the Object Entry's schema class or its associated auxiliary classes. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Callback for attribute modifications. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes this listener from the listener list for this object. |
protected void |
setClassDefinition()
Sets the class definition for this object. |
| Methods inherited from class com.novell.admin.ns.NSObject |
clone |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Hashtable addedAttributeDefinitions
protected AdminNamespace namespace
protected ObjectEntry objectEntry
| Constructor Detail |
protected DefaultNSObject(ObjectEntry objEntry,
java.util.Vector attributes,
long rev)
objEntry - The object entry representation.attributes - Vector of ObjectAttributes or Strings if the attributes
are to be read later.rev - revision number of the object.| Method Detail |
public void addAttribute(ObjectAttribute attr)
throws NamespaceException
addAttribute in class NSObjectattr - The valued attribute to be added.
NamespaceException - Thrown when a condition occurs that disallowed the add.
This may be one of the following conditions.
public boolean addAuxiliaryClassDefinition(ClassDefinition classDef,
ObjectAttribute[] attrs)
throws NamespaceException
addAuxiliaryClassDefinition in class NSObjectclassDef - The class definition to add.attrs - The attributes to add.
The only attributes that will be added are those that are not currently valued. If attributes are valued, please modify the value instead of trying to add the attribute.
NamespaceException - NamespaceException.MISSING_MANDATORY_ATTRIBUTE
NamespaceException - NamespaceException.NOT_AUXILIARY_CLASS
NamespaceException - NamespaceException.CLASS_NOT_DEFINEDpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener in class NSObjectlistener - The listener to be added.protected void checkAdd(ObjectAttribute attr,
boolean isForAuxClass)
throws NamespaceException
attr - The name of the attribute.isForAuxClass - Attribute is being added due to an Aux class association.
NamespaceException - Can not add the attribute to this object.public void clearAddedAttribute(java.lang.String attrName)
clearAddedAttribute in class NSObjectattrName - The valued attribute to be removed from the add list.public void clearAddedAttributeDefinitions()
public void clearDeletedAttribute(java.lang.String attrName)
clearDeletedAttribute in class NSObjectattrName - The valued attribute to be removed from the delete list.public void clearModifiedAttribute(java.lang.String attrName)
clearModifiedAttribute in class NSObjectattrName - The valued attribute to be removed from the modify list.public NSObject clone(ObjectEntry newIdentity)
throws NamespaceException
clone in class NSObjectnewIdentity - The ObjectEntry whose identity is assumed.
NamespaceException - NamespaceException.OBJECTTYPE_NOT_VALID is
thrown if the newIdentity's type is different from this.public boolean deleteAttribute(java.lang.String attrName)
throws NamespaceException
deleteAttribute in class NSObjectattrName - The attribute to be deleted from the object.
NamespaceException - A condition occured which disallowed the delete:
public boolean deleteAuxiliaryClassDefinition(ClassDefinition classDef)
throws NamespaceException
deleteAuxiliaryClassDefinition in class NSObjectclassDef - The class definition to be deleted.
NamespaceException - NamespaceException.NOT_AUXILIARY_CLASS
NamespaceException - NamespaceException.CLASS_NOT_DEFINEDpublic java.util.Hashtable getAddedAttributeDefinitions()
public java.lang.String[] getAddedAttributes()
getAddedAttributes in class NSObjectpublic ObjectAttribute getAttribute(java.lang.String attrName)
getAttribute in class NSObjectattrName - The name of the attribute that is to be retrieved.
public java.lang.String[] getAttributes()
getAttributes in class NSObjectpublic ClassDefinition[] getClassDefinitions()
getClassDefinitions in class NSObjectpublic java.lang.String[] getDeletedAttributes()
getDeletedAttributes in class NSObjectpublic java.lang.String[] getMandatoryAttributes()
getMandatoryAttributes in class NSObjectpublic java.lang.String[] getModifiedAttributes()
getModifiedAttributes in class NSObjectpublic ObjectEntry getObjectEntry()
getObjectEntry in class NSObjectpublic java.lang.String[] getOptionalAttributes()
getOptionalAttributes in class NSObjectpublic long getRevision()
getRevision in class NSObjectpublic java.lang.String[] getUnvaluedAttributes()
getUnvaluedAttributes in class NSObjectpublic boolean isAttributeMandatory(java.lang.String attrName)
isAttributeMandatory in class NSObjectattrName - Name of the attribute to look for.
public boolean isAttributeOptional(java.lang.String attrName)
isAttributeOptional in class NSObjectattrName - Name of the attribute to look for.
public boolean isNamedBy(java.lang.String attrName)
isNamedBy in class NSObjectattrName - Name of the attribute to look for.
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange in interface java.beans.PropertyChangeListenerevent - The property change event that was registered for.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener in class NSObjectlistener - The listener to be removed.protected void setClassDefinition()
setClassDefinition in class NSObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||