org.apache.directory.server.core.schema
Class GlobalMatchingRuleRegistry

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

public class GlobalMatchingRuleRegistry
extends java.lang.Object
implements MatchingRuleRegistry

A plain old java object implementation of an MatchingRuleRegistry.

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

Constructor Summary
GlobalMatchingRuleRegistry(BootstrapMatchingRuleRegistry bootstrap, OidRegistry oidRegistry)
          Creates an empty BootstrapMatchingRuleRegistry.
 
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.
 org.apache.directory.shared.ldap.schema.MatchingRule lookup(java.lang.String id)
          Looks up a MatchingRule by its unique Object Identifier or by name.
 void register(java.lang.String schema, org.apache.directory.shared.ldap.schema.MatchingRule dITContentRule)
          Registers a MatchingRule with this registry.
 void setMonitor(MatchingRuleRegistryMonitor monitor)
          Sets the monitor that is to be notified via callback events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalMatchingRuleRegistry

public GlobalMatchingRuleRegistry(BootstrapMatchingRuleRegistry bootstrap,
                                  OidRegistry oidRegistry)
Creates an empty BootstrapMatchingRuleRegistry.

Method Detail

setMonitor

public void setMonitor(MatchingRuleRegistryMonitor monitor)
Sets the monitor that is to be notified via callback events.

Parameters:
monitor - the new monitor to notify of notable events

register

public void register(java.lang.String schema,
                     org.apache.directory.shared.ldap.schema.MatchingRule dITContentRule)
              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
dITContentRule - the MatchingRule to register
Throws:
javax.naming.NamingException - if the matchingRule is already registered or the registration operation is not supported

lookup

public org.apache.directory.shared.ldap.schema.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.

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

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


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