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
|
DitStructureRule |
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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public ImmutableDitStructureRuleRegistry(DitStructureRuleRegistry ditStructureRuleRegistry)
ditStructureRuleRegistry
- The wrapped DitStructureRule registrypublic boolean contains(int ruleId)
contains
in interface DitStructureRuleRegistry
ruleId
- the rule identifier of the DitStructureRulepublic Iterator<DitStructureRule> iterator()
iterator
in interface Iterable<DitStructureRule>
iterator
in interface DitStructureRuleRegistry
iterator
in interface SchemaObjectRegistry<DitStructureRule>
public Iterator<Integer> ruleIdIterator()
ruleIdIterator
in interface DitStructureRuleRegistry
public String getSchemaName(int ruleId) throws LdapException
getSchemaName
in interface DitStructureRuleRegistry
ruleId
- the object identifierLdapException
- if the schema object does not existpublic void register(DitStructureRule ditStructureRule) throws LdapException
register
in interface DitStructureRuleRegistry
register
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 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) throws LdapException
unregisterSchemaElements
in interface DitStructureRuleRegistry
unregisterSchemaElements
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 DitStructureRuleRegistry
renameSchema
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 DitStructureRuleRegistry
copy
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>
oid
- the object identifier or the nameLdapException
- 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 DitStructureRule 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>
LdapException
- If we had a failure while clearing the registrypublic DitStructureRule unregister(DitStructureRule schemaObject) throws LdapException
unregister
in interface SchemaObjectRegistry<DitStructureRule>
schemaObject
- the schemaObject to unregisterLdapException
- if the schemaObject can't be unregistered is invalidCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.