|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.novell.admin.ns.SchemaDefinition
com.novell.admin.ns.nds.NDSSchemaDefinition
This class models the entire NDS schema.
All schema modifications should be made through this class. Cloned instances of this class can only be used for modeling. The only instance of this class that will result in actual NDS changes must be retrieved from the NDSSchema class.
Schema.getSchemaDefinition(),
Serialized Form| Field Summary |
| Fields inherited from class com.novell.admin.ns.SchemaDefinition |
aliasAttributeNames, aliasClassNames, attributes, classes, expandedClasses, namespace, objectTypeCache |
| Constructor Summary | |
NDSSchemaDefinition(Schema schema,
NamespaceSnapin ns)
Constructor. |
|
| Method Summary | |
void |
addAttributeDefinition(AttributeDefinition attrDef)
Shortcut method to add AttributeDefinitions to the attribute hash table. |
void |
addClassDefinition(ClassDefinition classDef)
Shortcut method to add ClassDefinitions to the classes hashtable. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a property change listener. |
void |
addVetoableChangeListener(java.beans.VetoableChangeListener l)
Adds a change listener that can be vetoed. |
java.lang.Object |
clone()
Creates an exact duplicate of this schema definition object. |
void |
generateExpandedDefinitions()
Takes the set of unexpanded class definitions and creates a Hashmap of expanded class definitions. |
NDSClassDefinition |
getUnexpandedClassDefinition(java.lang.String className)
Deprecated. Use SchemaDefinition.getRawClassDefinition() which returns the more generic ClassDefinition object. |
void |
putAttributeDefinition(AttributeDefinition attributeDef)
Adds a new attribute definition to the schema. |
void |
putClassDefinition(ClassDefinition classDef)
Adds a new class definition to the schema or replaces an existing definition with another. |
void |
refreshSchema()
Forces the entire schema to be re-read from NDS. |
void |
removeAttributeDefinition(java.lang.String attrName)
Removes an attribute definition from the schema. |
void |
removeClassDefinition(java.lang.String className)
Removes a class definition from the schema. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a property change listener. |
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener l)
Removes a change listener that can be vetoed. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NDSSchemaDefinition(Schema schema,
NamespaceSnapin ns)
This constructor should NOT be used by applications. Applications should get the schema definition from the Schema Service implementation class.
schema - The NDS Schema Service class that factoried this.| Method Detail |
public void addAttributeDefinition(AttributeDefinition attrDef)
attrDef - The AttributeDefinition to put in the hashtable.public void addClassDefinition(ClassDefinition classDef)
classDef - The ClassDefinitions to put in the hashtable.public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l - The listener.public void addVetoableChangeListener(java.beans.VetoableChangeListener l)
l - The listener.public java.lang.Object clone()
One side-effect of cloning is that no changes will ever be committed to NDS. Only the original definition object will cause changes to NDS. This allows for a "sandbox" metaphor.
clone in class SchemaDefinition
public void generateExpandedDefinitions()
throws NamespaceException
Expanded definitions contain all the inherited attributes and rules as opposed to just those defined by the immediate class. The inherited information includes: Superclasses Mandatory attributes Optional attributes Containmenet classes Naming attributes
NamespaceException - Class not defined in schema.
public NDSClassDefinition getUnexpandedClassDefinition(java.lang.String className)
throws NamespaceException
A class in raw form lists only those attribute and class rules specified directly by the class, not the inherited ones.
className - The name of the class to look up.
NamespaceException - Class is not defined.
public void putAttributeDefinition(AttributeDefinition attributeDef)
throws NamespaceException,
SPIException,
java.beans.PropertyVetoException
If this instance is an original, changes will be committed to NDS.
attributeDef - The new attribute definition.
NDSNamespaceException - Thrown when an existing attribute cannot be modified.
SPIException - Service provider threw an exception.
java.beans.PropertyVetoException - Thrown if someone vetoes the change.
NamespaceException
public void putClassDefinition(ClassDefinition classDef)
throws NamespaceException,
SPIException,
java.beans.PropertyVetoException
If this instance is an original, changes will be committed to NDS.
classDef - The new class definition (unexpanded form).
NamespaceException - Thrown when an attribute or superclass is not defined.
SPIException - The service provider threw an exception.
java.beans.PropertyVetoException - Thrown if someone vetoes the change.
public void refreshSchema()
throws java.beans.PropertyVetoException
java.beans.PropertyVetoException - Thrown if someone vetoes the change.
public void removeAttributeDefinition(java.lang.String attrName)
throws NamespaceException,
SPIException,
java.beans.PropertyVetoException
If this instance is an original, the deletion will be committed to NDS.
attrName - The name of the attribute to be removed.
NamespaceException - Thrown if the attribute is in use by a schema class.
SPIException - The service provider threw an exception.
java.beans.PropertyVetoException - Thrown if someone vetoes the change.
public void removeClassDefinition(java.lang.String className)
throws NamespaceException,
SPIException,
java.beans.PropertyVetoException
If this instance is an original, the deletion will be committed to NDS.
className - The name of the class that is to be removed.
NamespaceException - Thrown if the class is in use by another schema class or
the class is not defined.
SPIException - The service provider threw an exception.
java.beans.PropertyVetoException - Thrown if someone vetoes the change.public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l - The listener.public void removeVetoableChangeListener(java.beans.VetoableChangeListener l)
l - The listener.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||