The ScreenContext interface
Defines all the methods that must be implemented by a SCREEN CONTEXT
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()
Deprecated. use ScreenRequest|ServiceRequest.getHttpSession() instead |
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()
Deprecated. use ScreenApplicationManager.getScreenApplication() instead |
int |
getScreenId()
Returns the ID of the screen context |
ScreenManager |
getScreenManager()
Deprecated. just for backward compatibility (will be removed), do not use |
java.lang.String |
getScreenName()
Returns the symbolic screen context name |
ScreenSession |
getScreenSession()
Deprecated. use ScreenRequest|ServiceRequest.getScreenSession() instead |
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 |
Method Detail |
public java.lang.String getScreenName()
public int getScreenId()
public ScreenApplication getScreenApplication()
public ScreenSession getScreenSession()
public javax.servlet.http.HttpSession getHttpSession()
public ScreenData getCurrentData()
public ScreenData createNewScreenData()
public ScreenData getOrCreateCurrentData()
public void setCurrentData(ScreenData data)
data
- the new ScreenData to setpublic void clearCurrentData()
public ScreenData beginAction()
public void cancelAction()
public ScreenData getTempData()
public ScreenData getDataForLoad()
public java.lang.Object setAttribute(java.lang.String name, java.lang.Object value)
name
- : a string specifying the name of the objectvalue
- : the value
public java.lang.Object getAttribute(java.lang.String name)
name
- : a string specifying the name of the object
public java.lang.Object removeAttribute(java.lang.String name)
name
- : a string specifying the name of the object
public ScreenActions getScreenActions()
public ScreenManager getScreenManager()
public ScreenActions getOrCreateScreenActions() throws TelosysException
TelosysException
- if the ScreenActions cannot be createdpublic boolean hasBeenReused()
public void eventCreate(ScreenSession screenSession, ScreenRequestParameters params) throws TelosysException
params
-
TelosysException
public void eventReuse(ScreenSession screenSession, ScreenRequestParameters params) throws TelosysException
params
-
TelosysException