Interface IOutputHandler


public interface IOutputHandler
An OutputHandler manages the content generated from a Component execution. Output can take the form of the generated results from a component, or content that solicits additional information from the requester. The handler also manages the relationship with the ActionDefinition and output content validation.
  • Field Details

  • Method Details

    • setSession

      void setSession(IPentahoSession session)
    • getSession

      IPentahoSession getSession()
    • contentDone

      @Deprecated boolean contentDone()
      Deprecated.
      This method could never tell you if the content was actually done. Use isResponseExpected() if you need information about a handlers likelihood to generate a response.
    • isResponseExpected

      boolean isResponseExpected()
      Indicates whether or not the handler is expected to have data written to a response output stream managed by the handler. Typically, a handler will want to return true here if its getOutputContentItem or setOutput methods have been invoked and their invocations can result in a write to the response output stream that is managed by the handler. In general, handlers are responsible for setting this flag any time a client response is possible.
      Returns:
      true if the handler gave something the opportunity to write data to the its response output stream
    • getFeedbackContentItem

      IContentItem getFeedbackContentItem()
      Retrieve the ContentItem that describes the request interface for additional or missing information (missing from the original request)
      Returns:
      ContentItem describing user feedback
    • getOutputContentItem

      IContentItem getOutputContentItem(String objectName, String contentName, String instanceId, String mimeType)
      Retrieve the ContentItem that describes the output from this request's component execution.
      Parameters:
      objectName - Name of the object
      contentName - Name of the content
      Returns:
      ContentItem describing end result output
    • allowFeedback

      boolean allowFeedback()
      Determines whether this output handler can send feedback ContentItems or not.

      Generally, if there is no client on the other side of the request that could receive and process feedback, then this boolean should be setto false.

      Returns:
      true if feedback is allowed, false otherwise
    • setOutputPreference

      void setOutputPreference(int outputType)
      Sets the output type that is wanted by the handler. Valid values are OUTPUT_TYPE_PARAMETERS, OUTPUT_TYPE_CONTENT, OUTPUT_TYPE_DEFAULT
      Parameters:
      outputType - Output type requested
    • getOutputPreference

      int getOutputPreference()
      Gets the output type prefered by the handler. Values are defined in org.pentaho.platform.api.engine.IOutputHandler and are OUTPUT_TYPE_PARAMETERS, OUTPUT_TYPE_CONTENT, or OUTPUT_TYPE_DEFAULT
      Returns:
      Output type
    • setOutput

      void setOutput(String name, Object value) throws IOException
      Sets an output of the handler. For example the HTTP handler will accept output names of 'header' allowing an HTTP header to be set, and 'redirect' allowing the responses sendRedirect to be called.
      Parameters:
      name - Name of the output
      value - Value of the output
      Throws:
      IOException
    • getMimeTypeListener

      IMimeTypeListener getMimeTypeListener()
    • setMimeTypeListener

      void setMimeTypeListener(IMimeTypeListener mimeTypeListener)