Package org.apache.sling.validation.model

# Interface ResourceProperty

@ProviderType public interface ResourceProperty
Describes a `Resource` property.

## Method Summary

Modifier and Type
Method
Description
`@NotNull String`
`getName()`
Returns the name of this property.
`@Nullable Pattern`
`getNamePattern()`
Returns the name pattern for this property.
`@NotNull List<ValidatorInvocation>`
`getValidatorInvocations()`
Returns a list of `ValidatorInvocation`s which should be applied on this property.
`boolean`
`isMultiple()`
`boolean`
`isRequired()`
Returns `true` if at least one property matching the name/namePattern is required.

## Method Details

### getName

@NotNull @NotNull String getName()
Returns the name of this property. This must match the name of the property which is validated through this section of the validation model. In case `getNamePattern()` is not `null` this name is not relevant for matching the property.

Returns:
  the name

### getNamePattern

@Nullable @Nullable Pattern getNamePattern()
Returns the name pattern for this property. In case this is not returning `null`, this pattern is used for finding the properties which should be validated.

Returns:
  the name pattern (if one is set) or `null`

### isMultiple

boolean isMultiple()

Returns:
  `true` if the property is expected to contain multiple values, `false` otherwise

### isRequired

boolean isRequired()
Returns `true` if at least one property matching the name/namePattern is required.

Returns:
  `true` if the property is required, `false` otherwise

### getValidatorInvocations

@NotNull @NotNull List<ValidatorInvocation> getValidatorInvocations()
Returns a list of `ValidatorInvocation`s which should be applied on this property.

Returns:
  the `List` of `ValidatorInvocation`s