|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.ldap.schema.registries.ImmutableDITStructureRuleRegistry
public class ImmutableDITStructureRuleRegistry
An immutable wrapper of the DITStructureRule registry.
| Constructor Summary | |
|---|---|
ImmutableDITStructureRuleRegistry(DITStructureRuleRegistry ditStructureRuleRegistry)
Creates a new instance of ImmutableDITStructureRuleRegistry. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImmutableDITStructureRuleRegistry(DITStructureRuleRegistry ditStructureRuleRegistry)
ditStructureRuleRegistry - The wrapped DITStructureRule registry| Method Detail |
|---|
public 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 DITStructureRuleRegistry
public String getSchemaName(int ruleId)
throws NamingException
getSchemaName in interface DITStructureRuleRegistryNamingException - if the schema object does not exist
public void register(DITStructureRule ditStructureRule)
throws NamingException
register in interface DITStructureRuleRegistryregister in interface SchemaObjectRegistry<DITStructureRule>ditStructureRule - the DITStructureRule to register
NamingException - if the DITStructureRule is already registered or
the registration operation is not supported
public DITStructureRule lookup(int ruleId)
throws NamingException
lookup in interface DITStructureRuleRegistryruleId - the rule identifier for the DITStructureRule
NamingException - if the DITStructureRule does not exist
public void unregister(int ruleId)
throws NamingException
unregister in interface DITStructureRuleRegistryruleId - the rule identifier for the DITStructureRule to unregister
NamingException - if no such DITStructureRule exists
public void unregisterSchemaElements(String schemaName)
throws NamingException
unregisterSchemaElements in interface DITStructureRuleRegistryunregisterSchemaElements in interface SchemaObjectRegistry<DITStructureRule>schemaName - the name of the schema whose syntaxCheckers will be removed from
NamingException - if no such SchemaElement exists
public void renameSchema(String originalSchemaName,
String newSchemaName)
throws NamingException
renameSchema in interface DITStructureRuleRegistryrenameSchema in interface SchemaObjectRegistry<DITStructureRule>originalSchemaName - The original Schema namenewSchemaName - The new Schema name
NamingException - 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 SchemaObject
public String getOidByName(String name)
throws NamingException
getOidByName in interface SchemaObjectRegistry<DITStructureRule>name - The name we are looking the oid for
NamingException - If the OID can't be found
public String getSchemaName(String oid)
throws NamingException
getSchemaName in interface SchemaObjectRegistry<DITStructureRule>NamingException - if the schema object does not existpublic SchemaObjectType getType()
getType in interface SchemaObjectRegistry<DITStructureRule>
public DITStructureRule lookup(String oid)
throws NamingException
lookup in interface SchemaObjectRegistry<DITStructureRule>oid - the object identifier or name
NamingException - if the SchemaObject does not existpublic Iterator<String> oidsIterator()
oidsIterator in interface SchemaObjectRegistry<DITStructureRule>
public DITStructureRule unregister(String numericOid)
throws NamingException
unregister in interface SchemaObjectRegistry<DITStructureRule>numericOid - the numeric identifier
NamingException - if the numeric identifier is invalidpublic SchemaObject get(String oid)
get in interface SchemaObjectRegistry<DITStructureRule>oid - The SchemaObject's OID we are looking for
public void clear()
throws NamingException
clear in interface SchemaObjectRegistry<DITStructureRule>NamingException
public DITStructureRule unregister(DITStructureRule schemaObject)
throws NamingException
unregister in interface SchemaObjectRegistry<DITStructureRule>NamingException - if the schemaObject can't be unregistered is invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||