public class DefaultDITStructureRuleRegistry extends DefaultSchemaObjectRegistry<DITStructureRule> implements DITStructureRuleRegistry
Modifier and Type | Field and Description |
---|---|
protected Map<Integer,DITStructureRule> |
byRuleId
a map of DITStructureRule looked up by RuleId
|
byName, oidRegistry, schemaObjectType
Constructor and Description |
---|
DefaultDITStructureRuleRegistry()
Creates a new default NormalizerRegistry instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(int ruleId)
Checks to see if an DITStructureRule exists in the registry, by its
ruleId.
|
DefaultDITStructureRuleRegistry |
copy()
Copy the DITStructureRuleRegistry
|
String |
getSchemaName(int ruleId)
Gets the name of the schema this schema object is associated with.
|
Iterator<DITStructureRule> |
iterator()
Gets an iterator over the registered schema objects 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 SchemaObject with this registry.
|
void |
renameSchema(String originalSchemaName,
String newSchemaName)
Modify all the SchemaObject using a schemaName when this name changes.
|
Iterator<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(String schemaName)
Unregisters all SchemaObjects defined for a specific schema from
this registry.
|
clear, contains, copy, get, getOidByName, getSchemaName, getType, lookup, oidsIterator, size, toString, unregister, unregister
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clear, contains, get, getOidByName, getSchemaName, getType, lookup, oidsIterator, size, unregister, unregister
protected Map<Integer,DITStructureRule> byRuleId
public DefaultDITStructureRuleRegistry()
public boolean contains(int ruleId)
contains
in interface DITStructureRuleRegistry
public Iterator<DITStructureRule> iterator()
iterator
in interface Iterable<DITStructureRule>
iterator
in interface DITStructureRuleRegistry
iterator
in interface SchemaObjectRegistry<DITStructureRule>
iterator
in class DefaultSchemaObjectRegistry<DITStructureRule>
public Iterator<Integer> ruleIdIterator()
ruleIdIterator
in interface DITStructureRuleRegistry
public String getSchemaName(int ruleId) throws LdapException
getSchemaName
in interface DITStructureRuleRegistry
LdapException
- if the schema object does not existpublic void register(DITStructureRule ditStructureRule) throws LdapException
register
in interface DITStructureRuleRegistry
register
in interface SchemaObjectRegistry<DITStructureRule>
register
in class DefaultSchemaObjectRegistry<DITStructureRule>
ditStructureRule
- the SchemaObject to registerLdapException
- if the SchemaObject is already registered or
the registration operation is not supportedpublic DITStructureRule lookup(int ruleId) throws LdapException
lookup
in interface DITStructureRuleRegistry
ruleId
- the rule identifier for the DITStructureRuleLdapException
- if the DITStructureRule does not existpublic void unregister(int ruleId) throws LdapException
unregister
in interface DITStructureRuleRegistry
ruleId
- the rule identifier for the DITStructureRule to unregisterLdapException
- if no such DITStructureRule existspublic void unregisterSchemaElements(String schemaName)
unregisterSchemaElements
in interface DITStructureRuleRegistry
unregisterSchemaElements
in interface SchemaObjectRegistry<DITStructureRule>
unregisterSchemaElements
in class DefaultSchemaObjectRegistry<DITStructureRule>
schemaName
- the name of the schema whose SchemaObjects will be removed frompublic void renameSchema(String originalSchemaName, String newSchemaName)
renameSchema
in interface DITStructureRuleRegistry
renameSchema
in interface SchemaObjectRegistry<DITStructureRule>
renameSchema
in class DefaultSchemaObjectRegistry<DITStructureRule>
originalSchemaName
- The original Schema namenewSchemaName
- The new Schema namepublic DefaultDITStructureRuleRegistry copy()
copy
in interface DITStructureRuleRegistry
copy
in interface SchemaObjectRegistry<DITStructureRule>
Copyright © 2003–2013 The Apache Software Foundation. All rights reserved.