|
JavaGantt 2011.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.beesoft.gaia.app.Context
public class Context
Context is a data holder for session and controller. Because all controllers are singletons, this is the only one place where can be stored data between the client requests.
Method Summary | |
---|---|
Context |
close()
Closes this context. |
boolean |
containsValue(java.lang.Class<?> clazz)
Returns true if the context map contains an entry with the name of the given class. |
boolean |
containsValue(java.lang.String name)
Returns true if the context map contains an entry with given name. |
java.lang.Object |
findValue(java.lang.Class<?> clazz)
Returns a value from the context entry with a name of the given class. |
java.lang.Object |
findValue(java.lang.String name)
Returns a value from the context entry with the given name. |
Application |
getApplication()
Returns an application to which this context belongs. |
Context |
getCurrentContext()
Returns a current context. |
Context |
getChildContext()
Returns a child context of this context. |
Context |
getParentContext()
Returns a parent context of this context. |
Controller |
getRunner()
Returns a controller which is using this context. |
Controller |
getStarter()
Returns a controller which created this context. |
java.lang.Object |
getValue(java.lang.Class<?> clazz)
Returns a value from the context entry with a name of the given class. |
java.lang.Object |
getValue(java.lang.String name)
Returns a value from the context entry with the given name. |
boolean |
isClosed()
Returns true if this context is closed (unusable). |
void |
removeValue(java.lang.Class<?> clazz)
Removes an entry with the name of the given class from the context map. |
void |
removeValue(java.lang.String name)
Removes an entry with given name from the context map. |
void |
setRunner(Controller runner)
Sets a controller which is using this context. |
void |
setValue(java.lang.Class<?> clazz,
java.lang.Object value)
Sets an entry with the name of the given class and with given value to the context map. |
void |
setValue(java.lang.String name,
java.lang.Object value)
Sets an entry with given name and value to the context map. |
Context |
startNewContext(Controller starter,
Controller runner)
Creates a new context with this as its parent and given starter and runner controllers. |
java.lang.String |
toString()
Returns a string representation of this context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public Controller getStarter()
public Controller getRunner()
public void setRunner(Controller runner)
runner
- - a controller to setpublic Context getParentContext()
public Context getChildContext()
public Context getCurrentContext()
public Application getApplication()
public void setValue(java.lang.String name, java.lang.Object value)
name
- - name of the context entryvalue
- - value of the context entrypublic void setValue(java.lang.Class<?> clazz, java.lang.Object value)
clazz
- - a name of this class is a name of the context entryvalue
- - value of the context entrypublic void removeValue(java.lang.String name)
name
- - name of the context entry to removepublic void removeValue(java.lang.Class<?> clazz)
clazz
- - name of this class is the name of the context entry to
removepublic boolean containsValue(java.lang.String name)
name
- - name of the context entry to check
public boolean containsValue(java.lang.Class<?> clazz)
clazz
- - a name of this class is an entry name in the context to
check
public java.lang.Object getValue(java.lang.String name)
name
- - name of context entry
public java.lang.Object getValue(java.lang.Class<?> clazz)
clazz
- - name of this class is a name of the searched context entry
public java.lang.Object findValue(java.lang.String name)
name
- - name of context entry
public java.lang.Object findValue(java.lang.Class<?> clazz)
clazz
- - name of this class is a name of the searched context entry
public Context startNewContext(Controller starter, Controller runner)
starter
- - a controller that invokes this methodrunner
- - a controller for which is the new context dedicated
public Context close()
public boolean isClosed()
public java.lang.String toString()
toString
in class java.lang.Object
|
JavaGantt 2011.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |