Package com.day.cq.commons
Class JcrLabeledResource
java.lang.Object
com.day.cq.commons.JcrLabeledResource
- All Implemented Interfaces:
LabeledResource
Implements a labeled resource that reads the values from jcr properties.
-
Constructor Summary
ConstructorsConstructorDescriptionJcrLabeledResource(Node node) Creates a new JcrLabeledResource and initializes its field from the properties of the given node or it'sjcr:contentchild node. -
Method Summary
-
Constructor Details
-
JcrLabeledResource
Creates a new JcrLabeledResource and initializes its field from the properties of the given node or it'sjcr:contentchild node.- Parameters:
node- the node- Throws:
RepositoryException- if an error during repository access occurs.
-
-
Method Details
-
getPath
Returns the path of this resource- Specified by:
getPathin interfaceLabeledResource- Returns:
- the path of the underlying node
-
getName
Returns the name of this resource. this is usually the last segment of it's path.- Specified by:
getNamein interfaceLabeledResource- Returns:
- the name of the underlying node
-
getTitle
Returns the tile of this resource.- Specified by:
getTitlein interfaceLabeledResource- Returns:
- the value of the
jcr:titleproperty of the underlying node or of it'sjcr:contentchild node if it exists.nullotherwise.
-
getDescription
Returns the description of this resource.- Specified by:
getDescriptionin interfaceLabeledResource- Returns:
- the value of the
jcr:descriptionproperty of the underlying node or of it'sjcr:contentchild node if it exists.nullotherwise.
-