org.apache.directory.server.schema.registries
Class DefaultMatchingRuleUseRegistry

java.lang.Object
  extended by org.apache.directory.server.schema.registries.DefaultMatchingRuleUseRegistry
All Implemented Interfaces:
MatchingRuleUseRegistry, SchemaObjectRegistry

public class DefaultMatchingRuleUseRegistry
extends java.lang.Object
implements MatchingRuleUseRegistry

A plain old java object implementation of an MatchingRuleUseRegistry.

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

Constructor Summary
DefaultMatchingRuleUseRegistry()
          Creates an empty DefaultMatchingRuleUseRegistry.
 
Method Summary
 java.lang.String getSchemaName(java.lang.String id)
          Gets the name of the schema this schema object is associated with.
 boolean hasMatchingRuleUse(java.lang.String name)
          Checks to see if an matchingRuleUse exists.
 java.util.Iterator<org.apache.directory.shared.ldap.schema.MatchingRuleUse> iterator()
          Lists all the MatchingRuleUses within this registry.
 org.apache.directory.shared.ldap.schema.MatchingRuleUse lookup(java.lang.String name)
          Looks up an matchingRuleUse by its name.
 void register(org.apache.directory.shared.ldap.schema.MatchingRuleUse matchingRuleUse)
          Registers a MatchingRuleUse with this registry.
 void unregister(java.lang.String name)
          Removes the SchemaObject registered with this registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMatchingRuleUseRegistry

public DefaultMatchingRuleUseRegistry()
Creates an empty DefaultMatchingRuleUseRegistry.

Method Detail

register

public void register(org.apache.directory.shared.ldap.schema.MatchingRuleUse matchingRuleUse)
              throws javax.naming.NamingException
Description copied from interface: MatchingRuleUseRegistry
Registers a MatchingRuleUse with this registry.

Specified by:
register in interface MatchingRuleUseRegistry
Parameters:
matchingRuleUse - the matchingRuleUse to register
Throws:
javax.naming.NamingException - if the MatchingRuleUse is already registered or the registration operation is not supported

lookup

public org.apache.directory.shared.ldap.schema.MatchingRuleUse lookup(java.lang.String name)
                                                               throws javax.naming.NamingException
Description copied from interface: MatchingRuleUseRegistry
Looks up an matchingRuleUse by its name.

Specified by:
lookup in interface MatchingRuleUseRegistry
Parameters:
name - the name of the matchingRuleUse
Returns:
the MatchingRuleUse instance for the name
Throws:
javax.naming.NamingException - if the MatchingRuleUse does not exist

hasMatchingRuleUse

public boolean hasMatchingRuleUse(java.lang.String name)
Description copied from interface: MatchingRuleUseRegistry
Checks to see if an matchingRuleUse exists.

Specified by:
hasMatchingRuleUse in interface MatchingRuleUseRegistry
Parameters:
name - the name of the matchingRuleUse
Returns:
true if an matchingRuleUse definition exists for the name, false otherwise

getSchemaName

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

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

iterator

public java.util.Iterator<org.apache.directory.shared.ldap.schema.MatchingRuleUse> iterator()
Description copied from interface: MatchingRuleUseRegistry
Lists all the MatchingRuleUses within this registry.

Specified by:
iterator in interface MatchingRuleUseRegistry
Specified by:
iterator in interface SchemaObjectRegistry
Returns:
an Iterator over all the MatchingRuleUses within this registry

unregister

public void unregister(java.lang.String name)
                throws javax.naming.NamingException
Description copied from interface: SchemaObjectRegistry
Removes the SchemaObject registered with this registry.

Specified by:
unregister in interface SchemaObjectRegistry
Parameters:
name - the numeric identifier
Throws:
javax.naming.NamingException - if the numeric identifier is invalid


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