Interface TaskOutput


  • public interface TaskOutput
    This interface defines the entire output that a Task may generate. There is essentially "primary content" (which is the primary output of any Task). Some Tasks will also need to provide other forms of content (that are combined with the primary content in some way). Both the primary and secondary contents are contained in a MarkupOutput instance. While the primary content has no name, secondary content requires a key so that it can be referred to later. Both the primary and secondary MarkupOutput instances are created, on-demand. A Boolean flag (called 'create') is used to indicate whether a new instance should be created if one does not already exist.
    Since:
    MicroStrategy Web 9.0.0
    • Method Detail

      • getPrimaryContent

        MarkupOutput getPrimaryContent​(boolean create)
        Returns the primary content associated with this Task.
        Parameters:
        create - If non-existent, then this flag determines whether a MarkupOutput instance is created or not.
        Returns:
        The primary content associated with this Task.
      • getOtherContent

        MarkupOutput getOtherContent​(java.lang.String key,
                                     boolean create)
        Returns the secondary content associated with this Task.
        Parameters:
        key - A unique key that identifies the secondary content (and distinguishes them from one another).
        create - If non-existent, then this flag determines whether a MarkupOutput instance is created or not.
        Returns:
        The secondary content associated with this Task.
      • getResponseIsComplete

        boolean getResponseIsComplete()
        Returns whether the Task has fully completed the response, delivering any generated content directly to the caller. This is necessary to convey as it prevents downstream processing engines from acting on any of the primary or secondary contents.
        Returns:
        True if the Task has completed the response (in its entirety) with the caller.
      • setResponseIsComplete

        void setResponseIsComplete​(boolean responseIsComplete)
        Indicates whether the Task has fully completed the response. In rare cases, the Task may elect to reply directly to the caller via the supplied ContainerServices instance. If this is the case, then downstream tools will not inspect the primary or secondary contents contained in this instance.
        Parameters:
        responseIsComplete - Whether the task has fully completed the conversation with the caller.