com.extjs.gxt.ui.client
Class Registry

java.lang.Object
  extended by com.extjs.gxt.ui.client.event.BaseObservable
      extended by com.extjs.gxt.ui.client.Registry
All Implemented Interfaces:
Observable

public final class Registry
extends BaseObservable

A local storage of objects stored by id.


Field Summary
protected static java.util.Map<java.lang.String,java.lang.Object> map
           
 
Method Summary
static
<X> X
get(java.lang.String id)
          Returns the object with the given id.
static java.util.Map<java.lang.String,java.lang.Object> getAll()
          Returns a map of all registered objects.
static void register(java.lang.String id, java.lang.Object obj)
          Registers an object.
static void unregister(java.lang.String id)
          Unregisters an object.
static void unregisterAll()
          Unregisters all registered objects.
 
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable
addListener, callListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

protected static java.util.Map<java.lang.String,java.lang.Object> map
Method Detail

get

public static <X> X get(java.lang.String id)
Returns the object with the given id.

Parameters:
id - the identifier
Returns:
the object or null if no match

getAll

public static java.util.Map<java.lang.String,java.lang.Object> getAll()
Returns a map of all registered objects.

Returns:
the object map

register

public static void register(java.lang.String id,
                            java.lang.Object obj)
Registers an object.

Parameters:
id - the identifier
obj - the object to be registered

unregister

public static void unregister(java.lang.String id)
Unregisters an object.

Parameters:
id - the identifier

unregisterAll

public static void unregisterAll()
Unregisters all registered objects.