2.17.2: 2011-06-17

net.sf.basedb.ws.server
Class SessionService

java.lang.Object
  extended by net.sf.basedb.ws.server.AbstractRPCService
      extended by net.sf.basedb.ws.server.SessionService

public class SessionService
extends AbstractRPCService

Web service class for Session in BASE Session

Version:
2.5
Author:
Nicklas, Martin

Field Summary
 
Fields inherited from class net.sf.basedb.ws.server.AbstractRPCService
util
 
Constructor Summary
SessionService()
           
 
Method Summary
 String getChallenge(String ID)
          Service for net.sf.basedb.core.SessionControl#getChallenge()
 Integer getSessionTimeOut()
          Gets the time in minutes when a session is automatically logged out.
 VersionInfo getVersion()
          Return information about which Base version is in use.
 String login(String ID, String login, String password, String comment, boolean encrypted)
          Service to login to BASE
 String logout(String ID)
          Service to logout from BASE
 String newSession(String externalClientId)
          Creates a new session control.
 String refreshSession(String ID)
          Refresh a session so the time for logging out will be reset.
 
Methods inherited from class net.sf.basedb.ws.server.AbstractRPCService
attachFile, getRemoteId, getSessionControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionService

public SessionService()
Method Detail

newSession

public String newSession(String externalClientId)
Creates a new session control.

Parameters:
externalClientId - The external id of a BASE client, or null if the application hasn't been registered as a client application
Returns:
Session id as a String

getChallenge

public String getChallenge(String ID)
Service for net.sf.basedb.core.SessionControl#getChallenge()

Parameters:
ID -
Returns:
String A radom string

login

public String login(String ID,
                    String login,
                    String password,
                    String comment,
                    boolean encrypted)
Service to login to BASE

Parameters:
ID - Id of a session control
login - Login name for the account to use
password - Password for the login above.
comment - Comment to be used with the new session
encrypted - If encrypted password should be used or not.
Returns:
The Session ID

logout

public String logout(String ID)
Service to logout from BASE

Parameters:
ID - Id of the session to logout.
Returns:
The Session ID

getSessionTimeOut

public Integer getSessionTimeOut()
Gets the time in minutes when a session is automatically logged out.

Returns:
An integer with number of minutes

refreshSession

public String refreshSession(String ID)
Refresh a session so the time for logging out will be reset.

Parameters:
ID - The session id as a string
Returns:
The Session ID

getVersion

public VersionInfo getVersion()
Return information about which Base version is in use.

Returns:
A VersionInfo object

2.17.2: 2011-06-17