Interface DitStructureRuleRegistry
- All Superinterfaces:
Iterable<DitStructureRule>, SchemaObjectRegistry<DitStructureRule>
- All Known Implementing Classes:
DefaultDitStructureRuleRegistry, ImmutableDitStructureRuleRegistry
public interface DitStructureRuleRegistry
extends SchemaObjectRegistry<DitStructureRule>, Iterable<DitStructureRule>
An DitStructureRule registry service interface.
- Author:
- Apache Directory Project
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(int ruleId) Checks to see if an DitStructureRule exists in the registry, by its ruleId.copy()Copy the DitStructureRuleRegistrygetSchemaName(int ruleId) Gets the name of the schema this schema object is associated with.iterator()Gets an iterator over the registered descriptions in the registry.lookup(int ruleId) Looks up an dITStructureRule by its unique Object IDentifier or by its name.voidregister(DitStructureRule ditStructureRule) Registers a new DitStructureRule with this registry.voidrenameSchema(String originalSchemaName, String newSchemaName) Modify all the DitStructureRule using a schemaName when this name changes.Gets an iterator over the registered ruleId in the registry.voidunregister(int ruleId) Unregisters a DitStructureRule using it's rule identifier.voidunregisterSchemaElements(String schemaName) Unregisters all DITStructureRules defined for a specific schema from this registry.Methods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface SchemaObjectRegistry
clear, contains, get, getOidByName, getSchemaName, getType, lookup, oidsIterator, size, unregister, unregister
-
Method Details
-
contains
boolean contains(int ruleId) Checks to see if an DitStructureRule exists in the registry, by its ruleId.- Parameters:
ruleId- the rule identifier of the DitStructureRule- Returns:
- true if a DitStructureRule definition exists for the ruleId, false otherwise
-
iterator
Iterator<DitStructureRule> iterator()Gets an iterator over the registered descriptions in the registry.- Specified by:
iteratorin interfaceIterable<DitStructureRule>- Specified by:
iteratorin interfaceSchemaObjectRegistry<DitStructureRule>- Returns:
- an Iterator of descriptions
-
ruleIdIterator
-
getSchemaName
Gets the name of the schema this schema object is associated with.- Parameters:
ruleId- the object identifier- Returns:
- the schema name
- Throws:
LdapException- if the schema object does not exist
-
register
Registers a new DitStructureRule with this registry.- Specified by:
registerin interfaceSchemaObjectRegistry<DitStructureRule>- Parameters:
ditStructureRule- the DitStructureRule to register- Throws:
LdapException- if the DitStructureRule is already registered or the registration operation is not supported
-
lookup
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
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
Unregisters all DITStructureRules defined for a specific schema from this registry.- Specified by:
unregisterSchemaElementsin interfaceSchemaObjectRegistry<DitStructureRule>- Parameters:
schemaName- the name of the schema whose syntaxCheckers will be removed from- Throws:
LdapException- if no such SchemaElement exists
-
renameSchema
Modify all the DitStructureRule using a schemaName when this name changes.- Specified by:
renameSchemain interfaceSchemaObjectRegistry<DitStructureRule>- Parameters:
originalSchemaName- The original Schema namenewSchemaName- The new Schema name- Throws:
LdapException- if the schema can't be renamed
-
copy
DitStructureRuleRegistry copy()Copy the DitStructureRuleRegistry- Specified by:
copyin interfaceSchemaObjectRegistry<DitStructureRule>- Returns:
- The copied registry
-