public class DefaultSessionManager extends Object implements SessionManager
| Constructor and Description |
|---|
DefaultSessionManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
activateSession(String sessionId)
(Re)activates an existing session
|
protected void |
clearSessionInfo() |
void |
deactivateSession()
Deactivates the current session.
|
CometConfiguration |
getCometConfiguration()
Returns the CometConfiguration
|
String |
getImagePath(String imageName) |
MediaContext |
getMediaContext()
Returns the active MediaContext.
|
OS |
getOperatingSystem() |
PrintPublication |
getPublication()
Returns the publication that is currently used in the Comet.
|
PublicationController |
getPublicationController() |
LoginResult |
login(String login,
String passwd,
String client,
String language)
Logs in a Werk II Comet session
|
LogoutResult |
logout(String sessionId)
Logs out a Werk II Comet session
|
void |
setCometConfiguration(CometConfiguration config)
Sets the active CometConfiguration that should be used.
|
void |
setCometConfiguration(String configCode)
Sets the active CometConfiguration that should be used.
|
SetLanguageResult |
setLanguage(String sessionId,
String language)
Sets the language for the current Werk II Comet session
|
void |
setLocalSessionContext(Language language)
Sets the local SessionContext which will be used to retrieve and store values via Placeholders.
|
void |
setMediaContext(MediaContext context)
Sets the active MediaContext that should be used.
|
void |
setOperatingSystem(OS os) |
void |
setPublication(PrintPublication publication)
Sets the publication that should be used by Comet in the current session.
|
void |
setPublication(String id)
Sets the publication that should be used by Comet in the current session.
|
void |
setSessionLanguage(SessionContext ctx,
String isoCode)
Set the language for the given session context
|
void |
unsetLocalSessionContext()
Removes the local SessionContext set by setLocalSessionContext and also sets the old SessionUser.
|
public static final String LANGUAGES
public LoginResult login(String login, String passwd, String client, String language)
SessionManagerlogin in interface SessionManagerlogin - The user name for which to do the loginpasswd - The user's passwordclient - The client that should be used in the new sessionlanguage - The language that should be used in the new sessionpublic LogoutResult logout(String sessionId)
SessionManagerlogout in interface SessionManagersessionId - The session ID that shall be closedpublic SetLanguageResult setLanguage(String sessionId, String language)
SessionManagersetLanguage in interface SessionManagersessionId - The session ID for which to change the languagelanguage - The ISO code of the language to usepublic void setSessionLanguage(SessionContext ctx, String isoCode)
SessionManagersetSessionLanguage in interface SessionManagerctx - The SessionContext in which to change the languageisoCode - The ISO code of the language to usepublic void activateSession(String sessionId) throws SessionClosedException
SessionManageractivateSession in interface SessionManagersessionId - The ID of the session that shall be activatedSessionClosedException - If the session does not existpublic void deactivateSession()
SessionManagerdeactivateSession in interface SessionManagerpublic void setPublication(PrintPublication publication)
SessionManagersetPublication in interface SessionManagerpublication - the Publication which should be used in this sessionpublic void setPublication(String id)
SessionManagersetPublication in interface SessionManagerid - id of the publication to be setpublic PrintPublication getPublication()
SessionManagergetPublication in interface SessionManagerpublic CometConfiguration getCometConfiguration()
SessionManagergetCometConfiguration in interface SessionManagerprotected void clearSessionInfo()
public void setCometConfiguration(CometConfiguration config)
SessionManagersetCometConfiguration in interface SessionManagerconfig - The CometConfiguration which should be usedpublic void setCometConfiguration(String configCode)
SessionManagersetCometConfiguration in interface SessionManagerconfigCode - The code of the CometConfiguration which should be usedpublic MediaContext getMediaContext()
SessionManagergetMediaContext in interface SessionManagerpublic void setMediaContext(MediaContext context)
SessionManagersetMediaContext in interface SessionManagercontext - The media context which should be usedpublic void setLocalSessionContext(Language language)
setLocalSessionContext in interface SessionManagerlanguage - Language which should be used, can be null if the current session language should not be changedpublic void unsetLocalSessionContext()
unsetLocalSessionContext in interface SessionManagerpublic PublicationController getPublicationController()
getPublicationController in interface SessionManagerSessionManager.getPublicationController()public OS getOperatingSystem()
getOperatingSystem in interface SessionManagerpublic void setOperatingSystem(OS os)
setOperatingSystem in interface SessionManagerpublic String getImagePath(String imageName)
getImagePath in interface SessionManagerCopyright © 2017 SAP SE. All Rights Reserved.