Package org.apache.sling.validation.model

# Interface ValidationModel

@ProviderType public interface ValidationModel
A `ValidationModel` defines the validation rules that a resource tree has to pass.

## Method Summary

Modifier and Type
Method
Description
`@NotNull Collection<String>`
`getApplicablePaths()`
Returns the paths under which resources will be validated by this model.
`@NotNull Collection<ChildResource>`
`getChildren()`
Returns the expected children for a resource validated by this model.
`@NotNull Collection<ResourceProperty>`
`getResourceProperties()`
Returns the properties validated by this model.
`@NotNull String`
`getSource()`
`@NotNull String`
`getValidatingResourceType()`
Returns the type of resource this model validates.

## Method Details

### getResourceProperties

@NotNull @NotNull Collection<ResourceProperty> getResourceProperties()
Returns the properties validated by this model.

Returns:
  the properties list (never `null`, but might be empty list)

### getValidatingResourceType

@NotNull @NotNull String getValidatingResourceType()
Returns the type of resource this model validates.

Returns:
  the resource type to be validated, never `null`

### getApplicablePaths

@NotNull @NotNull Collection<String> getApplicablePaths()
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.

Returns:
  a path array. Is never `null` nor an empty collection.

### getChildren

@NotNull @NotNull Collection<ChildResource> getChildren()
Returns the expected children for a resource validated by this model.

Returns:
  the children list (can be empty if there are no children), never `null`

### getSource

@NotNull @NotNull String getSource()

Returns:
  a string indicating the original source of this validation model, e.g. a resource path