org.pentaho.platform.api.engine
Interface IPentahoSession

All Superinterfaces:
IAuditable, ILogger
All Known Implementing Classes:
BaseSession, PentahoHttpSession, PentahoPortletSession, StandaloneSession, SystemStartupSession, TrustedSystemStartupSession, UserSession

public interface IPentahoSession
extends ILogger, IAuditable

Provides an overall representation of the concept of a session. Sessions are not necessarily user-based, but typically wrap the HttpSession object and PortletSession object in a standard framework with methods that session objects typically provide.

Author:
jdixon

Field Summary
static String PENTAHO_SESSION_KEY
           
 
Fields inherited from interface org.pentaho.platform.api.engine.ILogger
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN
 
Method Summary
 void destroy()
          Destroys any resources owned by the session object
 Object getAttribute(String attributeName)
          Get the value of a named session attribute
 Iterator getAttributeNames()
          Returns an enumeration of the names of the attributes stored in the session
 boolean getBackgroundExecutionAlert()
          Checks the status of a background execution task.
 String getId()
          Gets ths id for this session.
 Locale getLocale()
          Gets the Locale of the session
 String getName()
          Gets the name for this session, for example if this is an authenticated HTTP or Portlet session the name will be the name of the user
 boolean isAuthenticated()
          Gets whether the session is known to be authenticated or not
 Object removeAttribute(String attributeName)
          Removes an attribute from the session and returns is
 void resetBackgroundExecutionAlert()
          Toggles off the background execution alert status.
 void setActionName(String actionName)
          Sets the name of the action sequence document that the session is currently performing
 void setAttribute(String attributeName, Object value)
          Sets the value of a session attribute
 void setAuthenticated(String name)
          Sets the name of the session and indicates that the session is authenticated.
 void setBackgroundExecutionAlert()
          Toggles on an alert condition indicating that the background execution of a task has completed during this session.
 void setNotAuthenticated()
          Sets that the user is no longer authenticated
 void setProcessId(String processId)
          Sets the name of the process for which an action sequence is being performed.
 
Methods inherited from interface org.pentaho.platform.api.engine.ILogger
debug, debug, error, error, fatal, fatal, getLoggingLevel, info, info, setLoggingLevel, trace, trace, warn, warn
 
Methods inherited from interface org.pentaho.platform.api.engine.IAuditable
getActionName, getObjectName, getProcessId
 

Field Detail

PENTAHO_SESSION_KEY

static final String PENTAHO_SESSION_KEY
See Also:
Constant Field Values
Method Detail

getName

String getName()
Gets the name for this session, for example if this is an authenticated HTTP or Portlet session the name will be the name of the user

Returns:
Name for this session

getId

String getId()
Gets ths id for this session. This is typically a GUID or semi-unique string.

Specified by:
getId in interface IAuditable
Returns:
Id for this session

setActionName

void setActionName(String actionName)
Sets the name of the action sequence document that the session is currently performing

Parameters:
actionName - The name of the action sequence document

setProcessId

void setProcessId(String processId)
Sets the name of the process for which an action sequence is being performed.

Parameters:
processId - The name of the process

destroy

void destroy()
Destroys any resources owned by the session object


getAttribute

Object getAttribute(String attributeName)
Get the value of a named session attribute

Parameters:
attributeName - The name of the attribute
Returns:
The value of the attribute

setAttribute

void setAttribute(String attributeName,
                  Object value)
Sets the value of a session attribute

Parameters:
attributeName - The name of the attribute
value - The value of the attribute

removeAttribute

Object removeAttribute(String attributeName)
Removes an attribute from the session and returns is

Parameters:
attributeName - The name of the attribute to remove
Returns:
The value of the removed attribute

getAttributeNames

Iterator getAttributeNames()
Returns an enumeration of the names of the attributes stored in the session

Returns:
The enumeration of the attribute names

getLocale

Locale getLocale()
Gets the Locale of the session

Returns:
The Locale of the session

isAuthenticated

boolean isAuthenticated()
Gets whether the session is known to be authenticated or not

Returns:
Is the session authenticated

setAuthenticated

void setAuthenticated(String name)
Sets the name of the session and indicates that the session is authenticated. If this is a HTTP or Portlet session the name should be the name of the user that is logged in (e.g. using request.getRemoteUser() )

Parameters:
name - The name of the session

setNotAuthenticated

void setNotAuthenticated()
Sets that the user is no longer authenticated


setBackgroundExecutionAlert

void setBackgroundExecutionAlert()
Toggles on an alert condition indicating that the background execution of a task has completed during this session.


getBackgroundExecutionAlert

boolean getBackgroundExecutionAlert()
Checks the status of a background execution task.

Returns:
True if a background execution has triggered an alert.

resetBackgroundExecutionAlert

void resetBackgroundExecutionAlert()
Toggles off the background execution alert status.