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

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

public class BootstrapDitStructureRuleRegistry
extends java.lang.Object
implements DITStructureRuleRegistry

A plain old java object implementation of an DITStructureRuleRegistry.

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

Constructor Summary
BootstrapDitStructureRuleRegistry(OidRegistry oidRegistry)
          Creates an empty BootstrapDitStructureRuleRegistry.
 
Method Summary
 java.lang.String getSchemaName(java.lang.String id)
          Gets the name of the schema this schema object is associated with.
 boolean hasDITStructureRule(java.lang.String id)
          Checks to see if an dITStructureRule exists.
 java.util.Iterator list()
          Lists all the DITStructureRules within this registry.
 org.apache.directory.shared.ldap.schema.DITStructureRule lookup(java.lang.String id)
          Looks up an dITStructureRule by its unique Object IDentifier or by its name.
 void register(java.lang.String schema, org.apache.directory.shared.ldap.schema.DITStructureRule dITStructureRule)
          Registers a DITStructureRule with this registry.
 void setMonitor(DITStructureRuleRegistryMonitor 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

BootstrapDitStructureRuleRegistry

public BootstrapDitStructureRuleRegistry(OidRegistry oidRegistry)
Creates an empty BootstrapDitStructureRuleRegistry.

Method Detail

setMonitor

public void setMonitor(DITStructureRuleRegistryMonitor 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.DITStructureRule dITStructureRule)
              throws javax.naming.NamingException
Description copied from interface: DITStructureRuleRegistry
Registers a DITStructureRule with this registry.

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

lookup

public org.apache.directory.shared.ldap.schema.DITStructureRule lookup(java.lang.String id)
                                                                throws javax.naming.NamingException
Description copied from interface: DITStructureRuleRegistry
Looks up an dITStructureRule by its unique Object IDentifier or by its name.

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

hasDITStructureRule

public boolean hasDITStructureRule(java.lang.String id)
Description copied from interface: DITStructureRuleRegistry
Checks to see if an dITStructureRule exists.

Specified by:
hasDITStructureRule in interface DITStructureRuleRegistry
Parameters:
id - the object identifier, or the name
Returns:
true if an dITStructureRule 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: DITStructureRuleRegistry
Gets the name of the schema this schema object is associated with.

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

Specified by:
list in interface DITStructureRuleRegistry
Returns:
an Iterator over all the DITStructureRules within this registry


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