public abstract class

AbstractDataServiceTask

extends BeanTask
java.lang.Object
   ↳ com.microstrategy.web.tasks.AbstractBaseTask
     ↳ com.microstrategy.web.app.tasks.AbstractAppTask
       ↳ com.microstrategy.web.app.tasks.WebComponentTask
         ↳ com.microstrategy.web.app.tasks.BeanTask
           ↳ com.microstrategy.web.app.tasks.AbstractDataServiceTask
Known Direct Subclasses

Class Overview

This is the base class for the Data Service tasks.
It can be used to Login, execute a task (i.e. run report) and logout.
This is a convenience task to avoid having to maintain a session State.

Summary

[Expand]
Inherited Constants
From class com.microstrategy.web.app.tasks.WebComponentTask
From class com.microstrategy.web.tasks.AbstractBaseTask
[Expand]
Inherited Fields
From class com.microstrategy.web.app.tasks.WebComponentTask
From class com.microstrategy.web.tasks.AbstractBaseTask
Public Constructors
AbstractDataServiceTask()
Public Methods
void init(ContainerServices containerSvcs)
Handles the initialization of the task.
void processRequest(TaskRequestContext context, MarkupOutput out)
The default implementation of this version of processRequest is empty.
void processRequest(TaskRequestContext context, TaskOutput taskOutput)
Process the incoming request.
Protected Methods
void addTaskParameters(TaskFactory factory, String taskName, ContainerServices containerSvcs)
String getLoginTaskName()
String getLogoutTaskName()
abstract String getMainTaskName()
TaskFactory getTaskFactory(ContainerServices cs)
MarkupOutput invokeTask(String taskName, RequestKeys rk, ContainerServices existingCntrSvcs)
[Expand]
Inherited Methods
From class com.microstrategy.web.app.tasks.BeanTask
From class com.microstrategy.web.app.tasks.WebComponentTask
From class com.microstrategy.web.app.tasks.AbstractAppTask
From class com.microstrategy.web.tasks.AbstractBaseTask
From class java.lang.Object
From interface com.microstrategy.web.tasks.Task

Public Constructors

public AbstractDataServiceTask ()

Public Methods

public void init (ContainerServices containerSvcs)

Handles the initialization of the task. This involves parsing the XML file and retrieving all of the contents. This method calls registerTaskMetadata(TaskMetadata).

Parameters
containerSvcs The ContainerServices object that can be used to find more initialization parameters.

public void processRequest (TaskRequestContext context, MarkupOutput out)

The default implementation of this version of processRequest is empty. Task implementators may override either version of processRequest.

Parameters
context The TaskRequestContext object that maintains the state of the request.
out The MarkupOutput that records the contents of the Task response.
Throws
TaskException

public void processRequest (TaskRequestContext context, TaskOutput taskOutput)

Process the incoming request. This method proceeds through the following sequence:

  1. Check for all required parameters. (calls checkForRequiredParameters(RequestKeys))
  2. Prepare the RequestKeys for use. (calls prepareRequestKeys(BeanTaskRequestContext))
  3. Prepare the WebBean for use. (calls prepareBean(BeanTaskRequestContext))
  4. Handle the event. (calls handleEvent(BeanTaskRequestContext))
  5. Collect data for the request. (calls collectData(BeanTaskRequestContext))
  6. Serialize the results into the supplied TaskOutput. (calls serializeResult(BeanTaskRequestContext, TaskOutput))

Parameters
context The TaskRequestContext object that contains information specific to this request.
taskOutput The TaskOutput object to serialize the results into.
Throws
TaskException

Protected Methods

protected void addTaskParameters (TaskFactory factory, String taskName, ContainerServices containerSvcs)

protected String getLoginTaskName ()

Returns
  • the login task name

protected String getLogoutTaskName ()

Returns
  • the logout task name

protected abstract String getMainTaskName ()

Returns
  • the task name to execute after Login and before Logout

protected TaskFactory getTaskFactory (ContainerServices cs)

protected MarkupOutput invokeTask (String taskName, RequestKeys rk, ContainerServices existingCntrSvcs)

Throws
TaskException