|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.util.registry.NamedObjectRegistry
public class NamedObjectRegistry
An generic registry of objects held by name. This is effectively a strongly-typed, synchronized map.
| Constructor Summary | |
|---|---|
NamedObjectRegistry()
Default constructor. |
|
NamedObjectRegistry(java.lang.Class type)
Constructor that takes care of NamedObjectRegistry.setStorageType(Class). |
|
| Method Summary | |
|---|---|
java.util.Map |
getAllNamedObjects()
|
java.lang.Object |
getNamedObject(java.lang.String name)
Get a named object if it has been registered |
void |
register(java.lang.String name,
java.lang.Object object)
Register a named object instance. |
void |
reset()
|
void |
setStorageType(java.lang.Class clazz)
Set the type of class that the registry holds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NamedObjectRegistry()
NamedObjectRegistry.setStorageType(Class) method must be called.
public NamedObjectRegistry(java.lang.Class type)
NamedObjectRegistry.setStorageType(Class).
NamedObjectRegistry.setStorageType(Class)| Method Detail |
|---|
public void setStorageType(java.lang.Class clazz)
clazz - the type to store
public void register(java.lang.String name,
java.lang.Object object)
name - the name of the objectobject - the instance to register, which correspond to the typepublic java.lang.Object getNamedObject(java.lang.String name)
name - the name of the object to retrieve
public java.util.Map getAllNamedObjects()
public void reset()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||