java.lang.Objectorg.objectweb.telosys.common.TelosysObject
org.objectweb.telosys.screen.core.StandardScreenContext
The standard ScreenContext implementation.
Constructor Summary | |
StandardScreenContext(java.lang.String sScreenName,
org.objectweb.telosys.screen.core.ScreenContextDefinition screenDefinition,
ScreenSession screenSession,
int iScreenId)
StandardScreenContext constructor |
Method Summary | |
ScreenData |
beginAction()
Notify the screen context that an action is about to alter the current screen data The action needs the current ScreenData instance to work with The screen context keep an image of the current ScreenData to do a "cancel" if needed |
void |
cancelAction()
Notify the screen context that the current action must be canceled The screen context restore the original ScreenData (from the ScreenData image) |
void |
clearCurrentData()
Remove the current ScreenData of the context After this operation, getCurrentData() returns 'null' |
ScreenData |
createNewScreenData()
Creates a new ScreenData instance and returns it. |
void |
eventCreate(ScreenSession screenSession,
ScreenRequestParameters params)
ScreenContext 'create' event |
void |
eventReuse(ScreenSession screenSession,
ScreenRequestParameters params)
ScreenContext 'reuse' event |
java.lang.Object |
getAttribute(java.lang.String name)
Gets an object (attribute) from the 'screen context storage space' with the given name If name is null : return null |
ScreenData |
getCurrentData()
Returns the current ScreenData of the context (can be null) |
ScreenData |
getDataForLoad()
Creates and returns a new ScreenData instance for 'load' operations |
javax.servlet.http.HttpSession |
getHttpSession()
Returns the standard HttpSession to which the ScreenContext belongs |
ScreenData |
getOrCreateCurrentData()
Returns the current ScreenData of the context if it's not null, if the current ScreenData is null : it is created, set as current and returned |
ScreenActions |
getOrCreateScreenActions()
Returns the current ScreenActions if not null, if null the current ScreenActions is created, set as current and returned |
ScreenActions |
getScreenActions()
Returns the specific ScreenActions associated with the ScreenContext |
ScreenApplication |
getScreenApplication()
Returns the ScreenApplication instance |
int |
getScreenId()
Returns the ID of the screen context |
ScreenManager |
getScreenManager()
Returns the ScreenManager associated with the ScreenContext This method replaces the "getScreenDataAccessor" method, |
java.lang.String |
getScreenName()
Returns the symbolic screen context name |
ScreenSession |
getScreenSession()
Returns the ScreenSession to which the ScreenContext belongs |
ScreenData |
getTempData()
Returns a temporary ScreenData instance for the operations which are working without modifying the current screen data |
boolean |
hasBeenReused()
Returns the state of the "reused" flag |
java.lang.Object |
removeAttribute(java.lang.String name)
Removes an object (attribute) from the 'screen context storage space' If name is null : do nothing and return null |
java.lang.Object |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets an object (attribute) in the 'screen context storage space', associated with a unique name If name is null : do nothing If value is null : remove the attribute associated with the given name |
void |
setCurrentData(ScreenData data)
Sets the given ScreenData as the new current ScreenData of the context |
java.lang.String |
toString()
|
Methods inherited from class org.objectweb.telosys.common.TelosysObject |
error, error, error, getFlagTrace, info, setFlagTrace, trace, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StandardScreenContext(java.lang.String sScreenName, org.objectweb.telosys.screen.core.ScreenContextDefinition screenDefinition, ScreenSession screenSession, int iScreenId)
sScreenName
- the symbolic screen namescreenDefinition
- the definition of the screen contextscreenSession
- the screen sessioniScreenId
- the screen ID ( 0 to N )Method Detail |
public java.lang.String getScreenName()
ScreenContext
getScreenName
in interface ScreenContext
public int getScreenId()
ScreenContext
getScreenId
in interface ScreenContext
public ScreenApplication getScreenApplication()
ScreenContext
getScreenApplication
in interface ScreenContext
public ScreenSession getScreenSession()
ScreenContext
getScreenSession
in interface ScreenContext
public javax.servlet.http.HttpSession getHttpSession()
ScreenContext
getHttpSession
in interface ScreenContext
public boolean hasBeenReused()
ScreenContext
hasBeenReused
in interface ScreenContext
public ScreenData getCurrentData()
ScreenContext
getCurrentData
in interface ScreenContext
public ScreenData getOrCreateCurrentData()
ScreenContext
getOrCreateCurrentData
in interface ScreenContext
public void setCurrentData(ScreenData data)
ScreenContext
setCurrentData
in interface ScreenContext
data
- the new ScreenData to setpublic void clearCurrentData()
ScreenContext
clearCurrentData
in interface ScreenContext
public ScreenActions getScreenActions()
ScreenContext
getScreenActions
in interface ScreenContext
public ScreenActions getOrCreateScreenActions() throws TelosysException
ScreenContext
getOrCreateScreenActions
in interface ScreenContext
TelosysException
- if the ScreenActions cannot be createdpublic ScreenManager getScreenManager()
ScreenContext
getScreenManager
in interface ScreenContext
public ScreenData createNewScreenData()
ScreenContext
createNewScreenData
in interface ScreenContext
public ScreenData beginAction()
ScreenContext
beginAction
in interface ScreenContext
public void cancelAction()
ScreenContext
cancelAction
in interface ScreenContext
public ScreenData getDataForLoad()
ScreenContext
getDataForLoad
in interface ScreenContext
public ScreenData getTempData()
ScreenContext
getTempData
in interface ScreenContext
public java.lang.Object setAttribute(java.lang.String name, java.lang.Object value)
ScreenContext
setAttribute
in interface ScreenContext
name
- : a string specifying the name of the objectvalue
- : the value
public java.lang.Object getAttribute(java.lang.String name)
ScreenContext
getAttribute
in interface ScreenContext
name
- : a string specifying the name of the object
public java.lang.Object removeAttribute(java.lang.String name)
ScreenContext
removeAttribute
in interface ScreenContext
name
- : a string specifying the name of the object
public void eventCreate(ScreenSession screenSession, ScreenRequestParameters params) throws TelosysException
ScreenContext
eventCreate
in interface ScreenContext
params
-
TelosysException
public void eventReuse(ScreenSession screenSession, ScreenRequestParameters params) throws TelosysException
ScreenContext
eventReuse
in interface ScreenContext
params
-
TelosysException
public java.lang.String toString()