@Contract public abstract class ActionReport extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
ActionReport.ExitCode |
static class |
ActionReport.MessagePart |
| Constructor and Description |
|---|
ActionReport() |
| Modifier and Type | Method and Description |
|---|---|
abstract ActionReport |
addSubActionsReport() |
abstract void |
appendMessage(String message) |
void |
failure(Logger logger,
String message)
Short for
failure(logger,message,null) |
void |
failure(Logger logger,
String message,
Throwable e)
Report a failure to the logger and
ActionReport. |
String |
findProperty(String key)
Search in message parts properties then in extra properties and then
in sub reports.
|
abstract ActionReport.ExitCode |
getActionExitCode() |
abstract String |
getContentType() |
Properties |
getExtraProperties() |
abstract Throwable |
getFailureCause() |
abstract String |
getMessage() |
<T> T |
getResultType(Class<T> resultType)
Gets a type that was set by the command implementation
|
abstract List<? extends ActionReport> |
getSubActionsReport() |
abstract ActionReport.MessagePart |
getTopMessagePart() |
abstract boolean |
hasFailures()
return true if the action report or a subaction report has ExitCode.FAILURE.
|
abstract boolean |
hasSuccesses()
return true if the action report or a subaction report has ExitCode.SUCCESS.
|
abstract boolean |
hasWarnings()
return true if the action report or a subaction report has ExitCode.WARNING.
|
abstract void |
setActionDescription(String message) |
abstract void |
setActionExitCode(ActionReport.ExitCode exitCode) |
abstract void |
setContentType(String s) |
void |
setExtraProperties(Properties properties) |
abstract void |
setFailureCause(Throwable t) |
abstract void |
setMessage(InputStream in) |
abstract void |
setMessage(String message) |
<T> void |
setResultType(Class<T> resultType,
T resultTypeInstance)
Stores the supplies type and its instance.
|
abstract void |
writeReport(OutputStream os) |
public abstract void setActionDescription(String message)
public abstract void setFailureCause(Throwable t)
public abstract Throwable getFailureCause()
public abstract void setMessage(String message)
public abstract void appendMessage(String message)
public abstract void writeReport(OutputStream os) throws IOException
IOExceptionpublic abstract void setMessage(InputStream in)
public abstract String getMessage()
public abstract ActionReport.MessagePart getTopMessagePart()
public abstract ActionReport addSubActionsReport()
public abstract void setActionExitCode(ActionReport.ExitCode exitCode)
public abstract ActionReport.ExitCode getActionExitCode()
public abstract String getContentType()
public abstract void setContentType(String s)
public abstract List<? extends ActionReport> getSubActionsReport()
public final void failure(Logger logger, String message, Throwable e)
ActionReport.
This is more of a convenience to the caller.public final void failure(Logger logger, String message)
failure(logger,message,null)public abstract boolean hasSuccesses()
public abstract boolean hasWarnings()
public abstract boolean hasFailures()
public final Properties getExtraProperties()
public void setExtraProperties(Properties properties)
public <T> T getResultType(Class<T> resultType)
resultType - the type requestedpublic <T> void setResultType(Class<T> resultType, T resultTypeInstance)
resultType - the typeresultTypeInstance - the actual instanceCopyright © 2017–2020 Eclipse Foundation. All rights reserved.