Package com.day.cq.workflow.collection
Class ResourceCollectionUtil
- java.lang.Object
-
- com.day.cq.workflow.collection.ResourceCollectionUtil
-
public class ResourceCollectionUtil extends java.lang.ObjectTheResourceCollectionUtilclass provides some public utility methods...
-
-
Constructor Summary
Constructors Constructor Description ResourceCollectionUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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.
-
-
-
Method Detail
-
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.
-
-