org.objectweb.telosys.screen.core
Interface ScreenData

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
StandardScreenData

public interface ScreenData
extends java.io.Serializable

ScreenData interface


Method Summary
 void clear()
          Clear all the elements instances and reset the "found flag".
 void clearElements()
          Clears all the elements instances
 void copyElementsTo(ScreenData destination)
          Copy all the elements to an other ScreenData instance
 void copyTo(ScreenData theClone)
          Copy all the elements and the "found flag" to an other ScreenData instance.
 void exposeData(javax.servlet.http.HttpServletRequest httpRequest)
          Exposes all the data elements in the request scope
 java.lang.Object getElement(java.lang.String sElementName)
          Returns the element instance referenced by the given name
 java.lang.Class getElementClass(java.lang.String sElementName)
          Returns the class of the element referenced by the given name
 ScreenDataElements getElements()
          Returns the list of all the elements defined for the ScreenData
 ScreenDataElement getScreenDataElement(java.lang.String sElementName)
          Returns the ScreenDataElement object for the given name
 boolean isElementDefined(java.lang.String sElementName)
          Returns true if the given element name is defined in the current ScreenData.
 boolean isFound()
          Returns true is the screen data is considered as found
 void setElement(java.lang.String sElementName, java.lang.Object oElementInstance)
          Sets the new element instance for the given element name
 void setFound()
          Declares the DATA as "found" ( sets the 'found flag' to false )
 void setNotFound()
          Declares the DATA as "not found" ( sets the 'found flag' to true )
 

Method Detail

isElementDefined

public boolean isElementDefined(java.lang.String sElementName)
Returns true if the given element name is defined in the current ScreenData.

Parameters:
sElementName - : the element name
Returns:
: true if defined, else false

setElement

public void setElement(java.lang.String sElementName,
                       java.lang.Object oElementInstance)
Sets the new element instance for the given element name

Parameters:
sElementName - : the element name
oElementInstance - : the element value to set ( instance )
Throws:
TelosysRuntimeException - if the element is not defined in the current screen data

getElement

public java.lang.Object getElement(java.lang.String sElementName)
Returns the element instance referenced by the given name

Parameters:
sElementName - : the element name
Returns:
: the element value ( instance )
Throws:
TelosysRuntimeException - if the element is not defined in the current screen data

getElementClass

public java.lang.Class getElementClass(java.lang.String sElementName)
Returns the class of the element referenced by the given name

Parameters:
sElementName - : the element name
Returns:
: the class
Throws:
TelosysRuntimeException - if the element is not defined in the current screen data

getScreenDataElement

public ScreenDataElement getScreenDataElement(java.lang.String sElementName)
Returns the ScreenDataElement object for the given name

Parameters:
sElementName - : the element name
Returns:
: the ScreenDataElement instance ( element definition )
Throws:
TelosysRuntimeException - if the element is not defined in the current screen data

getElements

public ScreenDataElements getElements()
Returns the list of all the elements defined for the ScreenData

Returns:

clearElements

public void clearElements()
Clears all the elements instances


clear

public void clear()
Clear all the elements instances and reset the "found flag". Reset the instance in the same state as after a "new instance".


copyElementsTo

public void copyElementsTo(ScreenData destination)
Copy all the elements to an other ScreenData instance

Parameters:
destination - : where to copy the elements

copyTo

public void copyTo(ScreenData theClone)
Copy all the elements and the "found flag" to an other ScreenData instance. Creates an image of the initial instance.

Parameters:
theClone - : where to copy ( the clone/image instance )

setFound

public void setFound()
Declares the DATA as "found" ( sets the 'found flag' to false )


setNotFound

public void setNotFound()
Declares the DATA as "not found" ( sets the 'found flag' to true )


isFound

public boolean isFound()
Returns true is the screen data is considered as found

Returns:

exposeData

public void exposeData(javax.servlet.http.HttpServletRequest httpRequest)
Exposes all the data elements in the request scope

Parameters:
httpRequest -