public class ImmutableDitStructureRuleRegistry extends java.lang.Object implements DitStructureRuleRegistry
| Modifier and Type | Field and Description |
|---|---|
(package private) DitStructureRuleRegistry |
immutableDITStructureRuleRegistry
The wrapped DitStructureRule registry
|
| 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(java.lang.String oid)
Checks to see if an SchemaObject exists in the registry, by its
OID or name.
|
ImmutableDitStructureRuleRegistry |
copy()
Copy the DitStructureRuleRegistry
|
DitStructureRule |
get(java.lang.String oid)
Gets the SchemaObject associated with a given OID.
|
java.lang.String |
getOidByName(java.lang.String name)
Gets the numericOid for a name/alias if one is associated.
|
java.lang.String |
getSchemaName(int ruleId)
Gets the name of the schema this schema object is associated with.
|
java.lang.String |
getSchemaName(java.lang.String oid)
Gets the name of the schema this schema object is associated with.
|
SchemaObjectType |
getType() |
java.util.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(java.lang.String oid)
Looks up a SchemaObject by its unique Object Identifier or by name.
|
java.util.Iterator<java.lang.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(java.lang.String originalSchemaName,
java.lang.String newSchemaName)
Modify all the DitStructureRule using a schemaName when this name changes.
|
java.util.Iterator<java.lang.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(java.lang.String numericOid)
Removes the SchemaObject registered with this registry, using its
numeric OID.
|
void |
unregisterSchemaElements(java.lang.String schemaName)
Unregisters all DITStructureRules defined for a specific schema from
this registry.
|
DitStructureRuleRegistry immutableDITStructureRuleRegistry
public ImmutableDitStructureRuleRegistry(DitStructureRuleRegistry ditStructureRuleRegistry)
ditStructureRuleRegistry - The wrapped DitStructureRule registrypublic boolean contains(int ruleId)
contains in interface DitStructureRuleRegistryruleId - the rule identifier of the DitStructureRulepublic java.util.Iterator<DitStructureRule> iterator()
iterator in interface java.lang.Iterable<DitStructureRule>iterator in interface DitStructureRuleRegistryiterator in interface SchemaObjectRegistry<DitStructureRule>public java.util.Iterator<java.lang.Integer> ruleIdIterator()
ruleIdIterator in interface DitStructureRuleRegistrypublic java.lang.String getSchemaName(int ruleId)
throws LdapException
getSchemaName in interface DitStructureRuleRegistryruleId - the object identifierLdapException - 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(java.lang.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(java.lang.String originalSchemaName,
java.lang.String newSchemaName)
throws LdapException
renameSchema in interface DitStructureRuleRegistryrenameSchema in interface SchemaObjectRegistry<DitStructureRule>originalSchemaName - The original Schema namenewSchemaName - The new Schema nameLdapException - if the schema object does not existpublic ImmutableDitStructureRuleRegistry copy()
copy in interface DitStructureRuleRegistrycopy in interface SchemaObjectRegistry<DitStructureRule>public int size()
size in interface SchemaObjectRegistry<DitStructureRule>public boolean contains(java.lang.String oid)
contains in interface SchemaObjectRegistry<DitStructureRule>oid - the object identifier or name of the SchemaObjectpublic java.lang.String getOidByName(java.lang.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 java.lang.String getSchemaName(java.lang.String oid)
throws LdapException
getSchemaName in interface SchemaObjectRegistry<DitStructureRule>oid - the object identifier or the nameLdapException - if the schema object does not existpublic SchemaObjectType getType()
getType in interface SchemaObjectRegistry<DitStructureRule>public DitStructureRule lookup(java.lang.String oid) throws LdapException
lookup in interface SchemaObjectRegistry<DitStructureRule>oid - the object identifier or nameLdapException - if the SchemaObject does not existpublic java.util.Iterator<java.lang.String> oidsIterator()
oidsIterator in interface SchemaObjectRegistry<DitStructureRule>public DitStructureRule unregister(java.lang.String numericOid) throws LdapException
unregister in interface SchemaObjectRegistry<DitStructureRule>numericOid - the numeric identifierLdapException - if the numeric identifier is invalidpublic DitStructureRule get(java.lang.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>schemaObject - the schemaObject to unregisterLdapException - if the schemaObject can't be unregistered is invalid