|
||||||||||
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(java.lang.String oid)
Checks to see if an SchemaObject exists in the registry, by its OID or name. |
ImmutableDITStructureRuleRegistry |
copy()
Copy the DITStructureRuleRegistry |
SchemaObject |
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. |
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 registryMethod Detail |
---|
public boolean contains(int ruleId)
contains
in interface DITStructureRuleRegistry
public java.util.Iterator<DITStructureRule> iterator()
iterator
in interface java.lang.Iterable<DITStructureRule>
iterator
in interface DITStructureRuleRegistry
iterator
in interface SchemaObjectRegistry<DITStructureRule>
public java.util.Iterator<java.lang.Integer> ruleIdIterator()
ruleIdIterator
in interface DITStructureRuleRegistry
public java.lang.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>
ditStructureRule
- the DITStructureRule to register
LdapException
- 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 DITStructureRule
LdapException
- if the DITStructureRule does not existpublic void unregister(int ruleId) throws LdapException
unregister
in interface DITStructureRuleRegistry
ruleId
- the rule identifier for the DITStructureRule to unregister
LdapException
- if no such DITStructureRule existspublic void unregisterSchemaElements(java.lang.String schemaName) throws LdapException
unregisterSchemaElements
in interface DITStructureRuleRegistry
unregisterSchemaElements
in interface SchemaObjectRegistry<DITStructureRule>
schemaName
- the name of the schema whose syntaxCheckers will be removed from
LdapException
- if no such SchemaElement existspublic void renameSchema(java.lang.String originalSchemaName, java.lang.String newSchemaName) throws LdapException
renameSchema
in interface DITStructureRuleRegistry
renameSchema
in interface SchemaObjectRegistry<DITStructureRule>
originalSchemaName
- The original Schema namenewSchemaName
- The new Schema name
LdapException
- if the schema can't be renamedpublic ImmutableDITStructureRuleRegistry copy()
copy
in interface DITStructureRuleRegistry
copy
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 SchemaObject
public java.lang.String getOidByName(java.lang.String name) throws LdapException
getOidByName
in interface SchemaObjectRegistry<DITStructureRule>
name
- The name we are looking the oid for
LdapException
- If the OID can't be foundpublic java.lang.String getSchemaName(java.lang.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(java.lang.String oid) throws LdapException
lookup
in interface SchemaObjectRegistry<DITStructureRule>
oid
- the object identifier or name
LdapException
- 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 identifier
LdapException
- if the numeric identifier is invalidpublic SchemaObject get(java.lang.String oid)
get
in interface SchemaObjectRegistry<DITStructureRule>
oid
- The SchemaObject's OID we are looking for
public void clear() throws LdapException
clear
in interface SchemaObjectRegistry<DITStructureRule>
LdapException
public DITStructureRule unregister(DITStructureRule schemaObject) throws LdapException
unregister
in interface SchemaObjectRegistry<DITStructureRule>
LdapException
- 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 |