Class ChildResourceImpl

java.lang.Object
org.apache.sling.validation.impl.model.ChildResourceImpl
All Implemented Interfaces:
ChildResource

public class ChildResourceImpl extends Object implements ChildResource
Implements a ChildResource
  • Constructor Details

  • Method Details

    • getName

      @Nonnull public String getName()
      Description copied from interface: ChildResource
      Return this resource's name. This must match the name of the child resource which is validated through this section of the validation model. In case ChildResource.getNamePattern() is not null this name is not relevant for matching the content resource.
      Specified by:
      getName in interface ChildResource
      Returns:
      the name
    • getProperties

      @Nonnull public Collection<ResourceProperty> getProperties()
      Description copied from interface: ChildResource
      Returns the properties this child resource is expected to have.
      Specified by:
      getProperties in interface ChildResource
      Returns:
      the properties list. Never null.
    • getNamePattern

      public Pattern getNamePattern()
      Description copied from interface: ChildResource
      Returns this resource's name pattern. In case this is not returning null, this pattern is used for finding the child resources which should be validated.
      Specified by:
      getNamePattern in interface ChildResource
      Returns:
      the name pattern (if one is set) or null
    • getChildren

      @Nonnull public Collection<ChildResource> getChildren()
      Description copied from interface: ChildResource
      Returns the child resources of this part of the Validation Model
      Specified by:
      getChildren in interface ChildResource
      Returns:
      child resources. Never null.
    • isRequired

      public boolean isRequired()
      Description copied from interface: ChildResource
      Returns true if at least one resource matching the name/namePattern is required.
      Specified by:
      isRequired in interface ChildResource
      Returns:
      true if the resource is required, false otherwise
    • hashCode

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

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

      public String toString()
      Overrides:
      toString in class Object