|
||||||||||
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.DefaultSchemaObjectRegistry<T>
public abstract class DefaultSchemaObjectRegistry<T extends SchemaObject>
Common schema object registry interface.
Field Summary | |
---|---|
protected java.util.Map<java.lang.String,T> |
byName
a map of SchemaObject looked up by name |
protected OidRegistry |
oidRegistry
the global OID Registry |
protected SchemaObjectType |
schemaObjectType
The SchemaObject type, used by the toString() method |
Constructor Summary | |
---|---|
protected |
DefaultSchemaObjectRegistry(SchemaObjectType schemaObjectType,
OidRegistry oidRegistry)
Creates a new DefaultSchemaObjectRegistry instance. |
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. |
SchemaObjectRegistry<T> |
copy(SchemaObjectRegistry<T> original)
|
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()
|
java.util.Iterator<T> |
iterator()
Gets an iterator over the registered schema objects in the registry. |
T |
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(T 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()
|
java.lang.String |
toString()
|
T |
unregister(java.lang.String numericOid)
Removes the SchemaObject registered with this registry, using its numeric OID. |
T |
unregister(T schemaObject)
Removes the SchemaObject registered with this registry. |
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, wait, wait, wait |
Methods inherited from interface org.apache.directory.shared.ldap.schema.registries.SchemaObjectRegistry |
---|
copy |
Field Detail |
---|
protected java.util.Map<java.lang.String,T extends SchemaObject> byName
protected SchemaObjectType schemaObjectType
protected OidRegistry oidRegistry
Constructor Detail |
---|
protected DefaultSchemaObjectRegistry(SchemaObjectType schemaObjectType, OidRegistry oidRegistry)
Method Detail |
---|
public boolean contains(java.lang.String oid)
contains
in interface SchemaObjectRegistry<T extends SchemaObject>
oid
- the object identifier or name of the SchemaObject
public java.lang.String getSchemaName(java.lang.String oid) throws LdapException
getSchemaName
in interface SchemaObjectRegistry<T extends SchemaObject>
LdapException
- if the schema object does not existpublic void renameSchema(java.lang.String originalSchemaName, java.lang.String newSchemaName)
renameSchema
in interface SchemaObjectRegistry<T extends SchemaObject>
originalSchemaName
- The original Schema namenewSchemaName
- The new Schema namepublic java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T extends SchemaObject>
iterator
in interface SchemaObjectRegistry<T extends SchemaObject>
public java.util.Iterator<java.lang.String> oidsIterator()
oidsIterator
in interface SchemaObjectRegistry<T extends SchemaObject>
public T lookup(java.lang.String oid) throws LdapException
lookup
in interface SchemaObjectRegistry<T extends SchemaObject>
oid
- the object identifier or name
LdapException
- if the SchemaObject does not existpublic void register(T schemaObject) throws LdapException
register
in interface SchemaObjectRegistry<T extends SchemaObject>
schemaObject
- the SchemaObject to register
LdapException
- if the SchemaObject is already registered or
the registration operation is not supportedpublic T unregister(java.lang.String numericOid) throws LdapException
unregister
in interface SchemaObjectRegistry<T extends SchemaObject>
numericOid
- the numeric identifier
LdapException
- if the numeric identifier is invalidpublic T unregister(T schemaObject) throws LdapException
unregister
in interface SchemaObjectRegistry<T extends SchemaObject>
LdapException
- if the schemaObject can't be unregistered is invalidpublic void unregisterSchemaElements(java.lang.String schemaName) throws LdapException
unregisterSchemaElements
in interface SchemaObjectRegistry<T extends SchemaObject>
schemaName
- the name of the schema whose SchemaObjects will be removed from
LdapException
public java.lang.String getOidByName(java.lang.String name) throws LdapException
getOidByName
in interface SchemaObjectRegistry<T extends SchemaObject>
name
- The name we are looking the oid for
LdapException
- If the OID can't be foundpublic SchemaObjectRegistry<T> copy(SchemaObjectRegistry<T> original)
public SchemaObject get(java.lang.String oid)
get
in interface SchemaObjectRegistry<T extends SchemaObject>
oid
- The SchemaObject's OID we are looking for
public SchemaObjectType getType()
getType
in interface SchemaObjectRegistry<T extends SchemaObject>
public int size()
size
in interface SchemaObjectRegistry<T extends SchemaObject>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public void clear()
clear
in interface SchemaObjectRegistry<T extends SchemaObject>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |