|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.types.Schema
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=false, mayExtend=false, mayInvoke=true) public final class Schema
This class defines a data structure that holds information about the components of the Directory Server schema. It includes the following kinds of elements:
Constructor Summary | |
---|---|
Schema()
Creates a new schema structure with all elements initialized but empty. |
Method Summary | |
---|---|
void |
addExtraAttribute(java.lang.String name,
Attribute attr)
Add a new extra Attribute for this schema. |
static void |
compareConcatenatedSchema(java.util.LinkedHashSet<java.lang.String> oldElements,
java.util.LinkedHashSet<java.lang.String> newElements,
AttributeType elementType,
java.util.LinkedList<Modification> mods)
Compares the provided sets of schema element definitions and writes any differences found into the given list of modifications. |
void |
deregisterApproximateMatchingRule(ApproximateMatchingRule matchingRule)
Deregisters the provided approximate matching rule definition with this schema. |
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 |
deregisterEqualityMatchingRule(EqualityMatchingRule matchingRule)
Deregisters the provided equality matching 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 |
deregisterOrderingMatchingRule(OrderingMatchingRule matchingRule)
Deregisters the provided ordering matching rule definition with this schema. |
void |
deregisterSubstringMatchingRule(SubstringMatchingRule matchingRule)
Deregisters the provided substring matching rule definition with this schema. |
void |
deregisterSyntax(AttributeSyntax syntax)
Deregisters the provided attribute 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. |
static void |
genConcatenatedSchema(java.util.LinkedHashSet<java.lang.String> attributeTypes,
java.util.LinkedHashSet<java.lang.String> objectClasses,
java.util.LinkedHashSet<java.lang.String> nameForms,
java.util.LinkedHashSet<java.lang.String> ditContentRules,
java.util.LinkedHashSet<java.lang.String> ditStructureRules,
java.util.LinkedHashSet<java.lang.String> matchingRuleUses)
Reads the files contained in the schema directory and generates a concatenated view of their contents in the provided sets. |
ApproximateMatchingRule |
getApproximateMatchingRule(java.lang.String lowerName)
Retrieves the approximate matching rule definition with the specified name or OID. |
java.util.concurrent.ConcurrentHashMap<java.lang.String,ApproximateMatchingRule> |
getApproximateMatchingRules()
Retrieves the approximate matching rule definitions for this schema, as a mapping between the lowercase names and OIDs for the matching rule and the matching rule itself. |
AttributeType |
getAttributeType(java.lang.String lowerName)
Retrieves the attribute type definition with the specified name or OID. |
java.util.concurrent.ConcurrentHashMap<java.lang.String,AttributeType> |
getAttributeTypes()
Retrieves the attribute type definitions for this schema, as a mapping between the lowercase names and OIDs for the attribute type and the attribute type itself. |
java.util.LinkedHashSet<AttributeValue> |
getAttributeTypeSet()
Retrieves the set of defined attribute types for this schema. |
DITContentRule |
getDITContentRule(ObjectClass objectClass)
Retrieves the DIT content rule definition for the specified objectclass. |
java.util.concurrent.ConcurrentHashMap<ObjectClass,DITContentRule> |
getDITContentRules()
Retrieves the DIT content rule definitions for this schema, as a mapping between the objectclass for the rule and the DIT content rule itself. |
java.util.LinkedHashSet<AttributeValue> |
getDITContentRuleSet()
Retrieves the set of defined DIT content rules for this schema. |
DITStructureRule |
getDITStructureRule(int ruleID)
Retrieves the DIT structure rule definition with the provided rule ID. |
DITStructureRule |
getDITStructureRule(NameForm nameForm)
Retrieves the DIT structure rule definition for the provided name form. |
java.util.concurrent.ConcurrentHashMap<java.lang.Integer,DITStructureRule> |
getDITStructureRulesByID()
Retrieves the DIT structure rule definitions for this schema, as a mapping between the rule ID for the rule and the DIT structure rule itself. |
java.util.concurrent.ConcurrentHashMap<NameForm,DITStructureRule> |
getDITStructureRulesByNameForm()
Retrieves the DIT structure rule definitions for this schema, as a mapping between the name form for the rule and the DIT structure rule itself. |
java.util.LinkedHashSet<AttributeValue> |
getDITStructureRuleSet()
Retrieves the set of defined DIT structure rules for this schema. |
EqualityMatchingRule |
getEqualityMatchingRule(java.lang.String lowerName)
Retrieves the equality matching rule definition with the specified name or OID. |
java.util.concurrent.ConcurrentHashMap<java.lang.String,EqualityMatchingRule> |
getEqualityMatchingRules()
Retrieves the equality matching rule definitions for this schema, as a mapping between the lowercase names and OIDs for the matching rule and the matching rule itself. |
java.util.Map<java.lang.String,Attribute> |
getExtraAttributes()
Get the extraAttributes stored in this schema. |
MatchingRule |
getMatchingRule(java.lang.String lowerName)
Retrieves the matching rule definition with the specified name or OID. |
java.util.concurrent.ConcurrentHashMap<java.lang.String,MatchingRule> |
getMatchingRules()
Retrieves the entire set of matching rule definitions for this schema, as a mapping between the lowercase names and OIDs for the matching rule and the matching rule itself. |
java.util.LinkedHashSet<AttributeValue> |
getMatchingRuleSet()
Retrieves the set of defined matching rules for this schema. |
MatchingRuleUse |
getMatchingRuleUse(MatchingRule matchingRule)
Retrieves the matching rule use definition for the specified matching rule. |
java.util.concurrent.ConcurrentHashMap<MatchingRule,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. |
java.util.LinkedHashSet<AttributeValue> |
getMatchingRuleUseSet()
Retrieves the set of defined matching rule uses for this schema. |
NameForm |
getNameForm(ObjectClass objectClass)
Retrieves the name form definition for the specified objectclass. |
NameForm |
getNameForm(java.lang.String lowerName)
Retrieves the name form definition with the provided name or OID. |
java.util.concurrent.ConcurrentHashMap<java.lang.String,NameForm> |
getNameFormsByNameOrOID()
Retrieves the name form definitions for this schema, as a mapping between the names/OID for the name form and the name form itself. |
java.util.concurrent.ConcurrentHashMap<ObjectClass,NameForm> |
getNameFormsByObjectClass()
Retrieves the name form definitions for this schema, as a mapping between the objectclass for the name form and the name form itself. |
java.util.LinkedHashSet<AttributeValue> |
getNameFormSet()
Retrieves the set of defined name forms for this schema. |
ObjectClass |
getObjectClass(java.lang.String lowerName)
Retrieves the objectclass definition with the specified name or OID. |
java.util.concurrent.ConcurrentHashMap<java.lang.String,ObjectClass> |
getObjectClasses()
Retrieves the objectclass definitions for this schema, as a mapping between the lowercase names and OIDs for the objectclass and the objectclass itself. |
java.util.LinkedHashSet<AttributeValue> |
getObjectClassSet()
Retrieves the set of defined objectclasses for this schema. |
long |
getOldestModificationTime()
Retrieves the modification timestamp for the file in the schema configuration directory with the oldest last modified time. |
OrderingMatchingRule |
getOrderingMatchingRule(java.lang.String lowerName)
Retrieves the ordering matching rule definition with the specified name or OID. |
java.util.concurrent.ConcurrentHashMap<java.lang.String,OrderingMatchingRule> |
getOrderingMatchingRules()
Retrieves the ordering matching rule definitions for this schema, as a mapping between the lowercase names and OIDs for the matching rule and the matching rule itself. |
SubstringMatchingRule |
getSubstringMatchingRule(java.lang.String lowerName)
Retrieves the substring matching rule definition with the specified name or OID. |
java.util.concurrent.ConcurrentHashMap<java.lang.String,SubstringMatchingRule> |
getSubstringMatchingRules()
Retrieves the substring matching rule definitions for this schema, as a mapping between the lowercase names and OIDs for the matching rule and the matching rule itself. |
java.lang.Iterable<AttributeType> |
getSubTypes(AttributeType attributeType)
Retrieves the set of subtypes registered for the given attribute type. |
AttributeSyntax |
getSyntax(java.lang.String lowerName)
Retrieves the attribute syntax definition with the OID. |
java.util.concurrent.ConcurrentHashMap<java.lang.String,AttributeSyntax> |
getSyntaxes()
Retrieves the attribute syntax definitions for this schema, as a mapping between the OID for the syntax and the syntax itself. |
java.util.LinkedHashSet<AttributeValue> |
getSyntaxSet()
Retrieves the set of defined attribute syntaxes 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(java.lang.String lowerName)
Indicates whether this schema definition includes an attribute type with the provided name or OID. |
boolean |
hasDITContentRule(ObjectClass objectClass)
Indicates whether this schema definition includes a DIT content rule for the provided objectclass. |
boolean |
hasDITStructureRule(int ruleID)
Indicates whether this schema definition includes a DIT structure rule with the provided rule ID. |
boolean |
hasDITStructureRule(NameForm nameForm)
Indicates whether this schema definition includes a DIT structure rule for the provided name form. |
boolean |
hasMatchingRule(java.lang.String lowerName)
Indicates whether this schema definition includes a matching rule with the provided name or OID. |
boolean |
hasMatchingRuleUse(MatchingRule matchingRule)
Indicates whether this schema definition includes a matching rule use for the provided matching rule. |
boolean |
hasNameForm(ObjectClass objectClass)
Indicates whether this schema definition includes a name form for the specified objectclass. |
boolean |
hasNameForm(java.lang.String lowerName)
Indicates whether this schema definition includes a name form with the specified name or OID. |
boolean |
hasObjectClass(java.lang.String lowerName)
Indicates whether this schema definition includes an objectclass with the provided name or OID. |
boolean |
hasSyntax(java.lang.String lowerName)
Indicates whether this schema definition includes an attribute syntax with the provided name or OID. |
static void |
readConcatenatedSchema(java.lang.String concatSchemaFile,
java.util.LinkedHashSet<java.lang.String> attributeTypes,
java.util.LinkedHashSet<java.lang.String> objectClasses,
java.util.LinkedHashSet<java.lang.String> nameForms,
java.util.LinkedHashSet<java.lang.String> ditContentRules,
java.util.LinkedHashSet<java.lang.String> ditStructureRules,
java.util.LinkedHashSet<java.lang.String> matchingRuleUses)
Reads data from the specified concatenated schema file into the provided sets. |
void |
rebuildDependentElements(SchemaFileElement element)
Recursively rebuilds all schema elements that are dependent upon the provided element. |
void |
registerApproximateMatchingRule(ApproximateMatchingRule matchingRule,
boolean overwriteExisting)
Registers the provided approximate matching rule with this schema. |
void |
registerAttributeType(AttributeType attributeType,
boolean overwriteExisting)
Registers the provided attribute type definition with this schema. |
void |
registerDITContentRule(DITContentRule ditContentRule,
boolean overwriteExisting)
Registers the provided DIT content rule definition with this schema. |
void |
registerDITStructureRule(DITStructureRule ditStructureRule,
boolean overwriteExisting)
Registers the provided DIT structure rule definition with this schema. |
void |
registerEqualityMatchingRule(EqualityMatchingRule matchingRule,
boolean overwriteExisting)
Registers the provided equality matching rule with this schema. |
void |
registerMatchingRule(MatchingRule matchingRule,
boolean overwriteExisting)
Registers the provided matching rule definition with this schema. |
void |
registerMatchingRuleUse(MatchingRuleUse matchingRuleUse,
boolean overwriteExisting)
Registers the provided matching rule use definition with this schema. |
void |
registerNameForm(NameForm nameForm,
boolean overwriteExisting)
Registers the provided name form definition with this schema. |
void |
registerObjectClass(ObjectClass objectClass,
boolean overwriteExisting)
Registers the provided objectclass definition with this schema. |
void |
registerOrderingMatchingRule(OrderingMatchingRule matchingRule,
boolean overwriteExisting)
Registers the provided ordering matching rule with this schema. |
void |
registerSubstringMatchingRule(SubstringMatchingRule matchingRule,
boolean overwriteExisting)
Registers the provided substring matching rule with this schema. |
void |
registerSyntax(AttributeSyntax syntax,
boolean overwriteExisting)
Registers the provided attribute syntax definition with this schema. |
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. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Schema()
Method Detail |
---|
public java.util.concurrent.ConcurrentHashMap<java.lang.String,AttributeType> getAttributeTypes()
public java.util.LinkedHashSet<AttributeValue> getAttributeTypeSet()
public boolean hasAttributeType(java.lang.String lowerName)
lowerName
- The name or OID for which to make the
determination, formatted in all lowercase
characters.
true
if this schema contains an attribute type
with the provided name or OID, or false
if not.public AttributeType getAttributeType(java.lang.String lowerName)
lowerName
- The name or OID of the attribute type to
retrieve, formatted in all lowercase
characters.
null
if no
type is registered with the provided name or OID.public void registerAttributeType(AttributeType attributeType, boolean overwriteExisting) throws DirectoryException
attributeType
- The attribute type to register with
this schema.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 deregisterAttributeType(AttributeType attributeType)
attributeType
- The attribute type to deregister with this
schema.public java.lang.Iterable<AttributeType> getSubTypes(AttributeType attributeType)
attributeType
- The attribute type for which to retrieve
the set of registered subtypes.
public java.util.concurrent.ConcurrentHashMap<java.lang.String,ObjectClass> getObjectClasses()
public java.util.LinkedHashSet<AttributeValue> getObjectClassSet()
public boolean hasObjectClass(java.lang.String lowerName)
lowerName
- The name or OID for which to make the
determination, formatted in all lowercase
characters.
true
if this schema contains an objectclass with
the provided name or OID, or false
if not.public ObjectClass getObjectClass(java.lang.String lowerName)
lowerName
- The name or OID of the objectclass to
retrieve, formatted in all lowercase
characters.
null
if no
class is registered with the provided name or OID.public void registerObjectClass(ObjectClass objectClass, boolean overwriteExisting) throws DirectoryException
objectClass
- The objectclass to register with this
schema.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 deregisterObjectClass(ObjectClass objectClass)
objectClass
- The objectclass to deregister with this
schema.public java.util.concurrent.ConcurrentHashMap<java.lang.String,AttributeSyntax> getSyntaxes()
public java.util.LinkedHashSet<AttributeValue> getSyntaxSet()
public boolean hasSyntax(java.lang.String lowerName)
lowerName
- The name or OID for which to make the
determination, formatted in all lowercase
characters.
true
if this schema contains an attribute syntax
with the provided name or OID, or false
if not.public AttributeSyntax getSyntax(java.lang.String lowerName)
lowerName
- The OID of the attribute syntax to retrieve,
formatted in all lowercase characters.
null
if
no syntax is registered with the provided OID.public void registerSyntax(AttributeSyntax syntax, boolean overwriteExisting) throws DirectoryException
syntax
- The attribute 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 deregisterSyntax(AttributeSyntax syntax)
syntax
- The attribute syntax to deregister with this
schema.public java.util.concurrent.ConcurrentHashMap<java.lang.String,MatchingRule> getMatchingRules()
public java.util.LinkedHashSet<AttributeValue> getMatchingRuleSet()
public boolean hasMatchingRule(java.lang.String lowerName)
lowerName
- The name or OID for which to make the
determination, formatted in all lowercase
characters.
true
if this schema contains a matching rule
with the provided name or OID, or false
if not.public MatchingRule getMatchingRule(java.lang.String lowerName)
lowerName
- The name or OID of the matching rule to
retrieve, formatted in all lowercase
characters.
null
if no
rule is registered with the provided name or OID.public void registerMatchingRule(MatchingRule matchingRule, boolean overwriteExisting) throws DirectoryException
matchingRule
- The matching rule 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)
matchingRule
- The matching rule to deregister with this
schema.public java.util.concurrent.ConcurrentHashMap<java.lang.String,ApproximateMatchingRule> getApproximateMatchingRules()
public ApproximateMatchingRule getApproximateMatchingRule(java.lang.String lowerName)
lowerName
- The name or OID of the matching rule to
retrieve, formatted in all lowercase
characters.
null
if no
approximate matching rule is registered with the
provided name or OID.public void registerApproximateMatchingRule(ApproximateMatchingRule matchingRule, boolean overwriteExisting) throws DirectoryException
matchingRule
- The approximate matching rule to
register.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 deregisterApproximateMatchingRule(ApproximateMatchingRule matchingRule)
matchingRule
- The approximate matching rule to deregister
with this schema.public java.util.concurrent.ConcurrentHashMap<java.lang.String,EqualityMatchingRule> getEqualityMatchingRules()
public EqualityMatchingRule getEqualityMatchingRule(java.lang.String lowerName)
lowerName
- The name or OID of the matching rule to
retrieve, formatted in all lowercase
characters.
null
if no
equality matching rule is registered with the provided
name or OID.public void registerEqualityMatchingRule(EqualityMatchingRule matchingRule, boolean overwriteExisting) throws DirectoryException
matchingRule
- The equality matching rule to
register.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 deregisterEqualityMatchingRule(EqualityMatchingRule matchingRule)
matchingRule
- The equality matching rule to deregister
with this schema.public java.util.concurrent.ConcurrentHashMap<java.lang.String,OrderingMatchingRule> getOrderingMatchingRules()
public OrderingMatchingRule getOrderingMatchingRule(java.lang.String lowerName)
lowerName
- The name or OID of the matching rule to
retrieve, formatted in all lowercase
characters.
null
if no
ordering matching rule is registered with the provided
name or OID.public void registerOrderingMatchingRule(OrderingMatchingRule matchingRule, boolean overwriteExisting) throws DirectoryException
matchingRule
- The ordering matching rule to
register.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 deregisterOrderingMatchingRule(OrderingMatchingRule matchingRule)
matchingRule
- The ordering matching rule to deregister
with this schema.public java.util.concurrent.ConcurrentHashMap<java.lang.String,SubstringMatchingRule> getSubstringMatchingRules()
public SubstringMatchingRule getSubstringMatchingRule(java.lang.String lowerName)
lowerName
- The name or OID of the matching rule to
retrieve, formatted in all lowercase
characters.
null
if no
substring matching rule is registered with the provided
name or OID.public void registerSubstringMatchingRule(SubstringMatchingRule matchingRule, boolean overwriteExisting) throws DirectoryException
matchingRule
- The substring matching rule to
register.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 deregisterSubstringMatchingRule(SubstringMatchingRule matchingRule)
matchingRule
- The substring matching rule to deregister
with this schema.public java.util.concurrent.ConcurrentHashMap<MatchingRule,MatchingRuleUse> getMatchingRuleUses()
public java.util.LinkedHashSet<AttributeValue> getMatchingRuleUseSet()
public boolean hasMatchingRuleUse(MatchingRule matchingRule)
matchingRule
- The matching rule for which to make the
determination.
true
if this schema contains a matching rule use
for the provided matching rule, or false
if not.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, boolean overwriteExisting) throws DirectoryException
matchingRuleUse
- The matching rule use definition to
register.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)
matchingRuleUse
- The matching rule use to deregister with
this schema.public java.util.concurrent.ConcurrentHashMap<ObjectClass,DITContentRule> getDITContentRules()
public java.util.LinkedHashSet<AttributeValue> getDITContentRuleSet()
public boolean hasDITContentRule(ObjectClass objectClass)
objectClass
- The objectclass for which to make the
determination.
true
if this schema contains a DIT content rule
for the provided objectclass, or false
if not.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, boolean overwriteExisting) throws DirectoryException
ditContentRule
- The DIT content rule to register.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)
ditContentRule
- The DIT content rule to deregister with
this schema.public java.util.LinkedHashSet<AttributeValue> getDITStructureRuleSet()
public java.util.concurrent.ConcurrentHashMap<java.lang.Integer,DITStructureRule> getDITStructureRulesByID()
public java.util.concurrent.ConcurrentHashMap<NameForm,DITStructureRule> getDITStructureRulesByNameForm()
public boolean hasDITStructureRule(int ruleID)
ruleID
- The rule ID for which to make the determination.
true
if this schema contains a DIT structure
rule with the provided rule ID, or false
if not.public boolean hasDITStructureRule(NameForm nameForm)
nameForm
- The name form for which to make the
determination.
true
if this schema contains a DIT structure
rule for the provided name form, or false
if
not.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 DITStructureRule getDITStructureRule(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, boolean overwriteExisting) throws DirectoryException
ditStructureRule
- The DIT structure rule to register.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)
ditStructureRule
- The DIT structure rule to deregister
with this schema.public java.util.LinkedHashSet<AttributeValue> getNameFormSet()
public java.util.concurrent.ConcurrentHashMap<ObjectClass,NameForm> getNameFormsByObjectClass()
public java.util.concurrent.ConcurrentHashMap<java.lang.String,NameForm> getNameFormsByNameOrOID()
public boolean hasNameForm(ObjectClass objectClass)
objectClass
- The objectclass for which to make the
determination.
true
if this schema contains a name form for the
provided objectclass, or false
if not.public boolean hasNameForm(java.lang.String lowerName)
lowerName
- The name or OID for which to make the
determination, formatted in all lowercase
characters.
true
if this schema contains a name form with
the provided name or OID, or false
if not.public NameForm getNameForm(ObjectClass objectClass)
objectClass
- The objectclass for the name form to
retrieve.
null
if no name
form is registered with the provided objectClass.public NameForm getNameForm(java.lang.String lowerName)
lowerName
- The name or OID of the name form to retrieve,
formatted in all lowercase characters.
null
if no name
form is registered with the provided name or OID.public void registerNameForm(NameForm nameForm, boolean overwriteExisting) throws DirectoryException
nameForm
- The name form definition to register.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)
nameForm
- The name form definition to deregister.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 void rebuildDependentElements(SchemaFileElement element) throws DirectoryException
element
- The element for which to recursively rebuild all
dependent elements.
DirectoryException
- If a problem occurs while rebuilding
any of the schema elements.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 java.util.Map<java.lang.String,Attribute> getExtraAttributes()
public void addExtraAttribute(java.lang.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(java.util.LinkedHashSet<java.lang.String> attributeTypes, java.util.LinkedHashSet<java.lang.String> objectClasses, java.util.LinkedHashSet<java.lang.String> nameForms, java.util.LinkedHashSet<java.lang.String> ditContentRules, java.util.LinkedHashSet<java.lang.String> ditStructureRules, java.util.LinkedHashSet<java.lang.String> matchingRuleUses) throws java.io.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.
java.io.IOException
- If a problem occurs while reading the
schema file elements.public static void readConcatenatedSchema(java.lang.String concatSchemaFile, java.util.LinkedHashSet<java.lang.String> attributeTypes, java.util.LinkedHashSet<java.lang.String> objectClasses, java.util.LinkedHashSet<java.lang.String> nameForms, java.util.LinkedHashSet<java.lang.String> ditContentRules, java.util.LinkedHashSet<java.lang.String> ditStructureRules, java.util.LinkedHashSet<java.lang.String> matchingRuleUses) throws java.io.IOException
concatSchemaFile
- The path to 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.
java.io.IOException
- If a problem occurs while reading the
schema file elements.public static void compareConcatenatedSchema(java.util.LinkedHashSet<java.lang.String> oldElements, java.util.LinkedHashSet<java.lang.String> newElements, AttributeType elementType, java.util.LinkedList<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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |