org.apache.directory.server.core.schema.bootstrap
Class BootstrapMatchingRuleRegistry

java.lang.Object
  extended by org.apache.directory.server.core.schema.bootstrap.BootstrapMatchingRuleRegistry
All Implemented Interfaces:
MatchingRuleRegistry

public class BootstrapMatchingRuleRegistry
extends java.lang.Object
implements MatchingRuleRegistry

A MatchingRuleRegistry service used to lookup matching rules by OID.

Version:
$Rev: 434579 $
Author:
Apache Directory Project

Constructor Summary
BootstrapMatchingRuleRegistry(OidRegistry oidRegistry)
          Creates a BootstrapMatchingRuleRegistry using existing MatchingRulees for lookups.
 
Method Summary
 java.lang.String getSchemaName(java.lang.String id)
          Gets the name of the schema this schema object is associated with.
 boolean hasMatchingRule(java.lang.String id)
          Checks to see if a MatchingRule exists.
 java.util.Iterator list()
          Gets an Iterator over the MatchingRules within this registry.
 MatchingRule lookup(java.lang.String id)
          Looks up a MatchingRule by its unique Object Identifier or by name.
 void register(java.lang.String schema, MatchingRule matchingRule)
          Registers a MatchingRule with this registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BootstrapMatchingRuleRegistry

public BootstrapMatchingRuleRegistry(OidRegistry oidRegistry)
Creates a BootstrapMatchingRuleRegistry using existing MatchingRulees for lookups.

Method Detail

lookup

public MatchingRule lookup(java.lang.String id)
                    throws javax.naming.NamingException
Description copied from interface: MatchingRuleRegistry
Looks up a MatchingRule by its unique Object Identifier or by name.

Specified by:
lookup in interface MatchingRuleRegistry
Parameters:
id - the object identifier or the name identifier
Returns:
the MatchingRule for the id
Throws:
javax.naming.NamingException - if there is a backing store failure or the MatchingRule does not exist.
See Also:
MatchingRuleRegistry.lookup(String)

register

public void register(java.lang.String schema,
                     MatchingRule matchingRule)
              throws javax.naming.NamingException
Description copied from interface: MatchingRuleRegistry
Registers a MatchingRule with this registry.

Specified by:
register in interface MatchingRuleRegistry
Parameters:
schema - the name of the schema the MatchingRule is associated with
matchingRule - the MatchingRule to register
Throws:
javax.naming.NamingException - if the matchingRule is already registered or the registration operation is not supported
See Also:
MatchingRuleRegistry.register(String, MatchingRule)

hasMatchingRule

public boolean hasMatchingRule(java.lang.String id)
Description copied from interface: MatchingRuleRegistry
Checks to see if a MatchingRule exists. Backing store failures simply return false.

Specified by:
hasMatchingRule in interface MatchingRuleRegistry
Parameters:
id - the object identifier
Returns:
true if a MatchingRule definition exists for the oid, false otherwise
See Also:
MatchingRuleRegistry.hasMatchingRule(String)

getSchemaName

public java.lang.String getSchemaName(java.lang.String id)
                               throws javax.naming.NamingException
Description copied from interface: MatchingRuleRegistry
Gets the name of the schema this schema object is associated with.

Specified by:
getSchemaName in interface MatchingRuleRegistry
Parameters:
id - the object identifier or the name
Returns:
the schema name
Throws:
javax.naming.NamingException - if the schema object does not exist

list

public java.util.Iterator list()
Description copied from interface: MatchingRuleRegistry
Gets an Iterator over the MatchingRules within this registry.

Specified by:
list in interface MatchingRuleRegistry
Returns:
an iterator over all MatchingRules in registry