public class ImmutableComparatorRegistry extends Object implements ComparatorRegistry
| Constructor and Description |
|---|
ImmutableComparatorRegistry(ComparatorRegistry comparatorRegistry)
Creates a new immutable ComparatorRegistry 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.
|
ImmutableComparatorRegistry |
copy()
Copy the ComparatorRegistry
|
LdapComparator<?> |
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<LdapComparator<?>> |
iterator()
Gets an iterator over the registered schema objects in the registry.
|
LdapComparator<?> |
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(LdapComparator<?> comparator)
Registers a new LdapComparator with this registry.
|
void |
renameSchema(String originalSchemaName,
String newSchemaName)
Modify all the SchemaObject using a schemaName when this name changes.
|
int |
size() |
LdapComparator<?> |
unregister(LdapComparator<?> schemaObject)
Removes the SchemaObject registered with this registry.
|
LdapComparator<?> |
unregister(String numericOid)
Removes the LdapComparator registered with this registry, using its
numeric OID.
|
void |
unregisterSchemaElements(String schemaName)
Unregisters all LdapComparators defined for a specific schema from
this registry.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic ImmutableComparatorRegistry(ComparatorRegistry comparatorRegistry)
comparatorRegistry - The wrapped LdapComparator registrypublic void register(LdapComparator<?> comparator) throws LdapException
register in interface ComparatorRegistryregister in interface SchemaObjectRegistry<LdapComparator<?>>comparator - the LdapComparator to registerLdapException - if the LdapComparator is already registered or
the registration operation is not supportedpublic LdapComparator<?> unregister(String numericOid) throws LdapException
unregister in interface ComparatorRegistryunregister in interface SchemaObjectRegistry<LdapComparator<?>>numericOid - the numeric identifierLdapException - if the numeric identifier is invalidpublic void unregisterSchemaElements(String schemaName) throws LdapException
unregisterSchemaElements in interface ComparatorRegistryunregisterSchemaElements in interface SchemaObjectRegistry<LdapComparator<?>>schemaName - the name of the schema whose LdapComparators will be removed fromLdapExceptionpublic ImmutableComparatorRegistry copy()
copy in interface ComparatorRegistrycopy in interface SchemaObjectRegistry<LdapComparator<?>>public int size()
size in interface SchemaObjectRegistry<LdapComparator<?>>public boolean contains(String oid)
contains in interface SchemaObjectRegistry<LdapComparator<?>>oid - the object identifier or name of the SchemaObjectpublic String getOidByName(String name) throws LdapException
getOidByName in interface SchemaObjectRegistry<LdapComparator<?>>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<LdapComparator<?>>oid - the object identifier or the nameLdapException - if the schema object does not existpublic SchemaObjectType getType()
getType in interface SchemaObjectRegistry<LdapComparator<?>>public Iterator<LdapComparator<?>> iterator()
iterator in interface Iterable<LdapComparator<?>>iterator in interface SchemaObjectRegistry<LdapComparator<?>>public LdapComparator<?> lookup(String oid) throws LdapException
lookup in interface SchemaObjectRegistry<LdapComparator<?>>oid - the object identifier or nameLdapException - if the SchemaObject does not existpublic Iterator<String> oidsIterator()
oidsIterator in interface SchemaObjectRegistry<LdapComparator<?>>public void renameSchema(String originalSchemaName, String newSchemaName) throws LdapException
renameSchema in interface SchemaObjectRegistry<LdapComparator<?>>originalSchemaName - The original Schema namenewSchemaName - The new Schema nameLdapException - if the schema object does not existpublic LdapComparator<?> get(String oid)
get in interface SchemaObjectRegistry<LdapComparator<?>>oid - The SchemaObject's OID we are looking forpublic void clear()
throws LdapException
clear in interface SchemaObjectRegistry<LdapComparator<?>>LdapExceptionpublic LdapComparator<?> unregister(LdapComparator<?> schemaObject) throws LdapException
unregister in interface SchemaObjectRegistry<LdapComparator<?>>schemaObject - the schemaObject to unregisterLdapException - if the schemaObject can't be unregistered is invalidCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.