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

java.lang.Object
  extended by org.apache.directory.server.schema.registries.DefaultSyntaxCheckerRegistry
All Implemented Interfaces:
SyntaxCheckerRegistry

public class DefaultSyntaxCheckerRegistry
extends java.lang.Object
implements SyntaxCheckerRegistry

The POJO implementation for the SyntaxCheckerRegistry service.

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

Constructor Summary
DefaultSyntaxCheckerRegistry()
          Creates an instance of a DefaultSyntaxRegistry.
 
Method Summary
 java.lang.String getSchemaName(java.lang.String oid)
          Gets the name of the schema this schema object is associated with.
 boolean hasSyntaxChecker(java.lang.String oid)
          Checks to see if a SyntaxChecker exists.
 java.util.Iterator<org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker> iterator()
          Get's an iterator over all the syntaxCheckers associated with this registry.
 org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker lookup(java.lang.String oid)
          Looks up a SyntaxChecker by its unique Object Identifier.
 void register(org.apache.directory.shared.ldap.schema.syntax.SyntaxCheckerDescription syntaxCheckerDescription, org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker syntaxChecker)
          Registers a SyntaxChecker with this registry.
 void renameSchema(java.lang.String originalSchemaName, java.lang.String newSchemaName)
          Renames the schemaName associated with entities within this registry to a new schema name.
 java.util.Iterator<org.apache.directory.shared.ldap.schema.syntax.SyntaxCheckerDescription> syntaxCheckerDescriptionIterator()
          Get's an iterator over all the syntaxCheckerDescriptions associated with this registry.
 void unregister(java.lang.String numericOid)
          Unregisters a registered syntaxChecker from this registry.
 void unregisterSchemaElements(java.lang.String schemaName)
          Unregisters all syntaxCheckers defined for a specific schema from this registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSyntaxCheckerRegistry

public DefaultSyntaxCheckerRegistry()
Creates an instance of a DefaultSyntaxRegistry.

Method Detail

register

public void register(org.apache.directory.shared.ldap.schema.syntax.SyntaxCheckerDescription syntaxCheckerDescription,
                     org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker syntaxChecker)
              throws javax.naming.NamingException
Description copied from interface: SyntaxCheckerRegistry
Registers a SyntaxChecker with this registry.

Specified by:
register in interface SyntaxCheckerRegistry
Parameters:
syntaxCheckerDescription - the syntaxCheckerDescription for this syntaxChecker
syntaxChecker - the SyntaxChecker to register
Throws:
javax.naming.NamingException - if the SyntaxChecker is already registered or the registration operation is not supported

lookup

public org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker lookup(java.lang.String oid)
                                                                    throws javax.naming.NamingException
Description copied from interface: SyntaxCheckerRegistry
Looks up a SyntaxChecker by its unique Object Identifier.

Specified by:
lookup in interface SyntaxCheckerRegistry
Parameters:
oid - the object identifier
Returns:
the SyntaxChecker for the oid
Throws:
javax.naming.NamingException - if there is a backing store failure or the SyntaxChecker does not exist.

hasSyntaxChecker

public boolean hasSyntaxChecker(java.lang.String oid)
Description copied from interface: SyntaxCheckerRegistry
Checks to see if a SyntaxChecker exists. Backing store failures simply return false.

Specified by:
hasSyntaxChecker in interface SyntaxCheckerRegistry
Parameters:
oid - the object identifier
Returns:
true if a SyntaxChecker definition exists for the oid, false otherwise

getSchemaName

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

Specified by:
getSchemaName in interface SyntaxCheckerRegistry
Parameters:
oid - the object identifier
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.syntax.SyntaxChecker> iterator()
Description copied from interface: SyntaxCheckerRegistry
Get's an iterator over all the syntaxCheckers associated with this registry.

Specified by:
iterator in interface SyntaxCheckerRegistry
Returns:
an Iterator over all the syntaxCheckers

unregister

public void unregister(java.lang.String numericOid)
                throws javax.naming.NamingException
Description copied from interface: SyntaxCheckerRegistry
Unregisters a registered syntaxChecker from this registry.

Specified by:
unregister in interface SyntaxCheckerRegistry
Parameters:
numericOid - the numeric oid of the syntax this checker is associated with
Throws:
javax.naming.NamingException - if the numericOid is not valid

unregisterSchemaElements

public void unregisterSchemaElements(java.lang.String schemaName)
Description copied from interface: SyntaxCheckerRegistry
Unregisters all syntaxCheckers defined for a specific schema from this registry.

Specified by:
unregisterSchemaElements in interface SyntaxCheckerRegistry
Parameters:
schemaName - the name of the schema whose syntaxCheckers will be removed

renameSchema

public void renameSchema(java.lang.String originalSchemaName,
                         java.lang.String newSchemaName)
Description copied from interface: SyntaxCheckerRegistry
Renames the schemaName associated with entities within this registry to a new schema name.

Specified by:
renameSchema in interface SyntaxCheckerRegistry
Parameters:
originalSchemaName - the original schema name
newSchemaName - the new name to give to the schema

syntaxCheckerDescriptionIterator

public java.util.Iterator<org.apache.directory.shared.ldap.schema.syntax.SyntaxCheckerDescription> syntaxCheckerDescriptionIterator()
Description copied from interface: SyntaxCheckerRegistry
Get's an iterator over all the syntaxCheckerDescriptions associated with this registry.

Specified by:
syntaxCheckerDescriptionIterator in interface SyntaxCheckerRegistry
Returns:
an Iterator over all the syntaxCheckerDescriptions


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