Class PlatformSessionServiceImpl
java.lang.Object
org.bonitasoft.engine.platform.session.impl.PlatformSessionServiceImpl
- All Implemented Interfaces:
PlatformSessionService
- Author:
- Elias Ricken de Medeiros, Matthieu Chaffotte
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSession(String username) Create a new session for the given user;voiddeleteSession(long sessionId) Delete a session having the given idlongRetrieve the default sessions's durationgetSession(long sessionId) Retrieve a session by its idlongRetrieve the duration of new created sessions.booleanisValid(long sessionId) Verify if a session is validvoidrenewSession(long sessionId) Update the expiration and the last update dates of the session.voidsetSessionDuration(long duration) Define how long new created sessions will be valid.
-
Constructor Details
-
PlatformSessionServiceImpl
-
-
Method Details
-
createSession
Description copied from interface:PlatformSessionServiceCreate a new session for the given user;- Specified by:
createSessionin interfacePlatformSessionService- Parameters:
username- user name- Returns:
- a new session
- Throws:
SSessionException- if some error arrives while creating the session
-
deleteSession
Description copied from interface:PlatformSessionServiceDelete a session having the given id- Specified by:
deleteSessionin interfacePlatformSessionService- Parameters:
sessionId- the session's id- Throws:
SSessionNotFoundException- if no session exists for the given id
-
isValid
Description copied from interface:PlatformSessionServiceVerify if a session is valid- Specified by:
isValidin interfacePlatformSessionService- Parameters:
sessionId- the session's id- Returns:
- true if the session is valid, false otherwise
- Throws:
SSessionNotFoundException
-
getSession
Description copied from interface:PlatformSessionServiceRetrieve a session by its id- Specified by:
getSessionin interfacePlatformSessionService- Parameters:
sessionId- the session's id- Returns:
- the session associated to the given id
- Throws:
SSessionNotFoundException- if no session exists for the given id
-
setSessionDuration
public void setSessionDuration(long duration) Description copied from interface:PlatformSessionServiceDefine how long new created sessions will be valid. This does not affect already created session- Specified by:
setSessionDurationin interfacePlatformSessionService- Parameters:
duration- session's duration
-
getDefaultSessionDuration
public long getDefaultSessionDuration()Description copied from interface:PlatformSessionServiceRetrieve the default sessions's duration- Specified by:
getDefaultSessionDurationin interfacePlatformSessionService- Returns:
- the default sessions's duration
-
getSessionsDuration
public long getSessionsDuration()Description copied from interface:PlatformSessionServiceRetrieve the duration of new created sessions. If no duration was specified, the default duration will be used- Specified by:
getSessionsDurationin interfacePlatformSessionService- Returns:
- the duration of new created sessions
-
renewSession
Description copied from interface:PlatformSessionServiceUpdate the expiration and the last update dates of the session.- Specified by:
renewSessionin interfacePlatformSessionService- Parameters:
sessionId- the session's id- Throws:
SSessionException
-