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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontains(int ruleId)Checks to see if an DitStructureRule exists in the registry, by its ruleId.DitStructureRuleRegistrycopy()Copy the DitStructureRuleRegistryStringgetSchemaName(int ruleId)Gets the name of the schema this schema object is associated with.Iterator<DitStructureRule>iterator()Gets an iterator over the registered descriptions in the registry.DitStructureRulelookup(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.Iterator<Integer>ruleIdIterator()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 java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.apache.directory.api.ldap.model.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:
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
Iterator<Integer> ruleIdIterator()
Gets an iterator over the registered ruleId in the registry.- Returns:
- an Iterator of ruleId
-
getSchemaName
String getSchemaName(int ruleId) throws LdapException
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
void register(DitStructureRule ditStructureRule) throws LdapException
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
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 LdapExceptionUnregisters 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(String schemaName) throws LdapException
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
void renameSchema(String originalSchemaName, String newSchemaName) throws LdapException
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
-
-