Class ValidationModelImpl

java.lang.Object
org.apache.sling.validation.impl.model.ValidationModelImpl
All Implemented Interfaces:
ValidationModel

public class ValidationModelImpl extends Object implements ValidationModel
  • Method Details

    • getResourceProperties

      @Nonnull public List<ResourceProperty> getResourceProperties()
      Description copied from interface: ValidationModel
      Returns the properties validated by this model.
      Specified by:
      getResourceProperties in interface ValidationModel
      Returns:
      the properties list (never null, but might be empty list)
    • getValidatingResourceType

      @Nonnull public String getValidatingResourceType()
      Description copied from interface: ValidationModel
      Returns the type of resource this model validates.
      Specified by:
      getValidatingResourceType in interface ValidationModel
      Returns:
      the resource type to be validated, never null
    • getApplicablePaths

      @Nonnull public Collection<String> getApplicablePaths()
      Description copied from interface: ValidationModel
      Returns the paths under which resources will be validated by this model. Might return a single element array containing only the empty string, in which case the validation model has no path restriction.
      Specified by:
      getApplicablePaths in interface ValidationModel
      Returns:
      a path array. Is never null nor an empty collection.
    • getChildren

      @Nonnull public List<ChildResource> getChildren()
      Description copied from interface: ValidationModel
      Returns the expected children for a resource validated by this model.
      Specified by:
      getChildren in interface ValidationModel
      Returns:
      the children list (can be empty if there are no children), never null
    • getSource

      @Nonnull public String getSource()
      Specified by:
      getSource in interface ValidationModel
      Returns:
      a string indicating the original source of this validation model, e.g. a resource path
    • toString

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

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object