Class JobResult

java.lang.Object
com.xwiki.admintools.jobs.JobResult

@Unstable public class JobResult extends Object
Result of a job. Stores a custom message for the summary of the result, the severity level represented by JobResultLevel. The result may also contain a List of additional parameters used if there is need to store more information about the result.
Since:
1.0
Version:
$Id$
  • Constructor Details

    • JobResult

      public JobResult(String message, JobResultLevel level, Object... parameters)
      Used for registering a result.
      Parameters:
      message - error message representing the summary of the found issue.
      level - severity level of a result.
      parameters - current value of the checked resource.
  • Method Details

    • getMessage

      public String getMessage()
      Get the error body.
      Returns:
      a summary of the error.
    • getParameters

      public List<?> getParameters()
      Get the recommendation for the set error.
      Returns:
      a suggestion for fixing the error.
    • getLevel

      public JobResultLevel getLevel()
      Get the severity level a detected error.
      Returns:
      the severity level of an error.