|
||||||||||
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.ImmutableObjectClassRegistry
public class ImmutableObjectClassRegistry
An immutable wrapper of the ObjectClass registry.
Constructor Summary | |
---|---|
ImmutableObjectClassRegistry(ObjectClassRegistry ocRegistry)
Creates a new instance of ImmutableAttributeTypeRegistry. |
Method Summary | |
---|---|
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. |
ImmutableObjectClassRegistry |
copy()
Clone the ObjectClassRegistry |
java.util.Iterator<ObjectClass> |
descendants(java.lang.String ancestorId)
Get's an iterator over the set of descendant ObjectClasses for some ancestor's name alias or their OID. |
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(java.lang.String oid)
Gets the name of the schema this schema object is associated with. |
SchemaObjectType |
getType()
|
boolean |
hasDescendants(java.lang.String ancestorId)
Quick lookup to see if an objectClass has descendants. |
java.util.Iterator<ObjectClass> |
iterator()
Gets an iterator over the registered schema objects in the registry. |
ObjectClass |
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(ObjectClass objectClass)
Registers a new ObjectClass with this registry. |
void |
registerDescendants(ObjectClass objectClass,
java.util.List<ObjectClass> ancestors)
Store the ObjectClass into a map associating an ObjectClass to its descendants. |
void |
renameSchema(java.lang.String originalSchemaName,
java.lang.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(java.lang.String numericOid)
Removes the ObjectClass registered with this registry. |
void |
unregisterDescendants(ObjectClass attributeType,
java.util.List<ObjectClass> ancestors)
Remove the ObjectClass from the map associating an ObjectClass to its descendants. |
void |
unregisterSchemaElements(java.lang.String schemaName)
Unregisters all SchemaObjects 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 ImmutableObjectClassRegistry(ObjectClassRegistry ocRegistry)
atRegistry
- The wrapped Attrib uteType registryMethod Detail |
---|
public boolean hasDescendants(java.lang.String ancestorId) throws LdapException
hasDescendants
in interface ObjectClassRegistry
ancestorId
- the name alias or OID for an ObjectClass
LdapException
- if the ancestor ObjectClass cannot be
discerned from the ancestorId suppliedpublic java.util.Iterator<ObjectClass> descendants(java.lang.String ancestorId) throws LdapException
descendants
in interface ObjectClassRegistry
ancestorId
- the name alias or OID for an ObjectClass
LdapException
- if the ancestor ObjectClass cannot be
discerned from the ancestorId suppliedpublic void registerDescendants(ObjectClass objectClass, java.util.List<ObjectClass> ancestors) throws LdapException
registerDescendants
in interface ObjectClassRegistry
LdapException
- If something went wrongpublic void unregisterDescendants(ObjectClass attributeType, java.util.List<ObjectClass> ancestors) throws LdapException
unregisterDescendants
in interface ObjectClassRegistry
attributeType
- The ObjectClass to unregister
LdapException
- If something went wrongpublic void register(ObjectClass objectClass) throws LdapException
register
in interface ObjectClassRegistry
register
in interface SchemaObjectRegistry<ObjectClass>
objectClass
- the ObjectClass to register
LdapException
- if the ObjectClass is already registered or
the registration operation is not supportedpublic ObjectClass unregister(java.lang.String numericOid) throws LdapException
unregister
in interface ObjectClassRegistry
unregister
in interface SchemaObjectRegistry<ObjectClass>
numericOid
- the numeric identifier
LdapException
- if the numeric identifier is invalidpublic ImmutableObjectClassRegistry copy()
copy
in interface ObjectClassRegistry
copy
in interface SchemaObjectRegistry<ObjectClass>
public int size()
size
in interface SchemaObjectRegistry<ObjectClass>
public boolean contains(java.lang.String oid)
contains
in interface SchemaObjectRegistry<ObjectClass>
oid
- the object identifier or name of the SchemaObject
public java.lang.String getOidByName(java.lang.String name) throws LdapException
getOidByName
in interface SchemaObjectRegistry<ObjectClass>
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<ObjectClass>
LdapException
- if the schema object does not existpublic SchemaObjectType getType()
getType
in interface SchemaObjectRegistry<ObjectClass>
public java.util.Iterator<ObjectClass> iterator()
iterator
in interface java.lang.Iterable<ObjectClass>
iterator
in interface SchemaObjectRegistry<ObjectClass>
public ObjectClass lookup(java.lang.String oid) throws LdapException
lookup
in interface SchemaObjectRegistry<ObjectClass>
oid
- the object identifier or name
LdapException
- if the SchemaObject does not existpublic java.util.Iterator<java.lang.String> oidsIterator()
oidsIterator
in interface SchemaObjectRegistry<ObjectClass>
public void renameSchema(java.lang.String originalSchemaName, java.lang.String newSchemaName) throws LdapException
renameSchema
in interface SchemaObjectRegistry<ObjectClass>
originalSchemaName
- The original Schema namenewSchemaName
- The new Schema name
LdapException
- if the schema object does not existpublic void unregisterSchemaElements(java.lang.String schemaName) throws LdapException
unregisterSchemaElements
in interface SchemaObjectRegistry<ObjectClass>
schemaName
- the name of the schema whose SchemaObjects will be removed from
LdapException
public SchemaObject get(java.lang.String oid)
get
in interface SchemaObjectRegistry<ObjectClass>
oid
- The SchemaObject's OID we are looking for
public void clear() throws LdapException
clear
in interface SchemaObjectRegistry<ObjectClass>
LdapException
public ObjectClass unregister(ObjectClass schemaObject) throws LdapException
unregister
in interface SchemaObjectRegistry<ObjectClass>
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 |