Class CliActionReport
- java.lang.Object
-
- org.glassfish.api.ActionReport
-
- com.sun.enterprise.admin.remote.reader.CliActionReport
-
- All Implemented Interfaces:
Serializable
public class CliActionReport extends ActionReport
Temporary implementation. Copy of AcctionReporter. It is here until ActionReport refactoring will be complete.- Author:
- mmares
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.glassfish.api.ActionReport
ActionReport.ExitCode, ActionReport.MessagePart
-
-
Field Summary
Fields Modifier and Type Field Description protected StringactionDescriptionprotected Throwableexceptionprotected ActionReport.ExitCodeexitCodeprotected List<CliActionReport>subActionsprotected ActionReport.MessageParttopMessage
-
Constructor Summary
Constructors Constructor Description CliActionReport()Creates a new instance of HTMLActionReporter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActionReportaddSubActionsReport()voidappendMessage(String message)StringgetActionDescription()ActionReport.ExitCodegetActionExitCode()StringgetContentType()ThrowablegetFailureCause()StringgetMessage()List<CliActionReport>getSubActionsReport()ActionReport.MessagePartgetTopMessagePart()booleanhasFailures()return true if the action report or a subaction report has ExitCode.FAILURE.booleanhasSuccesses()return true if the action report or a subaction report has ExitCode.SUCCESS.booleanhasWarnings()return true if the action report or a subaction report has ExitCode.WARNING.booleanisFailure()booleanisSuccess()booleanisWarning()voidsetActionDescription(String message)voidsetActionExitCode(ActionReport.ExitCode exitCode)Sets the exit code for the report.voidsetContentType(String s)voidsetFailure()voidsetFailureCause(Throwable t)voidsetMessage(InputStream in)voidsetMessage(String message)voidsetSuccess()voidsetWarning()StringtoString()voidwriteReport(OutputStream os)Outputs the formatted information-
Methods inherited from class org.glassfish.api.ActionReport
failure, failure, findProperty, getExtraProperties, getResultType, setExtraProperties, setResultType
-
-
-
-
Field Detail
-
exception
protected Throwable exception
-
actionDescription
protected String actionDescription
-
subActions
protected List<CliActionReport> subActions
-
exitCode
protected ActionReport.ExitCode exitCode
-
topMessage
protected ActionReport.MessagePart topMessage
-
-
Method Detail
-
setFailure
public void setFailure()
-
isFailure
public boolean isFailure()
-
setWarning
public void setWarning()
-
isWarning
public boolean isWarning()
-
isSuccess
public boolean isSuccess()
-
setSuccess
public void setSuccess()
-
setActionDescription
public void setActionDescription(String message)
- Specified by:
setActionDescriptionin classActionReport
-
getActionDescription
public String getActionDescription()
-
setFailureCause
public void setFailureCause(Throwable t)
- Specified by:
setFailureCausein classActionReport
-
getFailureCause
public Throwable getFailureCause()
- Specified by:
getFailureCausein classActionReport
-
getTopMessagePart
public ActionReport.MessagePart getTopMessagePart()
- Specified by:
getTopMessagePartin classActionReport
-
addSubActionsReport
public ActionReport addSubActionsReport()
- Specified by:
addSubActionsReportin classActionReport
-
getSubActionsReport
public List<CliActionReport> getSubActionsReport()
- Specified by:
getSubActionsReportin classActionReport
-
setActionExitCode
public void setActionExitCode(ActionReport.ExitCode exitCode)
Description copied from class:ActionReportSets the exit code for the report. Note that subreports may have a different exitcode.- Specified by:
setActionExitCodein classActionReport
-
getActionExitCode
public ActionReport.ExitCode getActionExitCode()
- Specified by:
getActionExitCodein classActionReport
-
setMessage
public void setMessage(String message)
- Specified by:
setMessagein classActionReport
-
appendMessage
public void appendMessage(String message)
- Specified by:
appendMessagein classActionReport
-
getMessage
public String getMessage()
- Specified by:
getMessagein classActionReport
-
setMessage
public void setMessage(InputStream in)
- Specified by:
setMessagein classActionReport
-
getContentType
public String getContentType()
- Specified by:
getContentTypein classActionReport
-
setContentType
public void setContentType(String s)
- Specified by:
setContentTypein classActionReport
-
hasSuccesses
public boolean hasSuccesses()
Description copied from class:ActionReportreturn true if the action report or a subaction report has ExitCode.SUCCESS.- Specified by:
hasSuccessesin classActionReport- Returns:
-
hasWarnings
public boolean hasWarnings()
Description copied from class:ActionReportreturn true if the action report or a subaction report has ExitCode.WARNING.- Specified by:
hasWarningsin classActionReport- Returns:
-
hasFailures
public boolean hasFailures()
Description copied from class:ActionReportreturn true if the action report or a subaction report has ExitCode.FAILURE.- Specified by:
hasFailuresin classActionReport- Returns:
-
writeReport
public void writeReport(OutputStream os) throws IOException
Description copied from class:ActionReportOutputs the formatted information- Specified by:
writeReportin classActionReport- Parameters:
os- The OutputStream to which the information is sent to- Throws:
IOException
-
toString
public String toString()
- Overrides:
toStringin classActionReport
-
-