org.objectweb.telosys.screen.core
Class StandardScreenData

java.lang.Object
  extended byorg.objectweb.telosys.common.TelosysObject
      extended byorg.objectweb.telosys.screen.core.StandardScreenData
All Implemented Interfaces:
ScreenData, java.io.Serializable

public class StandardScreenData
extends TelosysObject
implements ScreenData

The standard ScreenData implementation.

See Also:
Serialized Form

Constructor Summary
StandardScreenData()
           
 
Method Summary
 void bindElementToList(java.lang.String sElementName, java.lang.String sListName)
          Binds an "item element" to a "list element" Not used (!)
 void clear()
          Clear all the elements instances and reset the "found flag".
 void clearElements()
          Clears all the elements instances
 void copyElementsTo(ScreenData screenData)
          Copy all the elements to an other ScreenData instance
 void copyTo(ScreenData screenDataImage)
          Copy all the elements and the "found flag" to an other ScreenData instance.
 void defineElement(java.lang.String sElementName, java.lang.Class elementClass)
          Defines a screen data element
The element is only defined, not created.
 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 )
 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

StandardScreenData

public StandardScreenData()
Method Detail

defineElement

public void defineElement(java.lang.String sElementName,
                          java.lang.Class elementClass)
                   throws TelosysException
Defines a screen data element
The element is only defined, not created.

Parameters:
sElementName - : the logical name of the element
elementClass - : the class of the element
Throws:
TelosysException

bindElementToList

public void bindElementToList(java.lang.String sElementName,
                              java.lang.String sListName)
                       throws TelosysException
Binds an "item element" to a "list element" Not used (!)

Parameters:
sElementName -
sListName -
Throws:
TelosysException

copyElementsTo

public void copyElementsTo(ScreenData screenData)
Description copied from interface: ScreenData
Copy all the elements to an other ScreenData instance

Specified by:
copyElementsTo in interface ScreenData
Parameters:
screenData - : where to copy the elements

copyTo

public void copyTo(ScreenData screenDataImage)
Description copied from interface: ScreenData
Copy all the elements and the "found flag" to an other ScreenData instance. Creates an image of the initial instance.

Specified by:
copyTo in interface ScreenData
Parameters:
screenDataImage - : where to copy ( the clone/image instance )

setElement

public void setElement(java.lang.String sElementName,
                       java.lang.Object oElementInstance)
Description copied from interface: ScreenData
Sets the new element instance for the given element name

Specified by:
setElement in interface ScreenData
Parameters:
sElementName - : the element name
oElementInstance - : the element value to set ( instance )

getElement

public java.lang.Object getElement(java.lang.String sElementName)
Description copied from interface: ScreenData
Returns the element instance referenced by the given name

Specified by:
getElement in interface ScreenData
Parameters:
sElementName - : the element name
Returns:
: the element value ( instance )

isElementDefined

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

Specified by:
isElementDefined in interface ScreenData
Parameters:
sElementName - : the element name
Returns:
: true if defined, else false

getElementClass

public java.lang.Class getElementClass(java.lang.String sElementName)
Description copied from interface: ScreenData
Returns the class of the element referenced by the given name

Specified by:
getElementClass in interface ScreenData
Parameters:
sElementName - : the element name
Returns:
: the class

getScreenDataElement

public ScreenDataElement getScreenDataElement(java.lang.String sElementName)
Description copied from interface: ScreenData
Returns the ScreenDataElement object for the given name

Specified by:
getScreenDataElement in interface ScreenData
Parameters:
sElementName - : the element name
Returns:
: the ScreenDataElement instance ( element definition )

getElements

public ScreenDataElements getElements()
Description copied from interface: ScreenData
Returns the list of all the elements defined for the ScreenData

Specified by:
getElements in interface ScreenData
Returns:

clearElements

public void clearElements()
Description copied from interface: ScreenData
Clears all the elements instances

Specified by:
clearElements in interface ScreenData

clear

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

Specified by:
clear in interface ScreenData

setFound

public void setFound()
Description copied from interface: ScreenData
Declares the DATA as "found" ( sets the 'found flag' to false )

Specified by:
setFound in interface ScreenData

setNotFound

public void setNotFound()
Description copied from interface: ScreenData
Declares the DATA as "not found" ( sets the 'found flag' to true )

Specified by:
setNotFound in interface ScreenData

isFound

public boolean isFound()
Description copied from interface: ScreenData
Returns true is the screen data is considered as found

Specified by:
isFound in interface ScreenData
Returns:

toString

public java.lang.String toString()

exposeData

public void exposeData(javax.servlet.http.HttpServletRequest httpRequest)
Description copied from interface: ScreenData
Exposes all the data elements in the request scope

Specified by:
exposeData in interface ScreenData
Parameters:
httpRequest -