public class ImmutableObjectClassRegistry extends Object implements ObjectClassRegistry, Cloneable
| Modifier and Type | Field and Description |
|---|---|
private ObjectClassRegistry |
immutableObjectClassRegistry
The wrapped ObjectClass registry
|
| Constructor and Description |
|---|
ImmutableObjectClassRegistry(ObjectClassRegistry ocRegistry)
Creates a new instance of ImmutableAttributeTypeRegistry.
|
| 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.
|
ImmutableObjectClassRegistry |
copy()
Clone the ObjectClassRegistry
|
Iterator<ObjectClass> |
descendants(String ancestorId)
Get's an iterator over the set of descendant ObjectClasses for
some ancestor's name alias or their OID.
|
ObjectClass |
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() |
boolean |
hasDescendants(String ancestorId)
Quick lookup to see if an objectClass has descendants.
|
Iterator<ObjectClass> |
iterator()
Gets an iterator over the registered schema objects in the registry.
|
ObjectClass |
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(ObjectClass objectClass)
Registers a new ObjectClass with this registry.
|
void |
registerDescendants(ObjectClass objectClass,
List<ObjectClass> ancestors)
Store the ObjectClass into a map associating an ObjectClass to its
descendants.
|
void |
renameSchema(String originalSchemaName,
String newSchemaName)
Modify all the SchemaObject using a schemaName when this name changes.
|
int |
size() |
ObjectClass |
unregister(ObjectClass schemaObject)
Removes the SchemaObject registered with this registry.
|
ObjectClass |
unregister(String numericOid)
Removes the ObjectClass registered with this registry.
|
void |
unregisterDescendants(ObjectClass attributeType,
List<ObjectClass> ancestors)
Remove the ObjectClass from the map associating an ObjectClass to its
descendants.
|
void |
unregisterSchemaElements(String schemaName)
Unregisters all SchemaObjects defined for a specific schema from
this registry.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprivate ObjectClassRegistry immutableObjectClassRegistry
public ImmutableObjectClassRegistry(ObjectClassRegistry ocRegistry)
ocRegistry - The wrapped Attrib uteType registrypublic boolean hasDescendants(String ancestorId) throws LdapException
hasDescendants in interface ObjectClassRegistryancestorId - the name alias or OID for an ObjectClassLdapException - if the ancestor ObjectClass cannot be
discerned from the ancestorId suppliedpublic Iterator<ObjectClass> descendants(String ancestorId) throws LdapException
descendants in interface ObjectClassRegistryancestorId - the name alias or OID for an ObjectClassLdapException - if the ancestor ObjectClass cannot be
discerned from the ancestorId suppliedpublic void registerDescendants(ObjectClass objectClass, List<ObjectClass> ancestors) throws LdapException
registerDescendants in interface ObjectClassRegistryobjectClass - The ObjectClass to registerancestors - Its ancestorsLdapException - If something went wrongpublic void unregisterDescendants(ObjectClass attributeType, List<ObjectClass> ancestors) throws LdapException
unregisterDescendants in interface ObjectClassRegistryattributeType - The ObjectClass to unregisterancestors - its ancestorsLdapException - If something went wrongpublic void register(ObjectClass objectClass) throws LdapException
register in interface ObjectClassRegistryregister in interface SchemaObjectRegistry<ObjectClass>objectClass - the ObjectClass to registerLdapException - if the ObjectClass is already registered or
the registration operation is not supportedpublic ObjectClass unregister(String numericOid) throws LdapException
unregister in interface ObjectClassRegistryunregister in interface SchemaObjectRegistry<ObjectClass>numericOid - the numeric identifierLdapException - if the numeric identifier is invalidpublic ImmutableObjectClassRegistry copy()
copy in interface ObjectClassRegistrycopy in interface SchemaObjectRegistry<ObjectClass>public int size()
size in interface SchemaObjectRegistry<ObjectClass>public boolean contains(String oid)
contains in interface SchemaObjectRegistry<ObjectClass>oid - the object identifier or name of the SchemaObjectpublic String getOidByName(String name) throws LdapException
getOidByName in interface SchemaObjectRegistry<ObjectClass>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<ObjectClass>oid - the object identifier or the nameLdapException - if the schema object does not existpublic SchemaObjectType getType()
getType in interface SchemaObjectRegistry<ObjectClass>public Iterator<ObjectClass> iterator()
iterator in interface Iterable<ObjectClass>iterator in interface SchemaObjectRegistry<ObjectClass>public ObjectClass lookup(String oid) throws LdapException
lookup in interface SchemaObjectRegistry<ObjectClass>oid - the object identifier or nameLdapException - if the SchemaObject does not existpublic Iterator<String> oidsIterator()
oidsIterator in interface SchemaObjectRegistry<ObjectClass>public void renameSchema(String originalSchemaName, String newSchemaName) throws LdapException
renameSchema in interface SchemaObjectRegistry<ObjectClass>originalSchemaName - The original Schema namenewSchemaName - The new Schema nameLdapException - if the schema object does not existpublic void unregisterSchemaElements(String schemaName) throws LdapException
unregisterSchemaElements in interface SchemaObjectRegistry<ObjectClass>schemaName - the name of the schema whose SchemaObjects will be removed fromLdapException - If we had a problem while unregistering the schemapublic ObjectClass get(String oid)
get in interface SchemaObjectRegistry<ObjectClass>oid - The SchemaObject's OID we are looking forpublic void clear()
throws LdapException
clear in interface SchemaObjectRegistry<ObjectClass>LdapException - If we had a failure while clearing the registrypublic ObjectClass unregister(ObjectClass schemaObject) throws LdapException
unregister in interface SchemaObjectRegistry<ObjectClass>schemaObject - the schemaObject to unregisterLdapException - if the schemaObject can't be unregistered is invalidCopyright © 2003–2019 The Apache Software Foundation. All rights reserved.