public interface

Task

com.microstrategy.web.tasks.Task
Known Indirect Subclasses

Class Overview

This interface represents a Task and how it interacts in the context of the larger Task processing framework.

Summary

Public Methods
abstract void destroy()
Destroys the Task.
abstract boolean getCompressOutput()
abstract String getID()
Returns the identifier of this Task.
abstract TaskMetadata getMetadata()
Returns information about this Task.
abstract WebPrivilegesExpression getPrivileges()
Returns a task privileges
abstract void init(ContainerServices containerSvcs)
Initializes the Task with the specified ContainerServices object.
abstract TaskRequestContext newRequestContext()
Returns a new object to hold per-request data for this Task.
abstract void processRequest(TaskRequestContext context, MarkupOutput markupOutput)
This method is deprecated. Use processRequest(TaskRequestContext, TaskOutput) instead.
abstract void processRequest(TaskRequestContext context, TaskOutput taskOutput)
Instructs the Task to handle the incoming request.
abstract void setCompressOutput(boolean newValue)
abstract void setID(String id)
Sets the identifier for this Task.
abstract void setPrivileges(WebPrivilegesExpression value)
Sets the task privileges.

Public Methods

public abstract void destroy ()

Destroys the Task. This enables the Task to release any persistent data structures.

public abstract boolean getCompressOutput ()

public abstract String getID ()

Returns the identifier of this Task.

Returns
  • The identifier of this Task.

public abstract TaskMetadata getMetadata ()

Returns information about this Task. It includes the description of the Task and any parameters which it supports.

Returns

public abstract WebPrivilegesExpression getPrivileges ()

Returns a task privileges

Returns
  • a task privileges

public abstract void init (ContainerServices containerSvcs)

Initializes the Task with the specified ContainerServices object.

Parameters
containerSvcs The ContainerServices object.

public abstract TaskRequestContext newRequestContext ()

Returns a new object to hold per-request data for this Task.

Returns

public abstract void processRequest (TaskRequestContext context, MarkupOutput markupOutput)

This method is deprecated.
Use processRequest(TaskRequestContext, TaskOutput) instead.

Instructs the Task to handle the incoming request. This is suitable for the majority of Tasks. It assumes that a single content "island" is being constructed and no special handling of that content is required. Tasks that require more sophisticated handling of the generated output should choose to implement processRequest(TaskRequestContext, TaskOutput) instead. NOTE: The TaskProcessor invokes the newer TaskOutput-based version of this method in the 9.0 release. Versions prior to this release (e.g., 8.1.x) invoked this version of processRequest. As such, if your task extends one of the MicroStrategy base classes (e.g., AbstractBaseTask), it would automatically redirect calls to the newer processRequest (which takes a TaskOutput) to this version.

Parameters
context The TaskRequestContext object that maintains the state of the request.
markupOutput The MarkupOutput that records the contents of the Task response.
Throws
TaskException If the Task was unable to satisfy the request.

public abstract void processRequest (TaskRequestContext context, TaskOutput taskOutput)

Instructs the Task to handle the incoming request. This version method of the processRequest is invoked in the current TaskProcessor version. It provides more sophisticated control over content generation. MicroStrategy Task base classes (e.g., AbstractBaseTask provide a default implementation of this method which invokes the MarkupOutput-based version. Task implementors may override either version as it suits their needs.

Parameters
context The TaskRequestContext object that maintains the state of the request.
taskOutput The TaskOutput that contains the output generated by the Task.
Throws
TaskException If the Task was unable to satisfy the request.

public abstract void setCompressOutput (boolean newValue)

public abstract void setID (String id)

Sets the identifier for this Task.

Parameters
id The ID to use for this Task.

public abstract void setPrivileges (WebPrivilegesExpression value)

Sets the task privileges. The privileges will be verified when the task obtains a session

Parameters
value The privilege expression