public class ImmutableLdapSyntaxRegistry extends java.lang.Object implements LdapSyntaxRegistry
| Modifier and Type | Field and Description |
|---|---|
(package private) LdapSyntaxRegistry |
immutableLdapSyntaxRegistry
The wrapped LdapSyntax registry
|
| Constructor and Description |
|---|
ImmutableLdapSyntaxRegistry(LdapSyntaxRegistry ldapSyntaxRegistry)
Creates a new instance of ImmutableLdapSyntaxRegistry.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the registry from all its content
|
boolean |
contains(java.lang.String oid)
Checks to see if an SchemaObject exists in the registry, by its
OID or name.
|
ImmutableLdapSyntaxRegistry |
copy()
Copy the LdapSyntaxRegistry
|
LdapSyntax |
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(java.lang.String oid)
Gets the name of the schema this schema object is associated with.
|
SchemaObjectType |
getType() |
java.util.Iterator<LdapSyntax> |
iterator()
Gets an iterator over the registered schema objects in the registry.
|
LdapSyntax |
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(LdapSyntax schemaObject)
Registers a new SchemaObject with this registry.
|
void |
renameSchema(java.lang.String originalSchemaName,
java.lang.String newSchemaName)
Modify all the SchemaObject using a schemaName when this name changes.
|
int |
size() |
LdapSyntax |
unregister(LdapSyntax schemaObject)
Removes the SchemaObject registered with this registry.
|
LdapSyntax |
unregister(java.lang.String numericOid)
Removes the SchemaObject registered with this registry, using its
numeric OID.
|
void |
unregisterSchemaElements(java.lang.String schemaName)
Unregisters all SchemaObjects defined for a specific schema from
this registry.
|
LdapSyntaxRegistry immutableLdapSyntaxRegistry
public ImmutableLdapSyntaxRegistry(LdapSyntaxRegistry ldapSyntaxRegistry)
ldapSyntaxRegistry - The wrapped LdapSyntax registrypublic ImmutableLdapSyntaxRegistry copy()
copy in interface LdapSyntaxRegistrycopy in interface SchemaObjectRegistry<LdapSyntax>public int size()
size in interface SchemaObjectRegistry<LdapSyntax>public boolean contains(java.lang.String oid)
contains in interface SchemaObjectRegistry<LdapSyntax>oid - the object identifier or name of the SchemaObjectpublic java.lang.String getOidByName(java.lang.String name)
throws LdapException
getOidByName in interface SchemaObjectRegistry<LdapSyntax>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<LdapSyntax>oid - the object identifier or the nameLdapException - if the schema object does not existpublic SchemaObjectType getType()
getType in interface SchemaObjectRegistry<LdapSyntax>public java.util.Iterator<LdapSyntax> iterator()
iterator in interface java.lang.Iterable<LdapSyntax>iterator in interface SchemaObjectRegistry<LdapSyntax>public LdapSyntax lookup(java.lang.String oid) throws LdapException
lookup in interface SchemaObjectRegistry<LdapSyntax>oid - the object identifier or nameLdapException - if the SchemaObject does not existpublic java.util.Iterator<java.lang.String> oidsIterator()
oidsIterator in interface SchemaObjectRegistry<LdapSyntax>public void register(LdapSyntax schemaObject) throws LdapException
register in interface SchemaObjectRegistry<LdapSyntax>schemaObject - the SchemaObject to registerLdapException - if the SchemaObject is already registered or
the registration operation is not supportedpublic void renameSchema(java.lang.String originalSchemaName,
java.lang.String newSchemaName)
throws LdapException
renameSchema in interface SchemaObjectRegistry<LdapSyntax>originalSchemaName - The original Schema namenewSchemaName - The new Schema nameLdapException - if the schema object does not existpublic LdapSyntax unregister(java.lang.String numericOid) throws LdapException
unregister in interface SchemaObjectRegistry<LdapSyntax>numericOid - the numeric identifierLdapException - if the numeric identifier is invalidpublic void unregisterSchemaElements(java.lang.String schemaName)
throws LdapException
unregisterSchemaElements in interface SchemaObjectRegistry<LdapSyntax>schemaName - the name of the schema whose SchemaObjects will be removed fromLdapExceptionpublic LdapSyntax get(java.lang.String oid)
get in interface SchemaObjectRegistry<LdapSyntax>oid - The SchemaObject's OID we are looking forpublic void clear()
throws LdapException
clear in interface SchemaObjectRegistry<LdapSyntax>LdapExceptionpublic LdapSyntax unregister(LdapSyntax schemaObject) throws LdapException
unregister in interface SchemaObjectRegistry<LdapSyntax>schemaObject - the schemaObject to unregisterLdapException - if the schemaObject can't be unregistered is invalid