org.pentaho.platform.engine.core.system
Class BaseSession

java.lang.Object
  extended by org.pentaho.platform.engine.core.system.PentahoBase
      extended by org.pentaho.platform.engine.core.system.BaseSession
All Implemented Interfaces:
Serializable, IAuditable, ILogger, IPentahoSession
Direct Known Subclasses:
PentahoHttpSession, PentahoPortletSession, StandaloneSession

public abstract class BaseSession
extends PentahoBase
implements IPentahoSession

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.pentaho.platform.engine.core.system.PentahoBase
EMPTYLOGID, LOGID_MASK1, LOGID_MASK2, LOGID_SEPARATOR
 
Fields inherited from interface org.pentaho.platform.api.engine.IPentahoSession
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
 
Constructor Summary
BaseSession(String name, String id, Locale locale)
           
 
Method Summary
 void destroy()
          Destroys any resources owned by the session object
 String getActionName()
          Return the name of the action sequence.
 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
 String getObjectName()
          Returns the Java class name for this object.
 String getProcessId()
          Return the id for the execution of a given action sequence document.
 boolean isAuthenticated()
          Gets whether the session is known to be authenticated or not
 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 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 class org.pentaho.platform.engine.core.system.PentahoBase
debug, debug, error, error, fatal, fatal, genLogIdFromInfo, genLogIdFromInfo, genLogIdFromSession, getLogger, getLoggingLevel, getLogId, info, info, setLoggingLevel, setLogId, trace, trace, warn, warn
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pentaho.platform.api.engine.IPentahoSession
getAttribute, getAttributeNames, removeAttribute, setAttribute
 
Methods inherited from interface org.pentaho.platform.api.engine.ILogger
debug, debug, error, error, fatal, fatal, getLoggingLevel, info, info, setLoggingLevel, trace, trace, warn, warn
 

Constructor Detail

BaseSession

public BaseSession(String name,
                   String id,
                   Locale locale)
Method Detail

isAuthenticated

public boolean isAuthenticated()
Description copied from interface: IPentahoSession
Gets whether the session is known to be authenticated or not

Specified by:
isAuthenticated in interface IPentahoSession
Returns:
Is the session authenticated

setAuthenticated

public void setAuthenticated(String name)
Description copied from interface: IPentahoSession
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() )

Specified by:
setAuthenticated in interface IPentahoSession
Parameters:
name - The name of the session

setNotAuthenticated

public void setNotAuthenticated()
Description copied from interface: IPentahoSession
Sets that the user is no longer authenticated

Specified by:
setNotAuthenticated in interface IPentahoSession

getLocale

public Locale getLocale()
Description copied from interface: IPentahoSession
Gets the Locale of the session

Specified by:
getLocale in interface IPentahoSession
Returns:
The Locale of the session

destroy

public void destroy()
Description copied from interface: IPentahoSession
Destroys any resources owned by the session object

Specified by:
destroy in interface IPentahoSession

setActionName

public void setActionName(String actionName)
Description copied from interface: IPentahoSession
Sets the name of the action sequence document that the session is currently performing

Specified by:
setActionName in interface IPentahoSession
Parameters:
actionName - The name of the action sequence document

setProcessId

public void setProcessId(String processId)
Description copied from interface: IPentahoSession
Sets the name of the process for which an action sequence is being performed.

Specified by:
setProcessId in interface IPentahoSession
Parameters:
processId - The name of the process

getName

public String getName()
Description copied from interface: IPentahoSession
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

Specified by:
getName in interface IPentahoSession
Returns:
Name for this session

getId

public String getId()
Description copied from interface: IPentahoSession
Gets ths id for this session. This is typically a GUID or semi-unique string.

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

getObjectName

public String getObjectName()
Description copied from interface: IAuditable
Returns the Java class name for this object.

Specified by:
getObjectName in interface IAuditable
Overrides:
getObjectName in class PentahoBase
Returns:
the name of the object (the Java class name)

getProcessId

public String getProcessId()
Description copied from interface: IAuditable
Return the id for the execution of a given action sequence document.

Specified by:
getProcessId in interface IAuditable
Returns:
the process id

getActionName

public String getActionName()
Description copied from interface: IAuditable
Return the name of the action sequence. Today, that name is synonymous with the name of the action sequence document in the solution repository.

Specified by:
getActionName in interface IAuditable
Returns:
the name of the action sequence

setBackgroundExecutionAlert

public void setBackgroundExecutionAlert()
Description copied from interface: IPentahoSession
Toggles on an alert condition indicating that the background execution of a task has completed during this session.

Specified by:
setBackgroundExecutionAlert in interface IPentahoSession

getBackgroundExecutionAlert

public boolean getBackgroundExecutionAlert()
Description copied from interface: IPentahoSession
Checks the status of a background execution task.

Specified by:
getBackgroundExecutionAlert in interface IPentahoSession
Returns:
True if a background execution has triggered an alert.

resetBackgroundExecutionAlert

public void resetBackgroundExecutionAlert()
Description copied from interface: IPentahoSession
Toggles off the background execution alert status.

Specified by:
resetBackgroundExecutionAlert in interface IPentahoSession