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

java.lang.Object
  extended byorg.apache.directory.server.core.schema.GlobalDitContentRuleRegistry
All Implemented Interfaces:
DITContentRuleRegistry

public class GlobalDitContentRuleRegistry
extends java.lang.Object
implements DITContentRuleRegistry

A plain old java object implementation of an DITContentRuleRegistry.

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

Constructor Summary
GlobalDitContentRuleRegistry(BootstrapDitContentRuleRegistry bootstrap, OidRegistry oidRegistry)
          Creates an empty BootstrapDitContentRuleRegistry.
 
Method Summary
 java.lang.String getSchemaName(java.lang.String id)
          Gets the name of the schema this schema object is associated with.
 boolean hasDITContentRule(java.lang.String id)
          Checks to see if a DITContentRule exists.
 java.util.Iterator list()
          Lists all the DITContentRules within this registry.
 DITContentRule lookup(java.lang.String id)
          Looks up a DITContentRule by its object identifier or by its name.
 void register(java.lang.String schema, DITContentRule dITContentRule)
          Registers a DITContentRule with this registry.
 void setMonitor(DITContentRuleRegistryMonitor 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

GlobalDitContentRuleRegistry

public GlobalDitContentRuleRegistry(BootstrapDitContentRuleRegistry bootstrap,
                                    OidRegistry oidRegistry)
Creates an empty BootstrapDitContentRuleRegistry.

Method Detail

setMonitor

public void setMonitor(DITContentRuleRegistryMonitor 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,
                     DITContentRule dITContentRule)
              throws javax.naming.NamingException
Description copied from interface: DITContentRuleRegistry
Registers a DITContentRule with this registry.

Specified by:
register in interface DITContentRuleRegistry
Parameters:
schema - the name of the schema the DITContentRule is associated with
dITContentRule - the DITContentRule to register
Throws:
javax.naming.NamingException - if the DITContentRule is already registered or the registration operation is not supported

lookup

public DITContentRule lookup(java.lang.String id)
                      throws javax.naming.NamingException
Description copied from interface: DITContentRuleRegistry
Looks up a DITContentRule by its object identifier or by its name.

Specified by:
lookup in interface DITContentRuleRegistry
Parameters:
id - the object identifier or name of the DITContentRule
Returns:
the DITContentRule instance for the id
Throws:
javax.naming.NamingException - if the DITContentRule does not exist

hasDITContentRule

public boolean hasDITContentRule(java.lang.String id)
Description copied from interface: DITContentRuleRegistry
Checks to see if a DITContentRule exists.

Specified by:
hasDITContentRule in interface DITContentRuleRegistry
Parameters:
id - the object identifier or name of the DITContentRule
Returns:
true if a DITContentRule definition exists for the id, false otherwise

getSchemaName

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

Specified by:
getSchemaName in interface DITContentRuleRegistry
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: DITContentRuleRegistry
Lists all the DITContentRules within this registry.

Specified by:
list in interface DITContentRuleRegistry
Returns:
Iterator over all the DITContentRules within this registry