Package com.day.cq.workflow.collection
Class ResourceCollectionUtil
java.lang.Object
com.day.cq.workflow.collection.ResourceCollectionUtil
The
ResourceCollectionUtil class provides some public utility
methods...-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NodegetContainingPage(ResourceCollection collection, Session session) AResourceCollectioncan be part of a cq page.static ResourceCollectiongetResourceCollection(Node node, ResourceCollectionManager manager) The method returns theResourceCollectionwhich is either represented by the given node or one of its children.
-
Constructor Details
-
ResourceCollectionUtil
public ResourceCollectionUtil()
-
-
Method Details
-
getResourceCollection
public static ResourceCollection getResourceCollection(Node node, ResourceCollectionManager manager) throws RepositoryException The method returns theResourceCollectionwhich is either represented by the given node or one of its children. This is useful in case theResourceCollectionis somewhere placed on a cq page (e.g.: /aPage/jcr:content/cq:collection/...- Parameters:
node- possible resource collection node.manager- theResourceCollectionManager- Returns:
- the
ResourceCollectionif such a collection found otherwisenull - Throws:
RepositoryException-RepositoryExceptionin case an error occurs while fetching collection.
-
getContainingPage
public static Node getContainingPage(ResourceCollection collection, Session session) throws RepositoryException AResourceCollectioncan be part of a cq page. This method returns the containing cq page.- Parameters:
collection- theResourceCollectionsession- the userSession- Returns:
- The page node if found otherwise the node which represents the collection.
- Throws:
RepositoryException-RepositoryExceptionin case an error occurs while fetching node page.
-