Class ChildResourceImpl
java.lang.Object
org.apache.sling.validation.impl.model.ChildResourceImpl
- All Implemented Interfaces:
ChildResource
Implements a
ChildResource
-
Constructor Summary
ConstructorDescriptionChildResourceImpl
(String name, String nameRegex, boolean isRequired, List<ResourceProperty> properties, List<ChildResource> children) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns 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.int
hashCode()
boolean
Returnstrue
if 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: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 caseChildResource.getNamePattern()
is notnull
this name is not relevant for matching the content resource.- Specified by:
getName
in interfaceChildResource
- Returns:
- the name
-
getProperties
Description copied from interface:ChildResource
Returns the properties this child resource is expected to have.- Specified by:
getProperties
in interfaceChildResource
- Returns:
- the properties list. Never
null
.
-
getNamePattern
Description copied from interface:ChildResource
Returns 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:
getNamePattern
in interfaceChildResource
- Returns:
- the name pattern (if one is set) or
null
-
getChildren
Description copied from interface:ChildResource
Returns the child resources of this part of the Validation Model- Specified by:
getChildren
in interfaceChildResource
- Returns:
- child resources. Never
null
.
-
isRequired
public boolean isRequired()Description copied from interface:ChildResource
Returnstrue
if at least one resource matching the name/namePattern is required.- Specified by:
isRequired
in interfaceChildResource
- Returns:
true
if the resource is required,false
otherwise
-
hashCode
public int hashCode() -
equals
-
toString
-