Class EditConfirmationCheckerResult

java.lang.Object
org.xwiki.model.validation.edit.EditConfirmationCheckerResult

@Unstable public class EditConfirmationCheckerResult extends Object
The result of a EditConfirmationChecker. It contains a message and a boolean indicating if the result is an error (true), or a warning (false).
Since:
15.9RC1
Version:
$Id: 0e939180d063540615206f03f876bd0df128d79a $
  • Constructor Details

    • EditConfirmationCheckerResult

      public EditConfirmationCheckerResult(org.xwiki.rendering.block.Block message, boolean isError)
      Constructs a new object with the specified message and error status. This constructor initializes the skipValue with a null value, meaning that the result can't be skipped (i.e., if EditConfirmationChecker.check() does not return Optional.empty(), the result will always be presented to the user).
      Parameters:
      message - the message associated with the result
      isError - the error status of the result, error when true, warning otherwise
      See Also:
    • EditConfirmationCheckerResult

      @Unstable public EditConfirmationCheckerResult(org.xwiki.rendering.block.Block message, boolean isError, Serializable skipValue)
      Constructs a new object with the specified message, an error status, and a cache result object.
      Parameters:
      message - the message associated with the result
      isError - the error status of the result, error when true, warning otherwise
      skipValue - the skip value associated with the result. When null the result can't be skipped (i.e., if EditConfirmationChecker.check() does not return Optional.empty(), the result will always be presented to the user).
      Since:
      15.10RC1
      See Also:
  • Method Details

    • getMessage

      public org.xwiki.rendering.block.Block getMessage()
      Returns the message associated with this result.
      Returns:
      the message associated with this result
    • isError

      public boolean isError()
      Checks if the result is an error.
      Returns:
      true if the result is an error, false otherwise
    • getSkipValue

      public Serializable getSkipValue()
      The value used to check if a result can be skipped. This is used when checking if the content of the force cache is still equal to the current result.
      Returns:
      the skip value of the current result
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object