Class ValidationResult

java.lang.Object
org.craftercms.studio.model.policy.ValidationResult

public class ValidationResult extends Object
Holds the result of a site policy validation
Since:
4.0.0
Author:
joseross
  • Field Details

    • type

      protected Type type
      The type of the action
    • target

      protected String target
      The target of the action
    • allowed

      protected boolean allowed
      Indicates if the action is allowed
    • modifiedValue

      protected String modifiedValue
      Indicates the modified target if there is one
  • Constructor Details

    • ValidationResult

      public ValidationResult()
  • Method Details

    • allowed

      public static ValidationResult allowed(Action action)
    • allowedWithModifications

      public static ValidationResult allowedWithModifications(Action action, String modifiedValue)
    • notAllowed

      public static ValidationResult notAllowed(Action action)
    • getType

      public Type getType()
    • setType

      public void setType(Type type)
    • getTarget

      public String getTarget()
    • setTarget

      public void setTarget(String target)
    • isAllowed

      public boolean isAllowed()
    • setAllowed

      public void setAllowed(boolean allowed)
    • getModifiedValue

      public String getModifiedValue()
    • setModifiedValue

      public void setModifiedValue(String modifiedValue)