Package org.pentaho.platform.api.engine
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Determines whether this output handler can send feedback ContentItems or not.boolean
Deprecated.This method could never tell you if the content was actually done.Retrieve the ContentItem that describes the request interface for additional or missing information (missing from the original request)getOutputContentItem
(String objectName, String contentName, String instanceId, String mimeType) Retrieve the ContentItem that describes the output from this request's component execution.int
Gets the output type prefered by the handler.boolean
Indicates whether or not the handler is expected to have data written to a response output stream managed by the handler.void
setMimeTypeListener
(IMimeTypeListener mimeTypeListener) void
Sets an output of the handler.void
setOutputPreference
(int outputType) Sets the output type that is wanted by the handler.void
setSession
(IPentahoSession session)
-
Field Details
-
OUTPUT_TYPE_PARAMETERS
static final int OUTPUT_TYPE_PARAMETERS- See Also:
-
OUTPUT_TYPE_CONTENT
static final int OUTPUT_TYPE_CONTENT- See Also:
-
OUTPUT_TYPE_DEFAULT
static final int OUTPUT_TYPE_DEFAULT- See Also:
-
RESPONSE
- See Also:
-
CONTENT
- See Also:
-
FILE
- See Also:
-
-
Method Details
-
setSession
-
getSession
IPentahoSession getSession() -
contentDone
Deprecated.This method could never tell you if the content was actually done. UseisResponseExpected()
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 objectcontentName
- 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
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 outputvalue
- Value of the output- Throws:
IOException
-
getMimeTypeListener
IMimeTypeListener getMimeTypeListener() -
setMimeTypeListener
-