Package com.microstrategy.web.app.tasks
Class ExportDocumentTask
- java.lang.Object
-
- All Implemented Interfaces:
Task
public class ExportDocumentTask extends RWExecutionTask
Task for executing a Document that is capable of fetching binary contents.- Since:
- MicroStrategy Web 9.2.1
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.app.tasks.RWExecutionTask
executionModeParam, PARAM_NAME_MESSAGE_ID
-
Fields inherited from class com.microstrategy.web.app.tasks.WebComponentTask
FP_NAME_CONTENT_TYPE, initializationErrorMessage
-
Fields inherited from class com.microstrategy.web.tasks.AbstractBaseTask
compressOutput, CONTENT_TYPE_BINARY, CONTENT_TYPE_HTML, CONTENT_TYPE_JSON, CONTENT_TYPE_JSON_ALL, CONTENT_TYPE_JSON_D, CONTENT_TYPE_JSON_P, CONTENT_TYPE_XML, CONTENT_TYPE_XML_ANF, DEFAULT_MAX_WAIT, DEFAULT_POLLING_FREQ, execFlagsParam, INDEFINITE_MAX_WAIT, maxWaitParam, metadata, mPrivileges, msgIDParam, objectIDParam, OTHER_CONTENT_KEY_LAYOUTS, PARAM_NAME_EXEC_FLAGS, PARAM_NAME_MAX_WAIT, PARAM_NAME_OBJECT_ID, PARAM_NAME_POLLING_FREQ, PARAM_NAME_RESULT_FLAGS, PARAM_NAME_SESSION_ID, PARAM_NAME_SESSION_STATE, PARAM_NAME_STATE_ID, pollingFreqParam, PREFERENCE_DEFAULT_MAX_WAIT_IN_TASK, resultFlagsParam, sessionIDParam, sessionStateParam, stateIDParam
-
-
Constructor Summary
Constructors Constructor Description ExportDocumentTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
collectData(BeanTaskRequestContext btrContext)
This method calls the 'collectData' method on the WebBean instance.void
processRequest(TaskRequestContext context, TaskOutput taskOutput)
Process the incoming request.protected void
registerParameterMetadata(TaskParameterMetadata parameterMetadata)
Registers a specific Task parameter metadata.protected void
serializeResult(BeanTaskRequestContext btrContext, TaskOutput taskOutput)
This method attempts to serialize the results to the supplied TaskOutput object.protected void
setBeanSession(BeanTaskRequestContext btrContext)
Set the WebIServerSession object to use with the WebBean.protected boolean
shouldApplyGroupByChanges()
-
Methods inherited from class com.microstrategy.web.app.tasks.RWExecutionTask
generatesContent, getExecutionModeFromRequest, handleEvent, minimalData, setExecutionMode, setGridResultFlags
-
Methods inherited from class com.microstrategy.web.app.tasks.BeanTask
createWebBean
-
Methods inherited from class com.microstrategy.web.app.tasks.WebComponentTask
addTransform, createUntypedWebComponent, destroy, getBeanInfo, getStyleName, init, isSuccessfullyInitialized, newRequestContext, overrideActualParameters, prepareArgumentRequestKeys, prepareArgumentRequestKeys, prepareBean, prepareEventOrderRequestKeys, prepareEventOrderRequestKeys, prepareEventRequestKeys, prepareEventRequestKeys, prepareParameterRequestKeys, prepareRequestKeys, registerTaskMetadata, requiresIServerSession, restoreBeanState, setBeanContext, setBeanInfo, setBeanName, setBeanProperties, setSuccessfullyInitialized, setTaskID, transformBean
-
Methods inherited from class com.microstrategy.web.app.tasks.AbstractAppTask
getDescriptor
-
Methods inherited from class com.microstrategy.web.tasks.AbstractBaseTask
addExecFlagsParam, addJuilLayouts, addMaxWaitParam, addMaxWaitParam, addMessageIDParam, addObjectIDParam, addParameterMetadata, addParameterMetadata, addParameterMetadata, addPollingFrequencyParam, addPollingFrequencyParam, addResultFlagsParam, addSessionIDParam, addSessionStateParam, addStateIDParam, checkForRequiredParameters, getCompressOutput, getID, getMetadata, getPrivileges, getSysDefaultPreferenceValue, processRequest, retrieveUploadedFile, setCompressOutput, setDescription, setID, setMetadata, setPrivileges, validateContentType
-
-
-
-
Method Detail
-
processRequest
public void processRequest(TaskRequestContext context, TaskOutput taskOutput) throws TaskException
Description copied from class:WebComponentTask
Process the incoming request. This method proceeds through the following sequence:- Check for all required parameters. (calls
AbstractBaseTask.checkForRequiredParameters(RequestKeys)
) - Prepare the
RequestKeys
for use. (callsWebComponentTask.prepareRequestKeys(BeanTaskRequestContext)
) - Prepare the
WebBean
for use. (callsWebComponentTask.prepareBean(BeanTaskRequestContext)
) - Handle the event. (calls
WebComponentTask.handleEvent(BeanTaskRequestContext)
) - Collect data for the request. (calls
WebComponentTask.collectData(BeanTaskRequestContext)
) - Serialize the results into the supplied
TaskOutput
. (callsWebComponentTask.serializeResult(BeanTaskRequestContext, TaskOutput)
)
- Specified by:
processRequest
in interfaceTask
- Overrides:
processRequest
in classWebComponentTask
- Parameters:
context
- TheTaskRequestContext
object that contains information specific to this request.taskOutput
- TheTaskOutput
object to serialize the results into.- Throws:
TaskException
- If anything fails in the process of servicing the request.TaskConfigurationException
- If the task is not properly configured.- See Also:
Task.processRequest(TaskRequestContext, TaskOutput)
- Check for all required parameters. (calls
-
registerParameterMetadata
protected void registerParameterMetadata(TaskParameterMetadata parameterMetadata)
Description copied from class:WebComponentTask
Registers a specific Task parameter metadata. This method is called byWebComponentTask.registerTaskMetadata(TaskMetadata)
. It is helpful to override in a Task so that a specific TaskParameterMetadata may be saved for later use.- Overrides:
registerParameterMetadata
in classRWExecutionTask
- Parameters:
parameterMetadata
- The TaskParameterMetadata object being saved.
-
setBeanSession
protected void setBeanSession(BeanTaskRequestContext btrContext) throws TaskException
Description copied from class:WebComponentTask
Set the WebIServerSession object to use with the WebBean. This method is called by theWebComponentTask.setBeanProperties(BeanTaskRequestContext)
method.- Overrides:
setBeanSession
in classWebComponentTask
- Parameters:
btrContext
- The BeanTaskRequestContext object to use.- Throws:
TaskException
- If there is not enough information to create a WebIServerSession instance.
-
shouldApplyGroupByChanges
protected boolean shouldApplyGroupByChanges()
- Overrides:
shouldApplyGroupByChanges
in classRWExecutionTask
-
collectData
protected void collectData(BeanTaskRequestContext btrContext) throws TaskException
Description copied from class:WebComponentTask
This method calls the 'collectData' method on the WebBean instance. This method is called byWebComponentTask.processRequest(TaskRequestContext, TaskOutput)
.- Overrides:
collectData
in classRWExecutionTask
- Parameters:
btrContext
- The BeanTaskRequestContext object.- Throws:
TaskException
- If there is a failure while trying to collect data for the Web Bean.
-
serializeResult
protected void serializeResult(BeanTaskRequestContext btrContext, TaskOutput taskOutput) throws TaskException
Description copied from class:WebComponentTask
This method attempts to serialize the results to the supplied TaskOutput object. This method is called byWebComponentTask.processRequest(TaskRequestContext, TaskOutput)
and in turn does the following:- Add the Transform. If there is no transform
specified, an empty MarkupOutput is returned. (calls
WebComponentTask.addTransform(BeanTaskRequestContext)
) - Override any actual parameters specified in the
Bean Task XML. (calls
WebComponentTask.overrideActualParameters(BeanTaskRequestContext, TransformInstance)
) - Transforms the WebBean using the Transform. (calls
WebComponentTask.transformBean(BeanTaskRequestContext, TaskOutput)
)
- Overrides:
serializeResult
in classRWExecutionTask
- Parameters:
btrContext
- The BeanTaskRequestContext object.taskOutput
- The TaskOutput object to populate.- Throws:
TaskException
- If something fails along the way.
- Add the Transform. If there is no transform
specified, an empty MarkupOutput is returned. (calls
-
-