com.ibm.xsp.application
Class SessionData

java.lang.Object
  extended by com.ibm.xsp.application.SessionData
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
PersistentSessionData

public class SessionData
extends java.lang.Object
implements java.io.Externalizable

Session data. This class handles all the attributes saved by the runtime context.

See Also:
Serialized Form

Field Summary
static int CLIENT_TZ_DONE
           
static int CLIENT_TZ_EXTRASCRIPT
           
static int CLIENT_TZ_INITIAL
           
static int CLIENT_TZ_REDIRECT
           
 
Constructor Summary
SessionData(FacesContextEx context)
          Required by Externalizable
 
Method Summary
 java.util.TimeZone getClientTimeZone()
          Gets the clientTimeZone.
 int getClientTimeZoneState()
          This property tells if the client TZ requests has been sent to the browser.
 ComponentData getComponentData()
          Get the component related data.
 ComponentParameters getComponentParameters()
          Get the component parameters.
 java.util.Locale getLocale()
          Get the locale property
 java.lang.String getProperty(java.lang.String propName)
          Get a session property.
 java.lang.String[] getRunningContext()
          Get the runtime context.
 java.util.TimeZone getTimeZone()
          Get the timeZone
 java.lang.String getUrl(int level)
          Get a URL in the stack.
 java.lang.String[] getUrls()
          Get the URLs in the stack.
 java.lang.String popPreviousUrl()
          Pop the URL of the previous page.
 java.lang.String popTemporaryViewId()
          Return the temporary view id.
 void pushTemporaryViewId(java.lang.String temporaryViewId)
           
 void pushUrl(UIViewRootEx root)
          Push a url to the stack, if not the current one.
 void readExternal(java.io.ObjectInput in)
           
 void setClientTimeZone(java.util.TimeZone clientTimeZone)
          Sets the client time zone
 void setClientTimeZoneState(int timeZoneState)
          This property tells if the client TZ requests has been sent to the browser.
 void setComponentData(ComponentData componentData)
          Set the component related data.
 void setLocale(java.util.Locale locale)
          Sets the locale
 void setProperty(java.lang.String propName, java.lang.String value)
          Set a session property.
 void setRunningContext(java.lang.String[] runningContext)
          Set the runtime context.
 void setTimeZone(java.util.TimeZone timeZone)
          Sets the time zone
 void updateUrl(UIViewRootEx root)
          Update the URL for the current view.
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLIENT_TZ_INITIAL

public static final int CLIENT_TZ_INITIAL
See Also:
Constant Field Values

CLIENT_TZ_REDIRECT

public static final int CLIENT_TZ_REDIRECT
See Also:
Constant Field Values

CLIENT_TZ_EXTRASCRIPT

public static final int CLIENT_TZ_EXTRASCRIPT
See Also:
Constant Field Values

CLIENT_TZ_DONE

public static final int CLIENT_TZ_DONE
See Also:
Constant Field Values
Constructor Detail

SessionData

public SessionData(FacesContextEx context)
Required by Externalizable

Parameters:
{@link - javax.faces.context.FacesContext}
Method Detail

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

getLocale

public java.util.Locale getLocale()
Get the locale property

Returns:
Returns the locale.

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale

Parameters:
locale -

getTimeZone

public java.util.TimeZone getTimeZone()
Get the timeZone

Returns:
Returns the timeZone.

getClientTimeZoneState

public int getClientTimeZoneState()
This property tells if the client TZ requests has been sent to the browser.

Returns:
current state of the time zone

setClientTimeZoneState

public void setClientTimeZoneState(int timeZoneState)
This property tells if the client TZ requests has been sent to the browser.

Parameters:
the - time zone state

setTimeZone

public void setTimeZone(java.util.TimeZone timeZone)
Sets the time zone

Parameters:
{@link - java.util.TimeZone}

getClientTimeZone

public java.util.TimeZone getClientTimeZone()
Gets the clientTimeZone.

Returns:
TimeZone.

setClientTimeZone

public void setClientTimeZone(java.util.TimeZone clientTimeZone)
Sets the client time zone

Parameters:
{@link - java.util.TimeZone}.

getProperty

public java.lang.String getProperty(java.lang.String propName)
Get a session property.

Returns:
Returns the property value

setProperty

public void setProperty(java.lang.String propName,
                        java.lang.String value)
Set a session property.

Parameters:
propName - property name
value - value to be set

getComponentParameters

public ComponentParameters getComponentParameters()
Get the component parameters.

Returns:
the component parameters

getComponentData

public ComponentData getComponentData()
Get the component related data.

Returns:
Returns the component data.

setComponentData

public void setComponentData(ComponentData componentData)
Set the component related data.

Parameters:
data - The new component data

getRunningContext

public java.lang.String[] getRunningContext()
Get the runtime context.

Returns:
the runtime context

setRunningContext

public void setRunningContext(java.lang.String[] runningContext)
Set the runtime context.

Parameters:
mode - runtime context

getUrl

public java.lang.String getUrl(int level)
Get a URL in the stack.

Returns:
the URL as a string, or null if not available.

getUrls

public java.lang.String[] getUrls()
Get the URLs in the stack.

Returns:
the URLs as a string array.

popPreviousUrl

public java.lang.String popPreviousUrl()
Pop the URL of the previous page. Note that the URLs of the current page and the previous one are popped out from the queue.

Returns:
the URL as a string, or null if not available.

pushUrl

public void pushUrl(UIViewRootEx root)
Push a url to the stack, if not the current one. This called by the view root the first time, so its url is pushed to the stack.


updateUrl

public void updateUrl(UIViewRootEx root)
Update the URL for the current view. This is called by the view root later on, so its url is replaced by a new one. This happens, for example, after a redirect.


popTemporaryViewId

public java.lang.String popTemporaryViewId()
Return the temporary view id. This id temporarily stores the view unique id after a redirectToPreviousPage(). We don't want the id to be part of the redirect URL, as it won't make it reliably bookmarkable, so we hold it in this temporary variable. The FacesContextEx reads it when it initializes.

Returns:
temporary view id.

pushTemporaryViewId

public void pushTemporaryViewId(java.lang.String temporaryViewId)