public final class LDAPSchemaDefinition extends SchemaDefinition
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.
aliasAttributeNames, aliasClassNames, attributes, classes, expandedClasses, namespace, objectTypeCache| Constructor and Description |
|---|
LDAPSchemaDefinition(LDAPschema schema,
NamespaceSnapin ns)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
aclScopes()
Return the available scopes for the NVDS ACL syntax.
|
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 |
reconfigureContainerClasses(java.util.HashSet hs)
Internal function to reconfigure all container class flags using
structure rule information.
|
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.
|
canContain, clearAttributes, clearClasses, clearObjectTypeCache, getAttributeDefinition, getAttributeDefinitions, getAuxiliaryClassDefinitions, getClassDefinition, getClassDefinitions, getClassesUsingAttribute, getContainmentClasses, getEffectiveClasses, getMandatoryAttributes, getNamingAttributes, getNumberOfAttributes, getNumberOfClasses, getObjectType, getOptionalAttributes, getRawClassDefinition, getRawClassDefinitions, getSubClasses, getSuperClasses, isAttributeDefined, isClassDefined, translateAliasAttributeName, translateAliasClassNamepublic 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.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.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 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 java.lang.String[] aclScopes()
public void reconfigureContainerClasses(java.util.HashSet hs)
hs - A HashSet with the names of all container classes as specified by
the dITStructureRules.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 SchemaDefinition
API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated ${TODAY} ${TSTAMP}.