Package com.webmethods.portal.framework
Interface ISessionManager
- All Superinterfaces:
IComponent
,IComponentProvider
,IInitializable
,IURIResolver
The ISessionManager manages current sessions inside of the
IPortalServlet
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
This session is a brand new sessionstatic final int
This session is an invalid session and should be treated as suchstatic final String
Setting this attribute tells the SessionManager to invalidate the session in it's removeLocalSession method.static final String
the flag indicating the error on the login requeststatic final String
the login keystatic final String
the logout keystatic final int
This session was determined to be a normal session, not requiring special processingstatic final String
the original request keystatic final String
This is used to register with the HttpSession as a listenerstatic final String
This is an attribute placed on the session that marks it as 'volatile'Fields inherited from interface com.webmethods.portal.system.IComponentProvider
ATTR_APP_NAME, ATTR_BEG_QUERY, ATTR_END_QUERY, ATTR_MID_QUERY, BIZPOLICY_MANAGER, CACHE_PROVIDER, COMMAND_PROVIDER, COMPONENTS_QUERY, INSTALL_PROVIDER, MECH_PROVIDER, METACONTEXT_PROVIDER, PHASE_PROVIDER, POLICY_PROVIDER, SEARCH_PROVIDER
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the given key to the set of keys that will be persisted when a session is morphed from an anonymous session to an non-anonymous session.int
handleSession
(HttpServletRequest request, HttpServletResponse response) This is the main entry for the ISessionManager.boolean
hasLoginError
(HttpServletRequest request) Determine if this request has a login errorboolean
isLoginRequest
(HttpServletRequest request) Determine if the user has logged into the systemvoid
removeLoginError
(HttpServletRequest request) Remove the login error keyvoid
removeLoginKey
(HttpServletRequest request) This removes the login attribute (@link #LOGIN_KEY} from the requestvoid
setLoginError
(HttpServletRequest request) Set this request with a login error flagvoid
setLoginKey
(HttpServletRequest request) boolean
checks if the given key should be persisted in a session that is changing from an anonymous user to a non-anonymous user.Methods inherited from interface com.webmethods.portal.system.IComponent
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
Methods inherited from interface com.webmethods.portal.system.IComponentProvider
exists, getComponent, getComponent, getComponent, getComponentQueryString, getComponents, getDefaultComponent, getLogger, initDeferredWebAppComponents, lookup, registerComponent, reloadComponent, reloadComponent, unregisterComponent, upgradeComponentDataFromBootstrapComponentData
Methods inherited from interface com.webmethods.portal.system.init.IInitializable
init, shutdown
Methods inherited from interface com.webmethods.portal.system.IURIResolver
acquireURI, acquireURI
-
Field Details
-
VOLATILE
This is an attribute placed on the session that marks it as 'volatile'- See Also:
-
LOGIN_KEY
the login key -
LOGOUT_KEY
the logout key- See Also:
-
INVALIDATE_KEY
Setting this attribute tells the SessionManager to invalidate the session in it's removeLocalSession method.- See Also:
-
ORIGINAL_REQUEST_KEY
the original request key- See Also:
-
LOGIN_ERROR_KEY
the flag indicating the error on the login request- See Also:
-
SESSION_LISTENER
This is used to register with the HttpSession as a listener- See Also:
-
NORMAL_SESSION
static final int NORMAL_SESSIONThis session was determined to be a normal session, not requiring special processing- See Also:
-
GUEST_SESSION
static final int GUEST_SESSIONThis session is a brand new session- See Also:
-
INVALID_SESSION
static final int INVALID_SESSIONThis session is an invalid session and should be treated as such- See Also:
-
-
Method Details
-
handleSession
This is the main entry for the ISessionManager. It allows the manager to verify the validity of the current session- Parameters:
request
-response
-- Returns:
- one of the ISessionManager response codes
- Throws:
PortalException
-
removeLoginKey
This removes the login attribute (@link #LOGIN_KEY} from the request -
setLoginKey
-
setLoginError
Set this request with a login error flag- See Also:
-
hasLoginError
Determine if this request has a login error- See Also:
-
removeLoginError
Remove the login error key- See Also:
-
isLoginRequest
Determine if the user has logged into the system- Parameters:
request
- the HttpRequest containing the session to validate- Returns:
- true if this request is a login request
-
addMorphedSessionPersistentKey
Adds the given key to the set of keys that will be persisted when a session is morphed from an anonymous session to an non-anonymous session.- Parameters:
key
- the key to add to the list of persisted keys.
-
shouldKeyPersistInMorphedSession
checks if the given key should be persisted in a session that is changing from an anonymous user to a non-anonymous user.- Parameters:
key
- the key to check for- Returns:
- true if the key should be persisted, false otherwise.
-