Class ChildResourceImpl
java.lang.Object
org.apache.sling.validation.impl.model.ChildResourceImpl
- All Implemented Interfaces:
ChildResource
Implements a
ChildResource-
Constructor Summary
ConstructorsConstructorDescriptionChildResourceImpl(String name, String nameRegex, boolean isRequired, List<ResourceProperty> properties, List<ChildResource> children) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the child resources of this part of the Validation ModelgetName()Return this resource's name.Returns this resource's name pattern.Returns the properties this child resource is expected to have.inthashCode()booleanReturnstrueif at least one resource matching the name/namePattern is required.toString()
-
Constructor Details
-
ChildResourceImpl
public ChildResourceImpl(@Nonnull String name, String nameRegex, boolean isRequired, @Nonnull List<ResourceProperty> properties, @Nonnull List<ChildResource> children)
-
-
Method Details
-
getName
Description copied from interface:ChildResourceReturn this resource's name. This must match the name of the child resource which is validated through this section of the validation model. In caseChildResource.getNamePattern()is notnullthis name is not relevant for matching the content resource.- Specified by:
getNamein interfaceChildResource- Returns:
- the name
-
getProperties
Description copied from interface:ChildResourceReturns the properties this child resource is expected to have.- Specified by:
getPropertiesin interfaceChildResource- Returns:
- the properties list. Never
null.
-
getNamePattern
Description copied from interface:ChildResourceReturns this resource's name pattern. In case this is not returningnull, this pattern is used for finding the child resources which should be validated.- Specified by:
getNamePatternin interfaceChildResource- Returns:
- the name pattern (if one is set) or
null
-
getChildren
Description copied from interface:ChildResourceReturns the child resources of this part of the Validation Model- Specified by:
getChildrenin interfaceChildResource- Returns:
- child resources. Never
null.
-
isRequired
public boolean isRequired()Description copied from interface:ChildResourceReturnstrueif at least one resource matching the name/namePattern is required.- Specified by:
isRequiredin interfaceChildResource- Returns:
trueif the resource is required,falseotherwise
-
hashCode
public int hashCode() -
equals
-
toString
-