@Service(name="plain") @PerLookup public class PlainTextActionReporter extends ActionReporter
ActionReport.ExitCode, ActionReport.MessagePart| Modifier and Type | Field and Description |
|---|---|
static String |
MAGIC |
actionDescription, contentType, EOL_MARKER, exception, exitCode, subActions, topMessage| Constructor and Description |
|---|
PlainTextActionReporter() |
| Modifier and Type | Method and Description |
|---|---|
void |
appendMessage(String s)
Append the string to the internal buffer -- not to the internal message string!
|
void |
appendMessageln(String s)
Append the string to the internal buffer and add a linefeed like 'println'
|
void |
getCombinedMessages(ActionReporter aReport,
StringBuilder out)
Returns combined messages.
|
String |
getContentType()
Returns the content type to be used in sending the response back to
the client/caller.
|
String |
getMessage() |
void |
setMessage(String message) |
void |
writeReport(OutputStream os)
Outputs the formatted information
|
addSubActionsReport, getActionDescription, getActionExitCode, getFailureCause, getSubActionsReport, getTopMessagePart, hasFailures, hasSuccesses, hasWarnings, isFailure, isSuccess, isWarning, setActionDescription, setActionExitCode, setContentType, setFailure, setFailureCause, setMessage, setSuccess, setWarningfailure, failure, findProperty, getExtraProperties, getResultType, setExtraProperties, setResultTypepublic static final String MAGIC
public void writeReport(OutputStream os) throws IOException
ActionReportwriteReport in class ActionReportos - The OutputStream to which the information is sent toIOExceptionpublic String getContentType()
ActionReporterThis is the default type. Specific subclasses of ActionReporter might override the method to return a different valid type.
getContentType in class ActionReporterpublic final void appendMessage(String s)
appendMessage in class ActionReporters - the string to appendpublic final void appendMessageln(String s)
s - the string to appendpublic void setMessage(String message)
setMessage in class ActionReporterpublic final String getMessage()
getMessage in class ActionReporterpublic void getCombinedMessages(ActionReporter aReport, StringBuilder out)
ActionReporterNote: This method is a recursive implementation.
getCombinedMessages in class ActionReporteraReport - a given (usually top-level) ActionReporter instanceout - StringBuilder instance that contains all the messagesCopyright © 2017. All rights reserved.