public class ImmutableDITStructureRuleRegistry extends Object implements DITStructureRuleRegistry
| Constructor and Description |
|---|
ImmutableDITStructureRuleRegistry(DITStructureRuleRegistry ditStructureRuleRegistry)
Creates a new instance of ImmutableDITStructureRuleRegistry.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the registry from all its content
|
boolean |
contains(int ruleId)
Checks to see if an DITStructureRule exists in the registry, by its
ruleId.
|
boolean |
contains(String oid)
Checks to see if an SchemaObject exists in the registry, by its
OID or name.
|
ImmutableDITStructureRuleRegistry |
copy()
Copy the DITStructureRuleRegistry
|
SchemaObject |
get(String oid)
Gets the SchemaObject associated with a given OID.
|
String |
getOidByName(String name)
Gets the numericOid for a name/alias if one is associated.
|
String |
getSchemaName(int ruleId)
Gets the name of the schema this schema object is associated with.
|
String |
getSchemaName(String oid)
Gets the name of the schema this schema object is associated with.
|
SchemaObjectType |
getType() |
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.
|
DITStructureRule |
lookup(String oid)
Looks up a SchemaObject by its unique Object Identifier or by name.
|
Iterator<String> |
oidsIterator()
Gets an iterator over the registered schema objects'OID in the registry.
|
void |
register(DITStructureRule ditStructureRule)
Registers a new DITStructureRule with this registry.
|
void |
renameSchema(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.
|
int |
size() |
DITStructureRule |
unregister(DITStructureRule schemaObject)
Removes the SchemaObject registered with this registry.
|
void |
unregister(int ruleId)
Unregisters a DITStructureRule using it's rule identifier.
|
DITStructureRule |
unregister(String numericOid)
Removes the SchemaObject registered with this registry, using its
numeric OID.
|
void |
unregisterSchemaElements(String schemaName)
Unregisters all DITStructureRules defined for a specific schema from
this registry.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic ImmutableDITStructureRuleRegistry(DITStructureRuleRegistry ditStructureRuleRegistry)
ditStructureRuleRegistry - The wrapped DITStructureRule registrypublic boolean contains(int ruleId)
contains in interface DITStructureRuleRegistrypublic Iterator<DITStructureRule> iterator()
iterator in interface Iterable<DITStructureRule>iterator in interface DITStructureRuleRegistryiterator in interface SchemaObjectRegistry<DITStructureRule>public Iterator<Integer> ruleIdIterator()
ruleIdIterator in interface DITStructureRuleRegistrypublic String getSchemaName(int ruleId) throws LdapException
getSchemaName in interface DITStructureRuleRegistryLdapException - if the schema object does not existpublic void register(DITStructureRule ditStructureRule) throws LdapException
register in interface DITStructureRuleRegistryregister in interface SchemaObjectRegistry<DITStructureRule>ditStructureRule - the DITStructureRule to registerLdapException - if the DITStructureRule is already registered or
the registration operation is not supportedpublic DITStructureRule lookup(int ruleId) throws LdapException
lookup in interface DITStructureRuleRegistryruleId - the rule identifier for the DITStructureRuleLdapException - if the DITStructureRule does not existpublic void unregister(int ruleId)
throws LdapException
unregister in interface DITStructureRuleRegistryruleId - the rule identifier for the DITStructureRule to unregisterLdapException - if no such DITStructureRule existspublic void unregisterSchemaElements(String schemaName) throws LdapException
unregisterSchemaElements in interface DITStructureRuleRegistryunregisterSchemaElements in interface SchemaObjectRegistry<DITStructureRule>schemaName - the name of the schema whose syntaxCheckers will be removed fromLdapException - if no such SchemaElement existspublic void renameSchema(String originalSchemaName, String newSchemaName) throws LdapException
renameSchema in interface DITStructureRuleRegistryrenameSchema in interface SchemaObjectRegistry<DITStructureRule>originalSchemaName - The original Schema namenewSchemaName - The new Schema nameLdapException - if the schema can't be renamedpublic ImmutableDITStructureRuleRegistry copy()
copy in interface DITStructureRuleRegistrycopy in interface SchemaObjectRegistry<DITStructureRule>public int size()
size in interface SchemaObjectRegistry<DITStructureRule>public boolean contains(String oid)
contains in interface SchemaObjectRegistry<DITStructureRule>oid - the object identifier or name of the SchemaObjectpublic String getOidByName(String name) throws LdapException
getOidByName in interface SchemaObjectRegistry<DITStructureRule>name - The name we are looking the oid forLdapException - If the OID can't be foundpublic String getSchemaName(String oid) throws LdapException
getSchemaName in interface SchemaObjectRegistry<DITStructureRule>LdapException - if the schema object does not existpublic SchemaObjectType getType()
getType in interface SchemaObjectRegistry<DITStructureRule>public DITStructureRule lookup(String oid) throws LdapException
lookup in interface SchemaObjectRegistry<DITStructureRule>oid - the object identifier or nameLdapException - if the SchemaObject does not existpublic Iterator<String> oidsIterator()
oidsIterator in interface SchemaObjectRegistry<DITStructureRule>public DITStructureRule unregister(String numericOid) throws LdapException
unregister in interface SchemaObjectRegistry<DITStructureRule>numericOid - the numeric identifierLdapException - if the numeric identifier is invalidpublic SchemaObject get(String oid)
get in interface SchemaObjectRegistry<DITStructureRule>oid - The SchemaObject's OID we are looking forpublic void clear()
throws LdapException
clear in interface SchemaObjectRegistry<DITStructureRule>LdapExceptionpublic DITStructureRule unregister(DITStructureRule schemaObject) throws LdapException
unregister in interface SchemaObjectRegistry<DITStructureRule>LdapException - if the schemaObject can't be unregistered is invalidCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.