Class CmsValidationResult

java.lang.Object
org.opencms.gwt.shared.CmsValidationResult
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable

public class CmsValidationResult extends Object implements com.google.gwt.user.client.rpc.IsSerializable
The result of a single field validation.

Since:
8.0.0
  • Field Details

  • Constructor Details

    • CmsValidationResult

      public CmsValidationResult(String errorMessage)
      Creates a new validation result which doesn't replace the current field value.

      Parameters:
      errorMessage - the error message to display, or null if there
    • CmsValidationResult

      public CmsValidationResult(String errorMessage, String newValue)
      Creates a new validation result which also replaces the current field value.

      Parameters:
      errorMessage - the error message to display, or null if there was no error
      newValue - the replacement for the field value
    • CmsValidationResult

      protected CmsValidationResult()
      Hidden default constructor.

  • Method Details

    • getErrorMessage

      Returns the error message, or null if the validation has succeeded.

      Returns:
      an error message or null the
    • getNewValue

      public String getNewValue()
      Returns the replacement for the field value.

      Returns:
      the replacement for the field value
    • hasNewValue

      public boolean hasNewValue()
      Returns true if the field value should be replaced.

      Returns:
      true if the field value should be replaced
    • isOk

      public boolean isOk()
      Returns true if the validation has succeeded.

      Returns:
      true if the validation has succeeded