Package com.saperion.ngc.main
Class HttpSessionWrapper
java.lang.Object
com.saperion.ngc.main.HttpSessionWrapper
This is a http session wrapper class. This class needs to be changed according to the session
handling of the specific frame work used.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Attribute name for the ALF map.static final String
Session attribute for the ClientInfoUtil instance.static final String
Name for http session attribute of a connector-instance.static final String
Attribute name for the set containing the IDs of open dialogs.static final String
Name for http session attribute of the document sessions.static final String
static final String
static final String
Session attribute set to true if SSO is used for login.static final String
Attribute name for a set of locked document IDs.static final String
Attribute name for the main window.static final String
static final String
static final String
static final String
Session attribute used to disable the logoff button when SSO is used.static final String
Name for http session attribute of the user.static final String
Name for web session attributestatic final String
Name for http session attribute of the viewer-popup beans.static final String
Name for http session attribute of a workflow connector-instance.static final String
Attribute name for the workflow ddc name. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new SessionWrapper using an internal http session.HttpSessionWrapper
(jakarta.servlet.http.HttpSession httpSession) Constructs a new SessionWrapper with a given http session. -
Method Summary
Modifier and TypeMethodDescriptionConvenience method to retrieve the alf-map attribute.getAttribute
(String key) Get the attribute for the given key.<T> T
getAttribute
(String key, Class<T> type) This method returns the session attribute with the specified key.Convenience method to retrieve the set with the document sessions id.org.zkoss.zul.Window
Returns the set containing the dialogs that are open in the current session.Convenience method to retrieve the map with the viewer-popup-beans.jakarta.servlet.http.HttpSession
Gets the session.Convenience method to retrieve the user attribute.boolean
Checks if the currently logged-on user uses an index-license.boolean
Returns true if the current session is working on a single-tenant-system.void
removeAttribute
(String key) Removes the attribute with the specified key from the current session.void
setAttribute
(String key, Object value) Set attribute in the current session.
-
Field Details
-
CONNECTOR_ATTR
Name for http session attribute of a connector-instance.- See Also:
-
WF_CONNECTOR_ATTR
Name for http session attribute of a workflow connector-instance.- See Also:
-
USER_ATTR
Name for http session attribute of the user.- See Also:
-
USER_WEB_SESSION_ATTR
Name for web session attribute- See Also:
-
VIEWER_POPUP_BEANS
Name for http session attribute of the viewer-popup beans.- See Also:
-
DOCUMENT_SESSION_ATTR
Name for http session attribute of the document sessions.- See Also:
-
LOCK_SET
Attribute name for a set of locked document IDs.- See Also:
-
MAIN_WINDOW
Attribute name for the main window.- See Also:
-
ALF_MAP_ATTR
Attribute name for the ALF map.- See Also:
-
WF_DDC_ATTR
Attribute name for the workflow ddc name.- See Also:
-
DIALOGS_SET_ATTR
Attribute name for the set containing the IDs of open dialogs.- See Also:
-
SSO_DISABLE_LOGOFF_BUTTON
Session attribute used to disable the logoff button when SSO is used.- See Also:
-
IS_SSO_LOGIN
Session attribute set to true if SSO is used for login.- See Also:
-
CLIENT_INFO_UTIL_ATTR
Session attribute for the ClientInfoUtil instance.- See Also:
-
IS_SHAREBASE_LOGGED_IN
- See Also:
-
IS_ONEDRIVE_LOGGED_IN
- See Also:
-
SHAREBASE_CLIENT
- See Also:
-
ONEDRIVE_CLIENT
- See Also:
-
SHAREBASE_CHECKOUT_FOLDER
- See Also:
-
-
Constructor Details
-
HttpSessionWrapper
public HttpSessionWrapper()Constructs a new SessionWrapper using an internal http session. -
HttpSessionWrapper
public HttpSessionWrapper(jakarta.servlet.http.HttpSession httpSession) Constructs a new SessionWrapper with a given http session.- Parameters:
httpSession
- The http session to use.
-
-
Method Details
-
setAttribute
Set attribute in the current session.- Parameters:
key
- The key of the attribute.value
- The value of the attribute.
-
removeAttribute
Removes the attribute with the specified key from the current session.- Parameters:
key
- of the attribute to remove
-
getAttribute
Get the attribute for the given key.- Parameters:
key
- The key to get the attribute for.- Returns:
- The object for the given key.
-
getAttribute
This method returns the session attribute with the specified key.- Type Parameters:
T
- type parameter- Parameters:
key
- key of the attributetype
- expected type of the attribute- Returns:
- the attribute or null if no such attribute exists.
-
getUserAttribute
Convenience method to retrieve the user attribute. Same asgetAttribute(USER_ATTR)
.- Returns:
- User attribute
-
getAlfMap
Convenience method to retrieve the alf-map attribute. Same asgetAttribute(ALF_MAP_ATTR)
. The alf-map contains the files the user has opened in the current session.- Returns:
- ALD map.
-
getPopupBeans
Convenience method to retrieve the map with the viewer-popup-beans. Same asgetAttribute(VIEWER_POPUP_BEANS)
. The map contains beans that define the document that is shown in a viewer-popup.- Returns:
- OpenPopupBean map
-
getDocumentSessions
Convenience method to retrieve the set with the document sessions id. Same asgetAttribute(DOCUMENT_SESSION_ATTR)
. The set contains the session id of documents generated by the Hyland Rendering and Conversion service.- Returns:
- document sessions set attribute
-
isSingleTenant
public boolean isSingleTenant()Returns true if the current session is working on a single-tenant-system.- Returns:
- is single tenant
-
getSession
public jakarta.servlet.http.HttpSession getSession()Gets the session.- Returns:
- the session
-
getMainWindow
public org.zkoss.zul.Window getMainWindow()- Returns:
- the main window of the application. Never null.
-
isIndexUser
public boolean isIndexUser()Checks if the currently logged-on user uses an index-license.- Returns:
- is index user
-
getOpenDialogs
Returns the set containing the dialogs that are open in the current session.- Returns:
- a set of dialog-IDs
-