org.dspace.services
Interface SessionService


public interface SessionService

Provides access to user sessions and allows for initializing user sessions.

Author:
Aaron Zeckoski (azeckoski @ gmail.com)

Method Summary
 Session getCurrentSession()
          Start a new session and destroy any existing session that is known for this thread.
 String getCurrentSessionId()
          Access the current session id for the current thread (also available from the current session).
 String getCurrentUserId()
          Access the current user id for the current session.
 

Method Detail

getCurrentSession

Session getCurrentSession()
Start a new session and destroy any existing session that is known for this thread. Will bind this to the current request and capture all required session information

WARNING: there is normally no need to call this method as the session is created for you when using webapps. This is only needed when there is a requirement to create a session operating outside a servlet container or manually handling sessions.

Returns:
the Session object associated with the current request or processing thread OR null if there is not one

getCurrentSessionId

String getCurrentSessionId()
Access the current session id for the current thread (also available from the current session).

Returns:
the id of the session associated with the current thread OR null if there is no session

getCurrentUserId

String getCurrentUserId()
Access the current user id for the current session. (also available from the current session)

Returns:
the id of the user associated with the current thread OR null if there is no user


Copyright © Monday, September 1, 2008-2011 The DSpace Foundation. All Rights Reserved.