org.apache.directory.shared.ldap.schema.registries
Interface DITStructureRuleRegistry

All Superinterfaces:
java.lang.Iterable<DITStructureRule>, SchemaObjectRegistry<DITStructureRule>
All Known Implementing Classes:
DefaultDITStructureRuleRegistry, ImmutableDITStructureRuleRegistry

public interface DITStructureRuleRegistry
extends SchemaObjectRegistry<DITStructureRule>, java.lang.Iterable<DITStructureRule>

An DITStructureRule registry service interface.

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

Method Summary
 boolean contains(int ruleId)
          Checks to see if an DITStructureRule exists in the registry, by its ruleId.
 DITStructureRuleRegistry copy()
          Copy the DITStructureRuleRegistry
 java.lang.String getSchemaName(int ruleId)
          Gets the name of the schema this schema object is associated with.
 java.util.Iterator<DITStructureRule> iterator()
          Gets an iterator over the registered descriptions in the registry.
 DITStructureRule lookup(int ruleId)
          Looks up an dITStructureRule by its unique Object IDentifier or by its name.
 void register(DITStructureRule ditStructureRule)
          Registers a new DITStructureRule with this registry.
 void renameSchema(java.lang.String originalSchemaName, java.lang.String newSchemaName)
          Modify all the DITStructureRule using a schemaName when this name changes.
 java.util.Iterator<java.lang.Integer> ruleIdIterator()
          Gets an iterator over the registered ruleId in the registry.
 void unregister(int ruleId)
          Unregisters a DITStructureRule using it's rule identifier.
 void unregisterSchemaElements(java.lang.String schemaName)
          Unregisters all DITStructureRules defined for a specific schema from this registry.
 
Methods inherited from interface org.apache.directory.shared.ldap.schema.registries.SchemaObjectRegistry
clear, contains, get, getOidByName, getSchemaName, getType, lookup, oidsIterator, size, unregister, unregister
 

Method Detail

contains

boolean contains(int ruleId)
Checks to see if an DITStructureRule exists in the registry, by its ruleId.

Parameters:
oid - the object identifier or name of the DITStructureRule
Returns:
true if a DITStructureRule definition exists for the ruleId, false otherwise

iterator

java.util.Iterator<DITStructureRule> iterator()
Gets an iterator over the registered descriptions in the registry.

Specified by:
iterator in interface java.lang.Iterable<DITStructureRule>
Specified by:
iterator in interface SchemaObjectRegistry<DITStructureRule>
Returns:
an Iterator of descriptions

ruleIdIterator

java.util.Iterator<java.lang.Integer> ruleIdIterator()
Gets an iterator over the registered ruleId in the registry.

Returns:
an Iterator of ruleId

getSchemaName

java.lang.String getSchemaName(int ruleId)
                               throws LdapException
Gets the name of the schema this schema object is associated with.

Parameters:
id - the object identifier or the name
Returns:
the schema name
Throws:
LdapException - if the schema object does not exist

register

void register(DITStructureRule ditStructureRule)
              throws LdapException
Registers a new DITStructureRule with this registry.

Specified by:
register in interface SchemaObjectRegistry<DITStructureRule>
Parameters:
ditStructureRule - the DITStructureRule to register
Throws:
LdapException - if the DITStructureRule is already registered or the registration operation is not supported

lookup

DITStructureRule lookup(int ruleId)
                        throws LdapException
Looks up an dITStructureRule by its unique Object IDentifier or by its name.

Parameters:
ruleId - the rule identifier for the DITStructureRule
Returns:
the DITStructureRule instance for rule identifier
Throws:
LdapException - if the DITStructureRule does not exist

unregister

void unregister(int ruleId)
                throws LdapException
Unregisters a DITStructureRule using it's rule identifier.

Parameters:
ruleId - the rule identifier for the DITStructureRule to unregister
Throws:
LdapException - if no such DITStructureRule exists

unregisterSchemaElements

void unregisterSchemaElements(java.lang.String schemaName)
                              throws LdapException
Unregisters all DITStructureRules defined for a specific schema from this registry.

Specified by:
unregisterSchemaElements in interface SchemaObjectRegistry<DITStructureRule>
Parameters:
schemaName - the name of the schema whose syntaxCheckers will be removed from
Throws:
LdapException - if no such SchemaElement exists

renameSchema

void renameSchema(java.lang.String originalSchemaName,
                  java.lang.String newSchemaName)
                  throws LdapException
Modify all the DITStructureRule using a schemaName when this name changes.

Specified by:
renameSchema in interface SchemaObjectRegistry<DITStructureRule>
Parameters:
originalSchemaName - The original Schema name
newSchemaName - The new Schema name
Throws:
LdapException - if the schema can't be renamed

copy

DITStructureRuleRegistry copy()
Copy the DITStructureRuleRegistry

Specified by:
copy in interface SchemaObjectRegistry<DITStructureRule>
Returns:
SchemaObjectRegistry The copied registry


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