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 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

      Gets an iterator over the registered descriptions in the registry.
      Specified by:
      iterator in interface Iterable<DitStructureRule>
      Specified by:
      iterator in interface SchemaObjectRegistry<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:
      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(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(String originalSchemaName, 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

      Copy the DitStructureRuleRegistry
      Specified by:
      copy in interface SchemaObjectRegistry<DitStructureRule>
      Returns:
      The copied registry