org.granite.client.tide
Class Context

java.lang.Object
  extended by org.granite.client.tide.Context

public class Context
extends Object

Author:
William DRAI

Constructor Summary
protected Context()
           
  Context(ContextManager contextManager, Context parentCtx, String contextId)
           
 
Method Summary
 Map<String,Object> allByAnnotatedWith(Class<? extends Annotation> annotationClass)
           
<T> T[]
allByType(Class<T> type)
           
<T> T[]
allByType(Class<T> type, boolean create)
           
 List<String> allNames()
           
<T> T
byName(String name)
           
<T> T
byNameNoProxy(String name)
           
<T> T
byType(Class<T> type)
           
 void callLater(Runnable runnable)
           
 void checkValid()
           
 void clear(boolean force)
           
 BeanManager getBeanManager()
           
 String getContextId()
           
 ContextManager getContextManager()
           
 DataManager getDataManager()
           
 EntityManager getEntityManager()
           
 EventBus getEventBus()
           
 Context getParentContext()
           
 void initContext(Platform platform, EventBus eventBus, BeanManager beanManager, InstanceStore instanceStore)
           
 void initInstance(Object instance, String name)
           
 boolean isContextIdFromServer()
           
 boolean isFinished()
           
 void markAsFinished()
           
 void postInit()
           
 void remove(String name)
           
 void set(Object instance)
           
 void set(String name, Object instance)
           
 void setContextId(String contextId, boolean fromServer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Context

protected Context()

Context

public Context(ContextManager contextManager,
               Context parentCtx,
               String contextId)
Method Detail

getContextManager

public ContextManager getContextManager()

getEntityManager

public EntityManager getEntityManager()

getDataManager

public DataManager getDataManager()

initContext

public void initContext(Platform platform,
                        EventBus eventBus,
                        BeanManager beanManager,
                        InstanceStore instanceStore)

getEventBus

public EventBus getEventBus()

getBeanManager

public BeanManager getBeanManager()

postInit

public void postInit()

getParentContext

public Context getParentContext()

getContextId

public String getContextId()

isContextIdFromServer

public boolean isContextIdFromServer()

isFinished

public boolean isFinished()

setContextId

public void setContextId(String contextId,
                         boolean fromServer)
Parameters:
contextId - context id
fromServer - is this id received from the server ?

byName

public <T> T byName(String name)

byNameNoProxy

public <T> T byNameNoProxy(String name)

byType

public <T> T byType(Class<T> type)

allByType

public <T> T[] allByType(Class<T> type)

allByType

public <T> T[] allByType(Class<T> type,
                         boolean create)

allByAnnotatedWith

public Map<String,Object> allByAnnotatedWith(Class<? extends Annotation> annotationClass)

allNames

public List<String> allNames()

set

public void set(String name,
                Object instance)

set

public void set(Object instance)

remove

public void remove(String name)

clear

public void clear(boolean force)

initInstance

public void initInstance(Object instance,
                         String name)

checkValid

public void checkValid()

callLater

public void callLater(Runnable runnable)

markAsFinished

public void markAsFinished()