Class ActionReporter

    • Constructor Detail

      • ActionReporter

        public ActionReporter()
        Creates a new instance of HTMLActionReporter
    • Method Detail

      • setFailure

        public void setFailure()
        Sets the exit code of the report to failure
      • isFailure

        public boolean isFailure()
        Returns:
      • setWarning

        public void setWarning()
      • isWarning

        public boolean isWarning()
      • isSuccess

        public boolean isSuccess()
      • setSuccess

        public void setSuccess()
      • getActionDescription

        public String getActionDescription()
      • getContentType

        public String getContentType()
        Returns the content type to be used in sending the response back to the client/caller.

        This is the default type. Specific subclasses of ActionReporter might override the method to return a different valid type.

        Specified by:
        getContentType in class ActionReport
        Returns:
        content type to be used in formatting the command response to the client
      • getCombinedMessages

        public void getCombinedMessages​(ActionReporter aReport,
                                        StringBuilder sb)
        Returns combined messages. Meant mainly for long running operations where some of the intermediate steps can go wrong, although overall operation succeeds. Does nothing if either of the arguments are null. The traversal visits the message of current reporter first. The various parts of the message are separated by EOL_MARKERs.

        Note: This method is a recursive implementation.

        Parameters:
        aReport - a given (usually top-level) ActionReporter instance
        sb - StringBuilder instance that contains all the messages
      • hasSuccesses

        public boolean hasSuccesses()
        Description copied from class: ActionReport
        return true if the action report or a subaction report has ExitCode.SUCCESS.
        Specified by:
        hasSuccesses in class ActionReport
        Returns:
      • hasWarnings

        public boolean hasWarnings()
        Description copied from class: ActionReport
        return true if the action report or a subaction report has ExitCode.WARNING.
        Specified by:
        hasWarnings in class ActionReport
        Returns:
      • hasFailures

        public boolean hasFailures()
        Description copied from class: ActionReport
        return true if the action report or a subaction report has ExitCode.FAILURE.
        Specified by:
        hasFailures in class ActionReport
        Returns: