|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.novell.admin.ns.SchemaDefinition
com.novell.admin.ns.ldap.LDAPSchemaDefinition
This class models the entire LDAP schema.
All schema changes should be done 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 LDAP changes must be retrieved from the LDAPSchema class.
| Field Summary |
| Fields inherited from class com.novell.admin.ns.SchemaDefinition |
aliasAttributeNames, aliasClassNames, attributes, classes, expandedClasses, namespace, objectTypeCache |
| Constructor Summary | |
LDAPSchemaDefinition(LDAPschema schema,
NamespaceSnapin ns)
Constructor. |
|
| Method Summary | |
void |
addAttributeDefinition(AttributeDefinition attrDef)
Shortcut method to add an AttributeDefinition to the attribute hashmap. |
void |
addClassDefinition(ClassDefinition classDef)
Shortcut method to add a ClassDefinition to the classes hashmap. |
java.lang.Object |
clone()
Creates an exact duplicate of this object without doing a new. |
void |
generateExpandedDefinitions()
Takes the set of unexpanded class definitions and creates a Hashmap of expanded class definitions. |
void |
putAttributeDefinition(LDAPAttributeDefinition attributeDef)
Adds a new attribute definition to the schema. |
void |
putClassDefinition(LDAPClassDefinition classDef)
Adds a new class definition to the schema or replaces an existing definition with another. |
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. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LDAPSchemaDefinition(LDAPschema 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 LDAP Schema Service class that factoried this.| Method Detail |
public void addAttributeDefinition(AttributeDefinition attrDef)
attrDef - The AttributeDefinition to put in the hashmap.public void addClassDefinition(ClassDefinition classDef)
classDef - The unexpanded ClassDefinition to put in the hashmap.public java.lang.Object clone()
One side effect of cloning is that no changes will ever be committed to LDAP! Only the original definition object will cause changes to LDAP! This allows for a "sandbox" metaphor.
clone in class SchemaDefinitionpublic 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 void putAttributeDefinition(LDAPAttributeDefinition attributeDef)
throws SPIException
Changes will be committed to LDAP unless this object is a clone.
attributeDef - The new attribute definition.
SPIException - Service provider threw an exception.public void putClassDefinition(LDAPClassDefinition classDef)
throws NamespaceException,
SPIException
Changes will be committed to LDAP unless this object is a clone.
classDef - The new class definition (unexpanded form).
NamespaceException - Attribute or superclass not defined.
SPIException - Service provider threw an exception.public void removeAttributeDefinition(java.lang.String attrName)
throws NamespaceException,
SPIException
If this instance is an original, delete will be committed to LDAP.
attrName - The name of the attribute that is to be removed.
NamespaceException - Attribute invalid or in use by a schema class.
SPIException - Service provider threw an exception.public void removeClassDefinition(java.lang.String className)
throws NamespaceException,
SPIException
If this instance is an original, delete will be committed to LDAP.
className - The name of the class that is to be removed.
NamespaceException - Class in use by another schema class or
class not defined.
SPIException - Service provider threw an exception.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||