Package com.microstrategy.web.app.tasks
Class AbstractDataServiceTask
- 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
-
- All Implemented Interfaces:
Task
- Direct Known Subclasses:
ReportDataServiceTask,RWDataServiceTask
public abstract class AbstractDataServiceTask extends BeanTask
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.- Since:
- MicroStrategy Web 8.1.2
-
-
Field Summary
-
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_MESSAGE_ID, 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 AbstractDataServiceTask()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddTaskParameters(TaskFactory factory, java.lang.String taskName, ContainerServices containerSvcs)protected java.lang.StringgetLoginTaskName()protected java.lang.StringgetLogoutTaskName()protected abstract java.lang.StringgetMainTaskName()protected TaskFactorygetTaskFactory(ContainerServices cs)voidinit(ContainerServices containerSvcs)Handles the initialization of the task.protected MarkupOutputinvokeTask(java.lang.String taskName, RequestKeys rk, ContainerServices existingCntrSvcs)voidprocessRequest(TaskRequestContext context, MarkupOutput out)The default implementation of this version of processRequest is empty.voidprocessRequest(TaskRequestContext context, TaskOutput taskOutput)Process the incoming request.-
Methods inherited from class com.microstrategy.web.app.tasks.BeanTask
createWebBean
-
Methods inherited from class com.microstrategy.web.app.tasks.WebComponentTask
addTransform, collectData, createUntypedWebComponent, destroy, generatesContent, getBeanInfo, getStyleName, handleEvent, isSuccessfullyInitialized, newRequestContext, overrideActualParameters, prepareArgumentRequestKeys, prepareArgumentRequestKeys, prepareBean, prepareEventOrderRequestKeys, prepareEventOrderRequestKeys, prepareEventRequestKeys, prepareEventRequestKeys, prepareParameterRequestKeys, prepareRequestKeys, registerParameterMetadata, registerTaskMetadata, requiresIServerSession, restoreBeanState, serializeResult, setBeanContext, setBeanInfo, setBeanName, setBeanProperties, setBeanSession, 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, retrieveUploadedFile, setCompressOutput, setDescription, setID, setMetadata, setPrivileges, validateContentType
-
-
-
-
Method Detail
-
init
public void init(ContainerServices containerSvcs)
Description copied from class:WebComponentTaskHandles the initialization of the task. This involves parsing the XML file and retrieving all of the contents. This method callsWebComponentTask.registerTaskMetadata(TaskMetadata).- Specified by:
initin interfaceTask- Overrides:
initin classWebComponentTask- Parameters:
containerSvcs- TheContainerServicesobject that can be used to find more initialization parameters.
-
addTaskParameters
protected void addTaskParameters(TaskFactory factory, java.lang.String taskName, ContainerServices containerSvcs)
- Since:
- MicroStrategy Web 9.0.0
-
getMainTaskName
protected abstract java.lang.String getMainTaskName()
- Returns:
- the task name to execute after Login and before Logout
-
getLoginTaskName
protected java.lang.String getLoginTaskName()
- Returns:
- the login task name
-
getLogoutTaskName
protected java.lang.String getLogoutTaskName()
- Returns:
- the logout task name
-
processRequest
public void processRequest(TaskRequestContext context, MarkupOutput out) throws TaskException
Description copied from class:AbstractBaseTaskThe default implementation of this version of processRequest is empty. Task implementators may override either version of processRequest.- Specified by:
processRequestin interfaceTask- Overrides:
processRequestin classAbstractBaseTask- Parameters:
context- TheTaskRequestContextobject that maintains the state of the request.out- TheMarkupOutputthat records the contents of the Task response.- Throws:
TaskException- If the Task was unable to satisfy the request.- See Also:
Task.processRequest(TaskRequestContext, MarkupOutput)
-
processRequest
public void processRequest(TaskRequestContext context, TaskOutput taskOutput) throws TaskException
Description copied from class:WebComponentTaskProcess the incoming request. This method proceeds through the following sequence:- Check for all required parameters. (calls
AbstractBaseTask.checkForRequiredParameters(RequestKeys)) - Prepare the
RequestKeysfor use. (callsWebComponentTask.prepareRequestKeys(BeanTaskRequestContext)) - Prepare the
WebBeanfor 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:
processRequestin interfaceTask- Overrides:
processRequestin classWebComponentTask- Parameters:
context- TheTaskRequestContextobject that contains information specific to this request.taskOutput- TheTaskOutputobject 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.- Since:
- MicroStrategy Web 9.0.0
- See Also:
Task.processRequest(TaskRequestContext, TaskOutput)
- Check for all required parameters. (calls
-
invokeTask
protected MarkupOutput invokeTask(java.lang.String taskName, RequestKeys rk, ContainerServices existingCntrSvcs) throws TaskException
- Throws:
TaskException
-
getTaskFactory
protected TaskFactory getTaskFactory(ContainerServices cs)
-
-