org.apache.directory.shared.ldap.schema
Class MatchingRuleUse

java.lang.Object
  extended by org.apache.directory.shared.ldap.schema.AbstractSchemaObject
      extended by org.apache.directory.shared.ldap.schema.MatchingRuleUse
All Implemented Interfaces:
java.io.Serializable, SchemaObject

public class MatchingRuleUse
extends AbstractSchemaObject

Represents an LDAP MatchingRuleUseDescription defined in RFC 2252.

According to ldapbis [MODELS]:

  Values of the matchingRuleUse list the attributes which are suitable
  for use with an extensible matching rule.
  
    Matching rule use descriptions are written according to the following
    ABNF:
 
      MatchingRuleUseDescription = LPAREN WSP
          numericoid                ; object identifier
          [ SP "NAME" SP qdescrs ]  ; short names (descriptors)
          [ SP "DESC" SP qdstring ] ; description
          [ SP "OBSOLETE" ]         ; not active
          SP "APPLIES" SP oids      ; attribute types
          extensions WSP RPAREN     ; extensions
  
    where:
      [numericoid] is the object identifier of the matching rule
          associated with this matching rule use description;
      NAME [qdescrs] are short names (descriptors) identifying this
          matching rule use;
      DESC [qdstring] is a short descriptive string;
      OBSOLETE indicates this matching rule use is not active;
      APPLIES provides a list of attribute types the matching rule applies
          to; and
      [extensions] describe extensions.
 
  The matchingRule within the MatchingRuleUse definition can be used by an
  extensible match assertion if the assertion is based on the attributes 
  listed within the MatchingRuleUse definition.  If an extensible match 
  assertion is based on attributes other than those listed within the 
  MatchingRuleUse definition then the assertion is deemed undefined.
  
  Also according to 3.3.20 of [SYNTAXES] (ldapbis working group):
  
  A value of the Matching Rule Use Description syntax indicates the
  attribute types to which a matching rule may be applied in an
  extensibleMatch search filter [PROT].  The LDAP-specific encoding of
  a value of this syntax is defined by the <MatchingRuleUseDescription>
  rule in [MODELS] above.
 

Version:
$Rev: 927122 $
Author:
Apache Directory Project
See Also:
ldapbis [MODELS], ldapbis [SYNTAXES], Serialized Form

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.schema.AbstractSchemaObject
description, extensions, isEnabled, isObsolete, isReadOnly, locked, names, objectType, oid, schemaName, specification
 
Constructor Summary
MatchingRuleUse(java.lang.String oid)
          Creates a new instance of MatchingRuleUseDescription
 
Method Summary
 void addApplicableAttribute(AttributeType attributeType)
          Add a matchingRule's AttributeType the MRU applies to.
 void addApplicableAttributeOids(java.lang.String oid)
          Add a matchingRule's AttributeType OIDs the MRU applies to.
 void addToRegistries(Registries registries)
          Inject the MatchingRuleUse 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.
 MatchingRuleUse copy()
          Copy an MatchingRuleUse
 boolean equals(java.lang.Object o)
           
 java.util.List<java.lang.String> getApplicableAttributeOids()
           
 java.util.List<AttributeType> getApplicableAttributes()
           
 void setApplicableAttributeOids(java.util.List<java.lang.String> applicableAttributeOids)
          Set the matchingRule's AttributeType OIDs the MRU applies to.
 void setApplicableAttributes(java.util.List<AttributeType> applicableAttributes)
          Set the matchingRule's AttributeType the MRU applies to.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.directory.shared.ldap.schema.AbstractSchemaObject
addExtension, addName, addToRegistries, compareOid, copy, getDescription, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hashCode, isDisabled, isEnabled, isObsolete, isReadOnly, lock, registerOid, removeFromRegistries, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setReadOnly, setRegistries, setSchemaName, setSpecification
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MatchingRuleUse

public MatchingRuleUse(java.lang.String oid)
Creates a new instance of MatchingRuleUseDescription

Method Detail

addToRegistries

public void addToRegistries(Registries registries)
                     throws LdapException
Inject the MatchingRuleUse into the registries, updating the references to other SchemaObject

Parameters:
registries - The Registries
Throws:
If - the addition failed
LdapException

getApplicableAttributeOids

public java.util.List<java.lang.String> getApplicableAttributeOids()
Returns:
The matchingRule's list of AttributeType OIDs the MRU applies to

getApplicableAttributes

public java.util.List<AttributeType> getApplicableAttributes()
Returns:
The matchingRule's list of AttributeType OIDs the MRU applies to

setApplicableAttributeOids

public void setApplicableAttributeOids(java.util.List<java.lang.String> applicableAttributeOids)
Set the matchingRule's AttributeType OIDs the MRU applies to.

Parameters:
applicableAttributes - The AttributeType OIDs list

setApplicableAttributes

public void setApplicableAttributes(java.util.List<AttributeType> applicableAttributes)
Set the matchingRule's AttributeType the MRU applies to.

Parameters:
applicableAttributes - The AttributeType list

addApplicableAttributeOids

public void addApplicableAttributeOids(java.lang.String oid)
Add a matchingRule's AttributeType OIDs the MRU applies to.

Parameters:
oid - A matchingRule's AttributeType OIDs the MRU applies to

addApplicableAttribute

public void addApplicableAttribute(AttributeType attributeType)
Add a matchingRule's AttributeType the MRU applies to.

Parameters:
oid - A matchingRule's AttributeType the MRU applies to

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

copy

public MatchingRuleUse copy()
Copy an MatchingRuleUse

Specified by:
copy in interface SchemaObject
Specified by:
copy in class AbstractSchemaObject
Returns:
The copied SchemaObject

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface SchemaObject
Overrides:
equals in class AbstractSchemaObject
See Also:
Object.equals(Object)

clear

public void clear()
Clear the current SchemaObject : remove all the references to other objects, and all the Maps.

Specified by:
clear in interface SchemaObject
Overrides:
clear in class AbstractSchemaObject


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.