@PublicAPI(stability=UNCOMMITTED, mayInstantiate=false, mayExtend=false, mayInvoke=true) public final class Schema extends Object
Schema
under the hood.Modifier and Type | Class and Description |
---|---|
static interface |
Schema.SchemaUpdater
Interface to update a schema provided a schema builder.
|
Constructor and Description |
---|
Schema(Schema schemaNG)
Creates a new schema structure with all elements initialized but empty.
|
Modifier and Type | Method and Description |
---|---|
void |
addExtraAttribute(String name,
Attribute attr)
Add a new extra Attribute for this schema.
|
static String |
addSchemaFileToElementDefinitionIfAbsent(String definition,
String schemaFile)
Adds the provided schema file to the provided schema element definition.
|
static void |
compareConcatenatedSchema(Set<String> oldElements,
Set<String> newElements,
AttributeType elementType,
List<Modification> mods)
Compares the provided sets of schema element definitions and
writes any differences found into the given list of
modifications.
|
void |
deregisterAttributeType(AttributeType attributeType)
Deregisters the provided attribute type definition with this schema.
|
void |
deregisterDITContentRule(DITContentRule ditContentRule)
Deregisters the provided DIT content rule definition with this
schema.
|
void |
deregisterDITStructureRule(DITStructureRule ditStructureRule)
Deregisters the provided DIT structure rule definition with this schema.
|
void |
deregisterMatchingRule(MatchingRule matchingRule)
Deregisters the provided matching rule definition with this schema.
|
void |
deregisterMatchingRuleUse(MatchingRuleUse matchingRuleUse)
Deregisters the provided matching rule use definition with this schema.
|
void |
deregisterNameForm(NameForm nameForm)
Deregisters the provided name form definition with this schema.
|
void |
deregisterObjectClass(ObjectClass objectClass)
Deregisters the provided objectclass definition with this schema.
|
void |
deregisterSyntax(Syntax syntax)
Deregisters the provided syntax definition with this schema.
|
void |
destroy()
Destroys the structures maintained by the schema so that they are
no longer usable.
|
Schema |
duplicate()
Creates a new
Schema object that is a duplicate of this one. |
void |
exclusiveLock()
Takes an exclusive lock on the schema.
|
void |
exclusiveUnlock()
Releases an exclusive lock on the schema.
|
static void |
genConcatenatedSchema(Set<String> attributeTypes,
Set<String> objectClasses,
Set<String> nameForms,
Set<String> ditContentRules,
Set<String> ditStructureRules,
Set<String> matchingRuleUses,
Set<String> ldapSyntaxes)
Reads the files contained in the schema directory and generates a
concatenated view of their contents in the provided sets.
|
AttributeType |
getAttributeType(String nameOrOid)
Retrieves the attribute type definition with the specified name or OID.
|
AttributeType |
getAttributeType(String nameOrOid,
Syntax syntax)
Retrieves the attribute type definition with the specified name or OID.
|
Collection<AttributeType> |
getAttributeTypes()
Retrieves the attribute type definitions for this schema.
|
DITContentRule |
getDITContentRule(ObjectClass objectClass)
Retrieves the DIT content rule definition for the specified objectclass.
|
Collection<DITContentRule> |
getDITContentRules()
Retrieves the DIT content rule definitions for this schema.
|
DITStructureRule |
getDITStructureRule(int ruleID)
Retrieves the DIT structure rule definition with the provided rule ID.
|
Collection<DITStructureRule> |
getDITStructureRules()
Retrieves the DIT structure rule definitions for this schema.
|
Collection<DITStructureRule> |
getDITStructureRules(NameForm nameForm)
Retrieves the DIT structure rule definitions for the provided name form.
|
Collection<Attribute> |
getExtraAttributes()
Get the extraAttributes stored in this schema.
|
MatchingRule |
getMatchingRule(String nameOrOid)
Retrieves the matching rule definition with the specified name or OID.
|
Collection<MatchingRule> |
getMatchingRules()
Retrieves all matching rule definitions for this schema.
|
MatchingRuleUse |
getMatchingRuleUse(MatchingRule matchingRule)
Retrieves the matching rule use definition for the specified matching rule.
|
Collection<MatchingRuleUse> |
getMatchingRuleUses()
Retrieves the matching rule use definitions for this schema, as a
mapping between the matching rule for the matching rule use
definition and the matching rule use itself.
|
Collection<NameForm> |
getNameForm(ObjectClass objectClass)
Retrieves the name forms definition for the specified objectclass.
|
NameForm |
getNameForm(String nameOrOid)
Retrieves the name form definition with the provided name or OID.
|
Collection<NameForm> |
getNameForms()
Retrieves the name form definitions for this schema.
|
ObjectClass |
getObjectClass(String nameOrOid)
Retrieves the objectclass definition with the specified name or OID.
|
Collection<ObjectClass> |
getObjectClasses()
Retrieves the objectclass definitions for this schema.
|
long |
getOldestModificationTime()
Retrieves the modification timestamp for the file in the schema
configuration directory with the oldest last modified time.
|
Schema |
getSchemaNG()
Returns the SDK schema.
|
Syntax |
getSyntax(String numericOid)
Retrieves the syntax definition with the OID.
|
Collection<Syntax> |
getSyntaxes()
Retrieves the syntax definitions for this schema.
|
long |
getYoungestModificationTime()
Retrieves the modification timestamp for the file in the schema
configuration directory with the youngest last modified time.
|
boolean |
hasAttributeType(String nameOrOid)
Indicates whether this schema definition includes an attribute type with the provided name or
OID.
|
boolean |
hasMatchingRule(String nameOrOid)
Indicates whether this schema definition includes a matching rule with the provided name or
OID.
|
boolean |
hasNameForm(String nameOrOid)
Indicates whether this schema definition includes a name form with the specified name or OID.
|
boolean |
hasObjectClass(String nameOrOid)
Indicates whether this schema definition includes an objectclass with the provided name or OID.
|
boolean |
hasSyntax(String oid)
Indicates whether this schema definition includes an attribute syntax with the provided OID.
|
AttributeType |
parseAttributeType(String definition)
Parses an attribute type from its provided definition.
|
static String |
parseAttributeTypeOID(String definition)
Returns the OID from the provided attribute type definition, assuming the definition is valid.
|
DITContentRule |
parseDITContentRule(String definition)
Parses a a DIT content rule from its provided definition.
|
DITStructureRule |
parseDITStructureRule(String definition)
Parses a DIT structure rule from its provided definition.
|
MatchingRuleUse |
parseMatchingRuleUse(String definition)
Parses a matching rule use from its provided definition.
|
NameForm |
parseNameForm(String definition)
Parses a name form from its provided definition.
|
static String |
parseNameFormOID(String definition)
Returns the OID from the provided name form definition, assuming the definition is valid.
|
ObjectClass |
parseObjectClass(String definition)
Parses an object class from its provided definition.
|
static String |
parseObjectClassOID(String definition)
Returns the OID from the provided object class definition, assuming the definition is valid.
|
static int |
parseRuleID(String definition)
Returns the ruleID from the provided dit structure rule definition, assuming the definition is
valid.
|
static String |
parseSyntaxOID(String definition)
Returns the OID from the provided syntax definition, assuming the definition is valid.
|
static void |
readConcatenatedSchema(File concatSchemaFile,
Set<String> attributeTypes,
Set<String> objectClasses,
Set<String> nameForms,
Set<String> ditContentRules,
Set<String> ditStructureRules,
Set<String> matchingRuleUses,
Set<String> ldapSyntaxes)
Reads data from the specified concatenated schema file into the
provided sets.
|
void |
registerAttributeType(AttributeType attributeType,
String schemaFile,
boolean overwriteExisting)
Registers the provided attribute type definition with this schema.
|
void |
registerAttributeType(String definition,
String schemaFile,
boolean overwrite)
Registers an attribute type from its provided definition.
|
void |
registerDITContentRule(DITContentRule ditContentRule,
String schemaFile,
boolean overwriteExisting)
Registers the provided DIT content rule definition with this schema.
|
void |
registerDITStructureRule(DITStructureRule ditStructureRule,
String schemaFile,
boolean overwriteExisting)
Registers the provided DIT structure rule definition with this schema.
|
void |
registerMatchingRules(Collection<MatchingRule> matchingRules,
boolean overwriteExisting)
Registers the provided matching rule definitions with this schema.
|
void |
registerMatchingRuleUse(MatchingRuleUse matchingRuleUse,
String schemaFile,
boolean overwriteExisting)
Registers the provided matching rule use definition with this schema.
|
void |
registerNameForm(NameForm nameForm,
String schemaFile,
boolean overwriteExisting)
Registers the provided name form definition with this schema.
|
void |
registerObjectClass(ObjectClass objectClass,
String schemaFile,
boolean overwriteExisting)
Registers the provided objectclass definition with this schema.
|
void |
registerObjectClass(String definition,
String schemaFile,
boolean overwriteExisting)
Registers an object class from its provided definition.
|
void |
registerSyntax(String definition,
boolean overwriteExisting)
Registers the provided syntax definition with this schema.
|
void |
registerSyntax(Syntax syntax,
boolean overwriteExisting)
Registers the provided syntax definition with this schema.
|
void |
replaceAttributeType(AttributeType newAttributeType,
AttributeType existingAttributeType,
String schemaFile)
Replaces an existing attribute type by the provided new attribute type.
|
void |
replaceObjectClass(ObjectClass objectClass,
ObjectClass existingClass,
String schemaFile)
Replaces an existing object class by another object class.
|
void |
setOldestModificationTime(long oldestModificationTime)
Sets the modification timestamp for the oldest file in the schema
configuration directory.
|
void |
setYoungestModificationTime(long youngestModificationTime)
Sets the modification timestamp for the youngest file in the
schema configuration directory.
|
void |
updateSchema(Schema.SchemaUpdater updater)
Update the schema using the provided schema updater.
|
<T> void |
updateSchemaOption(Option<T> option,
T newValue)
Updates the schema option if the new value differs from the old value.
|
static void |
writeConcatenatedSchema()
Writes a single file containing all schema element definitions,
which can be used on startup to determine whether the schema
files were edited with the server offline.
|
public Schema(Schema schemaNG) throws DirectoryException
schemaNG
- The SDK schemaDirectoryException
- if the schema has warningspublic Schema getSchemaNG()
public Collection<AttributeType> getAttributeTypes()
public boolean hasAttributeType(String nameOrOid)
nameOrOid
- The name or OID for which to make the determinationtrue
if this schema contains an attribute type with the provided name or OID,
or false
if not.public AttributeType getAttributeType(String nameOrOid)
nameOrOid
- The name or OID of the attribute type to retrievepublic AttributeType getAttributeType(String nameOrOid, Syntax syntax)
nameOrOid
- The name or OID of the attribute type to retrievesyntax
- The syntax to use when creating the temporary "place-holder" attribute type.public ObjectClass parseObjectClass(String definition) throws DirectoryException
definition
- The definition of the object classDirectoryException
- If an error occurspublic AttributeType parseAttributeType(String definition) throws DirectoryException
definition
- The definition of the attribute typeDirectoryException
- If an error occurspublic MatchingRuleUse parseMatchingRuleUse(String definition) throws DirectoryException
definition
- The definition of the matching rule useDirectoryException
- If an error occurspublic NameForm parseNameForm(String definition) throws DirectoryException
definition
- The definition of the name formDirectoryException
- If an error occurspublic DITContentRule parseDITContentRule(String definition) throws DirectoryException
definition
- The definition of the matching rule useDirectoryException
- If an error occurspublic DITStructureRule parseDITStructureRule(String definition) throws DirectoryException
definition
- The definition of the DIT structure ruleDirectoryException
- If an error occurspublic void registerAttributeType(String definition, String schemaFile, boolean overwrite) throws DirectoryException
definition
- The definition of the attribute typeschemaFile
- The schema file where this definition belongs,
maybe null
overwrite
- Indicates whether to overwrite the attribute
type if it already exists based on OID or nameDirectoryException
- If an error occurspublic void registerAttributeType(AttributeType attributeType, String schemaFile, boolean overwriteExisting) throws DirectoryException
attributeType
- The attribute type to register with this schema.schemaFile
- The schema file where this definition belongs, maybe null
overwriteExisting
- Indicates whether to overwrite an existing mapping if there are any conflicts (i.e.,
another attribute type with the same OID or name).DirectoryException
- If a conflict is encountered and the overwriteExisting
flag is set to
false
public void replaceAttributeType(AttributeType newAttributeType, AttributeType existingAttributeType, String schemaFile) throws DirectoryException
newAttributeType
- Attribute type to register to the schema.existingAttributeType
- Attribute type to remove from the schema.schemaFile
- The schema file which the new object class belongs to.DirectoryException
- If an errors occurs.public static String parseObjectClassOID(String definition) throws DirectoryException
This method does not perform any check.
definition
- The definition of a object class, assumed to be validnull
DirectoryException
- If a problem occurs while parsing the definitionpublic static String parseAttributeTypeOID(String definition) throws DirectoryException
This method does not perform any check.
definition
- The definition of an attribute type, assumed to be validnull
DirectoryException
- If a problem occurs while parsing the definitionpublic static String parseNameFormOID(String definition) throws DirectoryException
This method does not perform any check.
definition
- The definition of a name form, assumed to be validnull
DirectoryException
- If a problem occurs while parsing the definitionpublic static int parseRuleID(String definition) throws DirectoryException
This method does not perform any check.
definition
- The definition of a dit structure rule, assumed to be validnull
DirectoryException
- If a problem occurs while parsing the definitionpublic static String parseSyntaxOID(String definition) throws DirectoryException
This method does not perform any check.
definition
- The definition of a syntax, assumed to be validnull
DirectoryException
- If a problem occurs while parsing the definitionpublic void deregisterAttributeType(AttributeType attributeType) throws DirectoryException
attributeType
- The attribute type to deregister with this schema.DirectoryException
- If the attribute type is referenced by another schema element.public Collection<ObjectClass> getObjectClasses()
public boolean hasObjectClass(String nameOrOid)
nameOrOid
- The name or OID for which to make the determination.true
if this schema contains an objectclass with the provided name or OID, or
false
if not.public ObjectClass getObjectClass(String nameOrOid)
nameOrOid
- The name or OID of the objectclass to retrieve.null
if no class is registered with the provided
name or OID.public void registerObjectClass(ObjectClass objectClass, String schemaFile, boolean overwriteExisting) throws DirectoryException
objectClass
- The objectclass to register with this schema.schemaFile
- The schema file where this definition belongs, maybe null
overwriteExisting
- Indicates whether to overwrite an existing mapping if there are any conflicts (i.e.,
another objectclass with the same OID or name).DirectoryException
- If a conflict is encountered and the overwriteExisting
flag is set to
false
.public void registerObjectClass(String definition, String schemaFile, boolean overwriteExisting) throws DirectoryException
definition
- The definition of the object classschemaFile
- The schema file where this definition belongs, may be null
overwriteExisting
- Indicates whether to overwrite the object class
if it already exists based on OID or nameDirectoryException
- If an error occurspublic void deregisterObjectClass(ObjectClass objectClass) throws DirectoryException
objectClass
- The objectclass to deregister with this schema.DirectoryException
- If the object class is referenced by another schema element.public Collection<Syntax> getSyntaxes()
public boolean hasSyntax(String oid)
oid
- The OID for which to make the determinationtrue
if this schema contains an syntax with the provided OID, or false
if not.public Syntax getSyntax(String numericOid)
numericOid
- The OID of the syntax to retrieve.null
if no syntax is registered with the provided OID.public void registerSyntax(Syntax syntax, boolean overwriteExisting) throws DirectoryException
syntax
- The syntax to register with this schema.overwriteExisting
- Indicates whether to overwrite an existing mapping if there are any conflicts (i.e.,
another attribute syntax with the same OID).DirectoryException
- If a conflict is encountered and the overwriteExisting
flag is set to
false
public void registerSyntax(String definition, boolean overwriteExisting) throws DirectoryException
definition
- The definition to register with this schema.overwriteExisting
- Indicates whether to overwrite an existing mapping if there are any conflicts (i.e.,
another attribute syntax with the same OID).DirectoryException
- If a conflict is encountered and the overwriteExisting
flag is set to
false
public void deregisterSyntax(Syntax syntax) throws DirectoryException
syntax
- The syntax to deregister with this schema.DirectoryException
- If the LDAP syntax is referenced by another schema element.public Collection<MatchingRule> getMatchingRules()
public boolean hasMatchingRule(String nameOrOid)
nameOrOid
- The name or OID for which to make the determinationtrue
if this schema contains a matching rule with the provided name or OID, or
false
if not.public MatchingRule getMatchingRule(String nameOrOid)
nameOrOid
- The name or OID of the matching rule to retrievenull
if no rule is registered with the provided
name or OID.UnknownSchemaElementException
- If the requested matching rule was not found or if the provided name is ambiguous.public void registerMatchingRules(Collection<MatchingRule> matchingRules, boolean overwriteExisting) throws DirectoryException
matchingRules
- The matching rules to register with this schema.overwriteExisting
- Indicates whether to overwrite an existing mapping if there are
any conflicts (i.e., another matching rule with the same OID or
name).DirectoryException
- If a conflict is encountered and the
overwriteExisting
flag is set to false
public void deregisterMatchingRule(MatchingRule matchingRule) throws DirectoryException
matchingRule
- The matching rule to deregister with this schema.DirectoryException
- If the schema has constraints violations.public Collection<MatchingRuleUse> getMatchingRuleUses()
public MatchingRuleUse getMatchingRuleUse(MatchingRule matchingRule)
matchingRule
- The matching rule for which to retrieve the matching rule use definition.null
if none exists for the specified
matching rule.public void registerMatchingRuleUse(MatchingRuleUse matchingRuleUse, String schemaFile, boolean overwriteExisting) throws DirectoryException
matchingRuleUse
- The matching rule use definition to register.schemaFile
- The schema file where this definition belongs, maybe null
overwriteExisting
- Indicates whether to overwrite an existing mapping if there are any conflicts (i.e.,
another matching rule use with the same matching rule).DirectoryException
- If a conflict is encountered and the overwriteExisting
flag is set to
false
public void deregisterMatchingRuleUse(MatchingRuleUse matchingRuleUse) throws DirectoryException
matchingRuleUse
- The matching rule use to deregister with this schema.DirectoryException
- If the schema has constraints violations.public Collection<DITContentRule> getDITContentRules()
public DITContentRule getDITContentRule(ObjectClass objectClass)
objectClass
- The objectclass for the DIT content rule to retrieve.null
if no DIT content rule is registered
with the provided objectclass.public void registerDITContentRule(DITContentRule ditContentRule, String schemaFile, boolean overwriteExisting) throws DirectoryException
ditContentRule
- The DIT content rule to register.schemaFile
- The schema file where this definition belongs, maybe null
overwriteExisting
- Indicates whether to overwrite an existing mapping if there are any conflicts (i.e.,
another DIT content rule with the same objectclass).DirectoryException
- If a conflict is encountered and the overwriteExisting
flag is set to
false
public void deregisterDITContentRule(DITContentRule ditContentRule) throws DirectoryException
ditContentRule
- The DIT content rule to deregister with
this schema.DirectoryException
- May be thrown if the schema has constraint violations, although
deregistering a DIT content rule should not break any constraint.public Collection<DITStructureRule> getDITStructureRules()
public DITStructureRule getDITStructureRule(int ruleID)
ruleID
- The rule ID for the DIT structure rule to retrieve.null
if no DIT structure rule is
registered with the provided rule ID.public Collection<DITStructureRule> getDITStructureRules(NameForm nameForm)
nameForm
- The name form for the DIT structure rule to retrieve.null
if no DIT structure rule is
registered with the provided name form.public void registerDITStructureRule(DITStructureRule ditStructureRule, String schemaFile, boolean overwriteExisting) throws DirectoryException
ditStructureRule
- The DIT structure rule to register.schemaFile
- The schema file where this definition belongs, maybe null
overwriteExisting
- Indicates whether to overwrite an existing mapping if there are any conflicts (i.e.,
another DIT structure rule with the same name form).DirectoryException
- If a conflict is encountered and the overwriteExisting
flag is set to
false
public void deregisterDITStructureRule(DITStructureRule ditStructureRule) throws DirectoryException
ditStructureRule
- The DIT structure rule to deregister with this schema.DirectoryException
- If an error occurs.public Collection<NameForm> getNameForms()
public boolean hasNameForm(String nameOrOid)
nameOrOid
- The name or OID for which to make the determination.true
if this schema contains a name form with the provided name or OID, or
false
if not.public Collection<NameForm> getNameForm(ObjectClass objectClass)
objectClass
- The objectclass for the name form to retrieve.null
if no name forms are registered with the
provided objectClass.public NameForm getNameForm(String nameOrOid)
nameOrOid
- The name or OID of the name form to retrieve.null
if no name form is registered with the
provided name or OID.public void registerNameForm(NameForm nameForm, String schemaFile, boolean overwriteExisting) throws DirectoryException
nameForm
- The name form definition to register.schemaFile
- The schema file where this definition belongs, maybe null
overwriteExisting
- Indicates whether to overwrite an existing mapping if there are any conflicts (i.e.,
another name form with the same objectclass).DirectoryException
- If a conflict is encountered and the overwriteExisting
flag is set to
false
public void deregisterNameForm(NameForm nameForm) throws DirectoryException
nameForm
- The name form definition to deregister.DirectoryException
- If an error occurs.public long getOldestModificationTime()
public void setOldestModificationTime(long oldestModificationTime)
oldestModificationTime
- The modification timestamp for
the oldest file in the schema
configuration directory.public long getYoungestModificationTime()
public void setYoungestModificationTime(long youngestModificationTime)
youngestModificationTime
- The modification timestamp for
the youngest file in the schema
configuration directory.public Schema duplicate()
Schema
object that is a duplicate of this one. It elements may be added
and removed from the duplicate without impacting this version.Schema
object that is a duplicate of this one.public Collection<Attribute> getExtraAttributes()
public void addExtraAttribute(String name, Attribute attr)
name
- The identifier of the extra Attribute.attr
- The extra attribute that must be added to
this Schema.public static void writeConcatenatedSchema()
public static void genConcatenatedSchema(Set<String> attributeTypes, Set<String> objectClasses, Set<String> nameForms, Set<String> ditContentRules, Set<String> ditStructureRules, Set<String> matchingRuleUses, Set<String> ldapSyntaxes) throws IOException
attributeTypes
- The set into which to place the
attribute types read from the schema
files.objectClasses
- The set into which to place the object
classes read from the schema files.nameForms
- The set into which to place the name
forms read from the schema files.ditContentRules
- The set into which to place the DIT
content rules read from the schema
files.ditStructureRules
- The set into which to place the DIT
structure rules read from the schema
files.matchingRuleUses
- The set into which to place the
matching rule uses read from the
schema files.ldapSyntaxes
- The set into which to place the
ldap syntaxes read from the
schema files.IOException
- If a problem occurs while reading the
schema file elements.public static void readConcatenatedSchema(File concatSchemaFile, Set<String> attributeTypes, Set<String> objectClasses, Set<String> nameForms, Set<String> ditContentRules, Set<String> ditStructureRules, Set<String> matchingRuleUses, Set<String> ldapSyntaxes) throws IOException
concatSchemaFile
- The concatenated schema file to be read.attributeTypes
- The set into which to place the attribute types
read from the concatenated schema file.objectClasses
- The set into which to place the object classes
read from the concatenated schema file.nameForms
- The set into which to place the name forms
read from the concatenated schema file.ditContentRules
- The set into which to place the DIT content rules
read from the concatenated schema file.ditStructureRules
- The set into which to place the DIT structure rules
read from the concatenated schema file.matchingRuleUses
- The set into which to place the matching rule
uses read from the concatenated schema file.ldapSyntaxes
- The set into which to place the ldap syntaxes
read from the concatenated schema file.IOException
- If a problem occurs while reading the
schema file elements.public static void compareConcatenatedSchema(Set<String> oldElements, Set<String> newElements, AttributeType elementType, List<Modification> mods)
oldElements
- The set of elements of the specified type
read from the previous concatenated schema
files.newElements
- The set of elements of the specified type
read from the server's current schema.elementType
- The attribute type associated with the
schema element being compared.mods
- The list of modifications into which any
identified differences should be written.@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=true) public void destroy()
public void updateSchema(Schema.SchemaUpdater updater) throws DirectoryException
An implicit lock is performed, so it is in general not necessary
to call the {code lock()} and {code unlock() methods.
However, these method should be used if/when the SchemaBuilder passed
as an argument to the updater is not used to return the schema
(see for example usage in CoreSchemaProvider
class). This
case should remain exceptional.
updater
- the updater that returns a new schemaDirectoryException
- if there is any problem updating the schemapublic <T> void updateSchemaOption(Option<T> option, T newValue) throws DirectoryException
T
- the schema option's typeoption
- the schema option to updatenewValue
- the new value for the schema optionDirectoryException
- if there is any problem updating the schemapublic void exclusiveLock()
public void exclusiveUnlock()
public static String addSchemaFileToElementDefinitionIfAbsent(String definition, String schemaFile)
definition
- The schema element definitionschemaFile
- The name of the schema file to include in the definitionpublic void replaceObjectClass(ObjectClass objectClass, ObjectClass existingClass, String schemaFile) throws DirectoryException
objectClass
- Object class to register to the schema.existingClass
- Object class to remove from the schema.schemaFile
- The schema file which the new object class belongs to.DirectoryException
- If an errors occurs.Copyright 2010-2017 ForgeRock AS.