public abstract class ActionReporter extends ActionReport
ActionReport.ExitCode, ActionReport.MessagePart| Modifier and Type | Field and Description |
|---|---|
protected String |
actionDescription |
protected String |
contentType |
static String |
EOL_MARKER |
protected Throwable |
exception |
protected ActionReport.ExitCode |
exitCode |
protected List<ActionReporter> |
subActions |
protected ActionReport.MessagePart |
topMessage |
| Constructor and Description |
|---|
ActionReporter()
Creates a new instance of HTMLActionReporter
|
| Modifier and Type | Method and Description |
|---|---|
ActionReport |
addSubActionsReport() |
void |
appendMessage(String message) |
String |
getActionDescription() |
ActionReport.ExitCode |
getActionExitCode() |
void |
getCombinedMessages(ActionReporter aReport,
StringBuilder sb)
Returns combined messages.
|
String |
getContentType()
Returns the content type to be used in sending the response back to
the client/caller.
|
Throwable |
getFailureCause() |
String |
getMessage() |
List<ActionReporter> |
getSubActionsReport() |
ActionReport.MessagePart |
getTopMessagePart() |
boolean |
hasFailures()
return true if the action report or a subaction report has ExitCode.FAILURE.
|
boolean |
hasSuccesses()
return true if the action report or a subaction report has ExitCode.SUCCESS.
|
boolean |
hasWarnings()
return true if the action report or a subaction report has ExitCode.WARNING.
|
boolean |
isFailure() |
boolean |
isSuccess() |
boolean |
isWarning() |
void |
setActionDescription(String message) |
void |
setActionExitCode(ActionReport.ExitCode exitCode)
Sets the exit code for the report.
|
void |
setContentType(String s) |
void |
setFailure()
Sets the exit code of the report to failure
|
void |
setFailureCause(Throwable t) |
void |
setMessage(InputStream in) |
void |
setMessage(String message) |
void |
setSuccess() |
void |
setWarning() |
failure, failure, findProperty, getExtraProperties, getResultType, setExtraProperties, setResultType, writeReportprotected Throwable exception
protected String actionDescription
protected List<ActionReporter> subActions
protected ActionReport.ExitCode exitCode
protected ActionReport.MessagePart topMessage
protected String contentType
public static final String EOL_MARKER
public ActionReporter()
public void setFailure()
public boolean isFailure()
public void setWarning()
public boolean isWarning()
public boolean isSuccess()
public void setSuccess()
public void setActionDescription(String message)
setActionDescription in class ActionReportpublic String getActionDescription()
public void setFailureCause(Throwable t)
setFailureCause in class ActionReportpublic Throwable getFailureCause()
getFailureCause in class ActionReportpublic ActionReport.MessagePart getTopMessagePart()
getTopMessagePart in class ActionReportpublic ActionReport addSubActionsReport()
addSubActionsReport in class ActionReportpublic List<ActionReporter> getSubActionsReport()
getSubActionsReport in class ActionReportpublic void setActionExitCode(ActionReport.ExitCode exitCode)
ActionReportsetActionExitCode in class ActionReportpublic ActionReport.ExitCode getActionExitCode()
getActionExitCode in class ActionReportpublic void setMessage(String message)
setMessage in class ActionReportpublic void appendMessage(String message)
appendMessage in class ActionReportpublic String getMessage()
getMessage in class ActionReportpublic void setMessage(InputStream in)
setMessage in class ActionReportpublic String getContentType()
This is the default type. Specific subclasses of ActionReporter might override the method to return a different valid type.
getContentType in class ActionReportpublic void setContentType(String s)
setContentType in class ActionReportpublic void getCombinedMessages(ActionReporter aReport, StringBuilder sb)
Note: This method is a recursive implementation.
aReport - a given (usually top-level) ActionReporter instancesb - StringBuilder instance that contains all the messagespublic boolean hasSuccesses()
ActionReporthasSuccesses in class ActionReportpublic boolean hasWarnings()
ActionReporthasWarnings in class ActionReportpublic boolean hasFailures()
ActionReporthasFailures in class ActionReportCopyright © 2017. All rights reserved.