org.eclnt.jsfserver.session

## Class SessionInfo

- java.lang.Object
- - org.eclnt.jsfserver.session.SessionInfo

- All Implemented Interfaces:
    java.io.Serializable, ICCServerConstants

      public class SessionInfo
      extends java.lang.Object
      implements java.io.Serializable, ICCServerConstants

  Inside the normal http session management all information that is internally required by CaptainCasa Enterprise Client is kept in one instance of this class SessionInfo.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from interface org.eclnt.jsfserver.util.ICCServerConstants

      `CLIENTJAVATYPE_FX, CLIENTJAVATYPE_SWING, CLIENTTYPE_APPLET, CLIENTTYPE_APPLICATION, CLIENTTYPE_BROWSER, CLIENTTYPE_RISC, CLIENTTYPE_UI5, CLIENTTYPE_WEBSTART, FOCUSSEQUENCE_FIX_PREFIX, QP_SUBPAGEID`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `applyLastRoundtripLocale(java.util.Locale l)` Directly applies locale.
    `void` | `applyLocaleSettingsAfterRendering(FacesContext context)`
    `void` | `applyLocaleSettingsAfterRestoringView(FacesContext context)` Internal use only.
    `void` | `applyLocaleSettingsBeforeRendering(FacesContext context)` Internal use only.
    `boolean` | `getClientIsInTestMode()`
    `java.lang.String` | `getClientJavaType()` If the client is a Java-client: indicator if the client type is a JavaFX client ("fx") or a JavaSwing client ("swing").
    `int` | `getClientTimeZoneOffset()`
    `static HttpSession` | `getCurrentHttpSession()` Returns the http session.
    `java.lang.String` | `getCurrentServerRequestId()`
    `long` | `getHtHighestFocusCounter()` Server side focus management for thin client processing (ht* components).
    `java.lang.String` | `getLastProcessedRequestId()`
    `java.lang.String` | `getLastServerRequestId()`
    `int` | `getNagleResponseSize()`
    `long` | `getNewRequestFocusCounter()` Creates a request focus counter that is used for the focus management of client side components.
    `boolean` | `getPageaddonsAdded()`
    `boolean` | `getProfileMode()` Profile mode - if true, then profile information is logged within this session.
    `static java.lang.String` | `getSessionDefaultStyleForJavaClient()`
    `static java.lang.String` | `getSessionDefaultStyleForRISCClient()`
    `static SessionInfo` | `getSessionInstance()` Get the session info for the current session.
    `static SessionInfo` | `getSessionInstance(HttpSession hs, HttpServletRequest request)`
    `java.lang.String` | `getStyle()` Style reference to /ecntjsfserver/styles subdirectory.
    `void` | `increaseRequestFocusCounter()` Increases the request focus counter.
    `static SessionInfo` | `readSessionInfoFromFile(java.lang.String xmlFileName, java.lang.String defaultStyle)` This method is used within the layout editor environment only.
    `static void` | `removeSessionInstance(HttpSession session, java.lang.String subpageId)`
    `void` | `setClientIsInTestMode(boolean clientIsInTestMode)`
    `void` | `setClientJavaType(java.lang.String clientJavaType)`
    `void` | `setClientTimeZoneOffset(int clientTimeZoneOffset)`
    `void` | `setCurrentServerRequestId(java.lang.String value)`
    `void` | `setHtHighestFocusCounter(long htHighestFocusCounter)`
    `void` | `setLastProcessedRequestId(java.lang.String value)`
    `void` | `setLastServerRequestId(java.lang.String value)`
    `void` | `setNagleResponseSize(int nagleResponseSize)`
    `void` | `setPageaddonsAdded(boolean value)`
    `void` | `setProfileMode(boolean profileMode)`
    `void` | `setStyle(java.lang.String value)`
    `void` | `setStyleAndReloadClient(java.lang.String value)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getSessionInstance

          public static SessionInfo getSessionInstance()

      Get the session info for the current session. If does not exist yet then it is created. The configuration file /eclntjsfserver/config/sessiondefaults.xml controls the defaults that are loaded into SesssionInfo.
      This method accesses the FacesContext in order to find the http session. The mehtod must only be called during the processing of a JSF request. If calling from other scenarios (e.g. from own servlet) then use the method variant in which you can pass the session as explicit parameter.

    - #### removeSessionInstance

          public static void removeSessionInstance(HttpSession session,
                                                   java.lang.String subpageId)

    - #### getSessionInstance

          public static SessionInfo getSessionInstance(HttpSession hs,
                                                       HttpServletRequest request)

    - #### getCurrentHttpSession

          public static HttpSession getCurrentHttpSession()

      Returns the http session. Only may be called during request processing.

    - #### setStyle

          public void setStyle(java.lang.String value)

    - #### setStyleAndReloadClient

          public void setStyleAndReloadClient(java.lang.String value)

    - #### getStyle

          public java.lang.String getStyle()

      Style reference to /ecntjsfserver/styles subdirectory. When changing the style then changes will be applied for any new elements loaded. Existing elements will remain unchanged.

    - #### applyLocaleSettingsAfterRestoringView

          public void applyLocaleSettingsAfterRestoringView(FacesContext context)

      Internal use only.
      Reapplies locale setting from last roudtrip.

    - #### applyLastRoundtripLocale

          public void applyLastRoundtripLocale(java.util.Locale l)

      Directly applies locale. Only usable for special scenarios, in which e.g. the locale is applied from outside the request processing.

    - #### applyLocaleSettingsBeforeRendering

          public void applyLocaleSettingsBeforeRendering(FacesContext context)

      Internal use only.
      Applies locale settings to the application. This method is called at the beginning of the rendering phase.

    - #### applyLocaleSettingsAfterRendering

          public void applyLocaleSettingsAfterRendering(FacesContext context)

    - #### increaseRequestFocusCounter

          public void increaseRequestFocusCounter()

      Increases the request focus counter. This function is called at the beginning of each request processing. Consequence: the request-focus-counter obtains a new highest value which typically is requested by calling `RequestFocusManager.getNewRequestFocusCounter()`. All components that need to obtain the focus receive the same request focus counter within one request processing - at client side the first one will actually receive the focus.

    - #### getNewRequestFocusCounter

          public long getNewRequestFocusCounter()

      Creates a request focus counter that is used for the focus management of client side components.

    - #### setPageaddonsAdded

          public void setPageaddonsAdded(boolean value)

    - #### getPageaddonsAdded

          public boolean getPageaddonsAdded()

    - #### readSessionInfoFromFile

          public static SessionInfo readSessionInfoFromFile(java.lang.String xmlFileName,
                                                            java.lang.String defaultStyle)

      This method is used within the layout editor environment only.

    - #### getClientIsInTestMode

          public boolean getClientIsInTestMode()

    - #### setClientIsInTestMode

          public void setClientIsInTestMode(boolean clientIsInTestMode)

    - #### getCurrentServerRequestId

          public java.lang.String getCurrentServerRequestId()

    - #### setCurrentServerRequestId

          public void setCurrentServerRequestId(java.lang.String value)

    - #### getLastServerRequestId

          public java.lang.String getLastServerRequestId()

    - #### setLastServerRequestId

          public void setLastServerRequestId(java.lang.String value)

    - #### setLastProcessedRequestId

          public void setLastProcessedRequestId(java.lang.String value)

    - #### getLastProcessedRequestId

          public java.lang.String getLastProcessedRequestId()

    - #### getNagleResponseSize

          public int getNagleResponseSize()

    - #### setNagleResponseSize

          public void setNagleResponseSize(int nagleResponseSize)

    - #### getHtHighestFocusCounter

          public long getHtHighestFocusCounter()

      Server side focus management for thin client processing (ht* components).

    - #### setHtHighestFocusCounter

          public void setHtHighestFocusCounter(long htHighestFocusCounter)

    - #### getProfileMode

          public boolean getProfileMode()

      Profile mode - if true, then profile information is logged within this session.

    - #### setProfileMode

          public void setProfileMode(boolean profileMode)

    - #### getSessionDefaultStyleForJavaClient

          public static java.lang.String getSessionDefaultStyleForJavaClient()

    - #### getSessionDefaultStyleForRISCClient

          public static java.lang.String getSessionDefaultStyleForRISCClient()

    - #### getClientJavaType

          public java.lang.String getClientJavaType()

      If the client is a Java-client: indicator if the client type is a JavaFX client ("fx") or a JavaSwing client ("swing").

    - #### setClientJavaType

          public void setClientJavaType(java.lang.String clientJavaType)

    - #### getClientTimeZoneOffset

          public int getClientTimeZoneOffset()

    - #### setClientTimeZoneOffset

          public void setClientTimeZoneOffset(int clientTimeZoneOffset)

Copyright © CaptainCasa Gmbh. All Rights Reserved.