org.pentaho.platform.api.engine
Interface IBackgroundExecution

All Known Implementing Classes:
QuartzBackgroundExecutionHelper, SecurityAwareBackgroundExecutionHelper, SecurityAwareBackgroundSubscriptionHelper

public interface IBackgroundExecution


Field Summary
static String BACKGROUND_ACTION_NAME_STR
           
static String BACKGROUND_SUBMITTED
           
static String DEFAULT_USER_NAME
           
 
Method Summary
 String backgroundExecuteAction(IPentahoSession userSession, IParameterProvider parameterProvider)
          Queues the action specified in the request parameters for execution in the background
 IContentItem getBackgroundContent(String contentGUID, IPentahoSession userSession)
          Gets the content generated by background execution
 List<IContentItem> getBackgroundExecutedContentList(IPentahoSession userSession)
          Gets a list of content GUIDs of background executed jobs
 IOutputHandler getContentOutputHandler(String location, String fileName, String solutionName, IPentahoSession userSession, IParameterProvider parameterProvider)
          Returns the output handler for content, specific to the implementation of the background execution helper.
 IPentahoSession getEffectiveUserSession(String user)
          When the job runs in background, gets the effective user session for the user executing the job
 List<IJobDetail> getScheduledAndExecutingBackgroundJobs(IPentahoSession userSession)
          Gets the list of items scheduled for background execution, and those currently executing
 void removeBackgroundExecutedContentForID(String contentGUID, IPentahoSession userSession)
          Removes the content generated by background execution
 void trackBackgroundExecution(IPentahoSession userSession, String GUID)
          This provides an entry point for tracking the created background execution task
 

Field Detail

BACKGROUND_ACTION_NAME_STR

static final String BACKGROUND_ACTION_NAME_STR
See Also:
Constant Field Values

BACKGROUND_SUBMITTED

static final String BACKGROUND_SUBMITTED
See Also:
Constant Field Values

DEFAULT_USER_NAME

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

backgroundExecuteAction

String backgroundExecuteAction(IPentahoSession userSession,
                               IParameterProvider parameterProvider)
                               throws BackgroundExecutionException
Queues the action specified in the request parameters for execution in the background

Parameters:
userSession - IPentahoSession of the session executing in background
parameterProvider - Provides the parameters containing the action to execute in the background
Returns:
String response that will be used for user feedback.
Throws:
BackgroundExecutionException

getScheduledAndExecutingBackgroundJobs

List<IJobDetail> getScheduledAndExecutingBackgroundJobs(IPentahoSession userSession)
                                                        throws BackgroundExecutionException
Gets the list of items scheduled for background execution, and those currently executing

Parameters:
userSession - The usersession
Returns:
List of scheduled/executing jobs
Throws:
BackgroundExecutionException

removeBackgroundExecutedContentForID

void removeBackgroundExecutedContentForID(String contentGUID,
                                          IPentahoSession userSession)
Removes the content generated by background execution

Parameters:
contentGUID - The GUID of the content generated
userSession - The user session

getBackgroundContent

IContentItem getBackgroundContent(String contentGUID,
                                  IPentahoSession userSession)
Gets the content generated by background execution

Parameters:
contentGUID - The GUID for the content
userSession - The user session
Returns:
IContentItem pointing to the generated content

getBackgroundExecutedContentList

List<IContentItem> getBackgroundExecutedContentList(IPentahoSession userSession)
Gets a list of content GUIDs of background executed jobs

Parameters:
userSession - User session
Returns:
List of executed content ids

getEffectiveUserSession

IPentahoSession getEffectiveUserSession(String user)
When the job runs in background, gets the effective user session for the user executing the job

Parameters:
user - The user name
Returns:
IPentahoSession for the user as if the user was clicking to run the job in realtime.

trackBackgroundExecution

void trackBackgroundExecution(IPentahoSession userSession,
                              String GUID)
This provides an entry point for tracking the created background execution task

Parameters:
userSession -
GUID -

getContentOutputHandler

IOutputHandler getContentOutputHandler(String location,
                                       String fileName,
                                       String solutionName,
                                       IPentahoSession userSession,
                                       IParameterProvider parameterProvider)
Returns the output handler for content, specific to the implementation of the background execution helper.

Parameters:
location - Location for the content
fileName - File name for the content
solutionName - Solution name
userSession - IPentahoSession of the caller
parameterProvider - parameter provider containing request parameters
Returns:
IOutputHandler implementation for storing the content.