public class ImmutableNormalizerRegistry extends Object implements NormalizerRegistry
Constructor and Description |
---|
ImmutableNormalizerRegistry(NormalizerRegistry normalizerRegistry)
Creates a new immutable NormalizerRegistry instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the registry from all its content
|
boolean |
contains(String oid)
Checks to see if an SchemaObject exists in the registry, by its
OID or name.
|
ImmutableNormalizerRegistry |
copy()
Copy the NormalizerRegistry
|
Normalizer |
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(String oid)
Gets the name of the schema this schema object is associated with.
|
SchemaObjectType |
getType() |
Iterator<Normalizer> |
iterator()
Gets an iterator over the registered schema objects in the registry.
|
Normalizer |
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(Normalizer normalizer)
Registers a new Normalizer with this registry.
|
void |
renameSchema(String originalSchemaName,
String newSchemaName)
Modify all the SchemaObject using a schemaName when this name changes.
|
int |
size() |
Normalizer |
unregister(Normalizer schemaObject)
Removes the SchemaObject registered with this registry.
|
Normalizer |
unregister(String numericOid)
Removes the Normalizer registered with this registry, using its
numeric OID.
|
void |
unregisterSchemaElements(String schemaName)
Unregisters all Normalizers defined for a specific schema from
this registry.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public ImmutableNormalizerRegistry(NormalizerRegistry normalizerRegistry)
normalizerRegistry
- The wrapped Normalizer registrypublic void register(Normalizer normalizer) throws LdapException
register
in interface NormalizerRegistry
register
in interface SchemaObjectRegistry<Normalizer>
normalizer
- the Normalizer to registerLdapException
- if the Normalizer is already registered or
the registration operation is not supportedpublic Normalizer unregister(String numericOid) throws LdapException
unregister
in interface NormalizerRegistry
unregister
in interface SchemaObjectRegistry<Normalizer>
numericOid
- the numeric identifierLdapException
- if the numeric identifier is invalidpublic void unregisterSchemaElements(String schemaName) throws LdapException
unregisterSchemaElements
in interface NormalizerRegistry
unregisterSchemaElements
in interface SchemaObjectRegistry<Normalizer>
schemaName
- the name of the schema whose Normalizers will be removed fromLdapException
- If we had a problem while unregistering the schemapublic ImmutableNormalizerRegistry copy()
copy
in interface NormalizerRegistry
copy
in interface SchemaObjectRegistry<Normalizer>
public int size()
size
in interface SchemaObjectRegistry<Normalizer>
public boolean contains(String oid)
contains
in interface SchemaObjectRegistry<Normalizer>
oid
- the object identifier or name of the SchemaObjectpublic String getOidByName(String name) throws LdapException
getOidByName
in interface SchemaObjectRegistry<Normalizer>
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<Normalizer>
oid
- the object identifier or the nameLdapException
- if the schema object does not existpublic SchemaObjectType getType()
getType
in interface SchemaObjectRegistry<Normalizer>
public Iterator<Normalizer> iterator()
iterator
in interface Iterable<Normalizer>
iterator
in interface SchemaObjectRegistry<Normalizer>
public Normalizer lookup(String oid) throws LdapException
lookup
in interface SchemaObjectRegistry<Normalizer>
oid
- the object identifier or nameLdapException
- if the SchemaObject does not existpublic Iterator<String> oidsIterator()
oidsIterator
in interface SchemaObjectRegistry<Normalizer>
public void renameSchema(String originalSchemaName, String newSchemaName) throws LdapException
renameSchema
in interface SchemaObjectRegistry<Normalizer>
originalSchemaName
- The original Schema namenewSchemaName
- The new Schema nameLdapException
- if the schema object does not existpublic Normalizer get(String oid)
get
in interface SchemaObjectRegistry<Normalizer>
oid
- The SchemaObject's OID we are looking forpublic void clear() throws LdapException
clear
in interface SchemaObjectRegistry<Normalizer>
LdapException
- If we had a failure while clearing the registrypublic Normalizer unregister(Normalizer schemaObject) throws LdapException
unregister
in interface SchemaObjectRegistry<Normalizer>
schemaObject
- the schemaObject to unregisterLdapException
- if the schemaObject can't be unregistered is invalidCopyright © 2003–2023 The Apache Software Foundation. All rights reserved.