Interface Task

    • Method Detail

      • getID

        java.lang.String getID()
        Returns the identifier of this Task.
        Returns:
        The identifier of this Task.
      • setID

        void setID​(java.lang.String id)
        Sets the identifier for this Task.
        Parameters:
        id - The ID to use for this Task.
      • processRequest

        @Deprecated
        void processRequest​(TaskRequestContext context,
                            MarkupOutput markupOutput)
                     throws TaskException
        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.
        See Also:
        processRequest(TaskRequestContext, TaskOutput)
      • processRequest

        void processRequest​(TaskRequestContext context,
                            TaskOutput taskOutput)
                     throws TaskException
        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.
        Since:
        MicroStrategy Web 9.0.0
      • getMetadata

        TaskMetadata getMetadata()
        Returns information about this Task. It includes the description of the Task and any parameters which it supports.
        Returns:
        A TaskMetadata object for this Task.
      • destroy

        void destroy()
        Destroys the Task. This enables the Task to release any persistent data structures.
      • setPrivileges

        void setPrivileges​(WebPrivilegesExpression value)
        Sets the task privileges. The privileges will be verified when the task obtains a session
        Parameters:
        value - The privilege expression
      • getCompressOutput

        boolean getCompressOutput()
      • setCompressOutput

        void setCompressOutput​(boolean newValue)