Package com.microstrategy.web.app.tasks
Class BlockLoaderTask
- 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.BlockLoaderTask
-
- All Implemented Interfaces:
Task
public class BlockLoaderTask extends WebComponentTask
This class provides some basic functionality for loading Blocks and in the case of the JavaScript UI Library ("JUIL"), the ability to serialize a set of client-side layout files to JavaScript.- Since:
- MicroStrategy Web 9.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TASK_PARAM_NAME_BLOCKNAME
static java.lang.String
TASK_PARAM_NAME_JUIL
The name of the Task parameter that identifies whether this Task is invoked for the JavaScript UI Library ("JUIL").static java.lang.String
TASK_PARAM_NAME_STYLENAME
-
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 BlockLoaderTask()
Creates a new BlockLoaderTask object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkForRequiredParameters(RequestKeys requestKeys)
Checks whether all required parameters are present or not.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
transformBean(BeanTaskRequestContext btrContext, TaskOutput taskOutput)
This method wraps a call toTransformable.transform()
.-
Methods inherited from class com.microstrategy.web.app.tasks.WebComponentTask
addTransform, collectData, createUntypedWebComponent, createWebBean, destroy, generatesContent, getBeanInfo, getStyleName, handleEvent, init, isSuccessfullyInitialized, newRequestContext, overrideActualParameters, prepareArgumentRequestKeys, prepareArgumentRequestKeys, prepareBean, prepareEventOrderRequestKeys, prepareEventOrderRequestKeys, prepareEventRequestKeys, prepareEventRequestKeys, prepareParameterRequestKeys, prepareRequestKeys, processRequest, registerTaskMetadata, requiresIServerSession, restoreBeanState, setBeanContext, setBeanInfo, setBeanName, setBeanProperties, setBeanSession, setSuccessfullyInitialized, setTaskID
-
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, getCompressOutput, getID, getMetadata, getPrivileges, getSysDefaultPreferenceValue, processRequest, retrieveUploadedFile, setCompressOutput, setDescription, setID, setMetadata, setPrivileges, validateContentType
-
-
-
-
Field Detail
-
TASK_PARAM_NAME_JUIL
public static final java.lang.String TASK_PARAM_NAME_JUIL
The name of the Task parameter that identifies whether this Task is invoked for the JavaScript UI Library ("JUIL").- See Also:
- Constant Field Values
-
TASK_PARAM_NAME_BLOCKNAME
public static final java.lang.String TASK_PARAM_NAME_BLOCKNAME
- See Also:
- Constant Field Values
-
TASK_PARAM_NAME_STYLENAME
public static final java.lang.String TASK_PARAM_NAME_STYLENAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BlockLoaderTask
public BlockLoaderTask()
Creates a new BlockLoaderTask object. All BlockLoaderTasks have an implicit "session state" (as BeanTasks) parameter (seeAbstractBaseTask.addSessionStateParam(boolean, String)
).
-
-
Method Detail
-
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 classWebComponentTask
- Parameters:
parameterMetadata
- The TaskParameterMetadata object being saved.
-
checkForRequiredParameters
protected void checkForRequiredParameters(RequestKeys requestKeys) throws TaskRequestMalformedException
Description copied from class:AbstractBaseTask
Checks whether all required parameters are present or not.- Overrides:
checkForRequiredParameters
in classAbstractBaseTask
- Parameters:
requestKeys
- TheRequestKeys
object that contains all parameters.- Throws:
TaskRequestMalformedException
- If some required parameters are missing.
-
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 classWebComponentTask
- 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
-
transformBean
protected void transformBean(BeanTaskRequestContext btrContext, TaskOutput taskOutput) throws TaskConfigurationException
Description copied from class:WebComponentTask
This method wraps a call toTransformable.transform()
. It is called by theWebComponentTask.serializeResult(BeanTaskRequestContext, TaskOutput)
method and simply calls the 'transform' method.- Overrides:
transformBean
in classWebComponentTask
- Parameters:
btrContext
- The BeanTaskRequestContext object.taskOutput
- The TaskOutput instance to generate into.- Throws:
TaskConfigurationException
- If the Transform does not exist.
-
-