|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.ldap.model.schema.AbstractSchemaObject
org.apache.directory.shared.ldap.model.schema.MatchingRule
public class MatchingRule
A matchingRule definition. MatchingRules associate a comparator and a normalizer, forming the basic tools necessary to assert actions against attribute values. MatchingRules are associated with a specific Syntax for the purpose of resolving a normalized form and for comparisons.
According to ldapbis [MODELS]:
4.1.3. Matching Rules
Matching rules are used by servers to compare attribute values against
assertion values when performing Search and Compare operations. They
are also used to identify the value to be added or deleted when
modifying entries, and are used when comparing a purported
distinguished name with the name of an entry.
A matching rule specifies the syntax of the assertion value.
Each matching rule is identified by an object identifier (OID) and,
optionally, one or more short names (descriptors).
Matching rule definitions are written according to the ABNF:
MatchingRuleDescription = LPAREN WSP
numericoid ; object identifier
[ SP "NAME" SP qdescrs ] ; short names (descriptors)
[ SP "DESC" SP qdstring ] ; description
[ SP "OBSOLETE" ] ; not active
SP "SYNTAX" SP numericoid ; assertion syntax
extensions WSP RPAREN ; extensions
where:
[numericoid] is object identifier assigned to this matching rule;
NAME [qdescrs] are short names (descriptors) identifying this
matching rule;
DESC [qdstring] is a short descriptive string;
OBSOLETE indicates this matching rule is not active;
SYNTAX identifies the assertion syntax by object identifier; and
[extensions] describe extensions.
DescriptionUtils.getDescription(MatchingRule),
Serialized Form| Field Summary | |
|---|---|
protected LdapComparator<? super Object> |
ldapComparator
The associated Comparator |
protected LdapSyntax |
ldapSyntax
The associated LdapSyntax |
protected Normalizer |
normalizer
The associated Normalizer |
| Fields inherited from class org.apache.directory.shared.ldap.model.schema.AbstractSchemaObject |
|---|
description, extensions, isEnabled, isObsolete, isReadOnly, locked, names, objectType, oid, schemaName, specification |
| Constructor Summary | |
|---|---|
MatchingRule(String oid)
Creates a new instance of MatchingRule. |
|
| Method Summary | |
|---|---|
void |
addToRegistries(List<Throwable> errors,
Registries registries)
Inject the MatchingRule into the registries, updating the references to other SchemaObject |
void |
clear()
Clear the current SchemaObject : remove all the references to other objects, and all the Maps. |
MatchingRule |
copy()
Copy an MatchingRule |
boolean |
equals(Object o)
|
LdapComparator<? super Object> |
getLdapComparator()
Gets the LdapComparator enabling the use of this MatchingRule for ORDERING and sorted indexing. |
Normalizer |
getNormalizer()
Gets the Normalizer enabling the use of this MatchingRule for EQUALITY matching and indexing. |
LdapSyntax |
getSyntax()
Gets the LdapSyntax used by this MatchingRule. |
String |
getSyntaxOid()
Gets the LdapSyntax OID used by this MatchingRule. |
void |
removeFromRegistries(List<Throwable> errors,
Registries registries)
Remove the MatchingRule from the registries, updating the references to other SchemaObject. |
void |
setLdapComparator(LdapComparator<?> ldapComparator)
Sets the LdapComparator |
void |
setNormalizer(Normalizer normalizer)
Sets the Normalizer |
void |
setSyntax(LdapSyntax ldapSyntax)
Sets the Syntax |
void |
setSyntaxOid(String oid)
Sets the Syntax's OID |
String |
toString()
|
void |
updateLdapComparator(LdapComparator<?> ldapComparator)
Update the associated Comparator, even if the SchemaObject is readOnly |
void |
updateNormalizer(Normalizer normalizer)
Update the associated Normalizer, even if the SchemaObject is readOnly |
void |
updateSyntax(LdapSyntax ldapSyntax)
Update the associated Syntax, even if the SchemaObject is readOnly |
| Methods inherited from class org.apache.directory.shared.ldap.model.schema.AbstractSchemaObject |
|---|
addExtension, addExtension, addName, compareOid, copy, getDescription, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hashCode, isDisabled, isEnabled, isObsolete, isReadOnly, lock, registerOid, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setReadOnly, setRegistries, setSchemaName, setSpecification, unlock |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected LdapComparator<? super Object> ldapComparator
protected Normalizer normalizer
protected LdapSyntax ldapSyntax
| Constructor Detail |
|---|
public MatchingRule(String oid)
oid - The MatchingRule OID| Method Detail |
|---|
public void addToRegistries(List<Throwable> errors,
Registries registries)
throws LdapException
addToRegistries in interface SchemaObjectaddToRegistries in class AbstractSchemaObjectregistries - The Registrieserrors - the errors we got
If - the addition failed
LdapException - if one of the referenced schema objects does not exist
public void removeFromRegistries(List<Throwable> errors,
Registries registries)
throws LdapException
removeFromRegistries in interface SchemaObjectremoveFromRegistries in class AbstractSchemaObjectregistries - The Registrieserrors - the errors we got
If - the MatchingRule is not valid
LdapException - if one of the referenced schema objects does not existpublic LdapSyntax getSyntax()
public String getSyntaxOid()
public void setSyntaxOid(String oid)
oid - The Syntax's OIDpublic void setSyntax(LdapSyntax ldapSyntax)
ldapSyntax - The Syntaxpublic void updateSyntax(LdapSyntax ldapSyntax)
ldapSyntax - The Syntaxpublic LdapComparator<? super Object> getLdapComparator()
public void setLdapComparator(LdapComparator<?> ldapComparator)
ldapComparator - The LdapComparatorpublic void updateLdapComparator(LdapComparator<?> ldapComparator)
ldapComparator - The LdapComparatorpublic Normalizer getNormalizer()
public void setNormalizer(Normalizer normalizer)
normalizer - The Normalizerpublic void updateNormalizer(Normalizer normalizer)
normalizer - The Normalizerpublic String toString()
toString in class ObjectObject.toString()public MatchingRule copy()
copy in interface SchemaObjectcopy in class AbstractSchemaObjectpublic boolean equals(Object o)
SchemaObject
equals in interface SchemaObjectequals in class AbstractSchemaObjectObject#equals()public void clear()
clear in interface SchemaObjectclear in class AbstractSchemaObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||