@Service(name="metadata") @PerLookup public class XMLContentActionReporter extends ActionReporter
<action-report description="xxx" exit-code="xxx" [failure-cause="xxx"]>
<message-part message="">
<property name="xxx" value="xxx"/>
...
<child-type property="value"/>
...
</child-type>
</message-part>
</message-part>
</action-report>
Currently this is used to return the metadata for a command, although
it could be used more generally to return XML content. In the general
case the action-report and message-part elements ought to be removed.ActionReport.ExitCode, ActionReport.MessagePart
actionDescription, contentType, EOL_MARKER, exception, exitCode, subActions, topMessage
Constructor and Description |
---|
XMLContentActionReporter() |
Modifier and Type | Method and Description |
---|---|
String |
getContentType()
Returns the content type to be used in sending the response back to
the client/caller.
|
void |
writeReport(OutputStream os)
Outputs the formatted information
|
addSubActionsReport, appendMessage, getActionDescription, getActionExitCode, getCombinedMessages, getFailureCause, getMessage, getSubActionsReport, getTopMessagePart, hasFailures, hasSuccesses, hasWarnings, isFailure, isSuccess, isWarning, setActionDescription, setActionExitCode, setContentType, setFailure, setFailureCause, setMessage, setMessage, setSuccess, setWarning
failure, failure, findProperty, getExtraProperties, getResultType, setExtraProperties, setResultType, toString
public void writeReport(OutputStream os)
ActionReport
writeReport
in class ActionReport
os
- The OutputStream to which the information is sent topublic String getContentType()
ActionReporter
This is the default type. Specific subclasses of ActionReporter might override the method to return a different valid type.
getContentType
in class ActionReporter
Copyright © 2020. All rights reserved.