Package com.day.cq.workflow.collection
Class ResourceCollectionUtil
- java.lang.Object
-
- com.day.cq.workflow.collection.ResourceCollectionUtil
-
public class ResourceCollectionUtil extends java.lang.Object
TheResourceCollectionUtil
class 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 Node
getContainingPage(ResourceCollection collection, Session session)
AResourceCollection
can be part of a cq page.static ResourceCollection
getResourceCollection(Node node, ResourceCollectionManager manager)
The method returns theResourceCollection
which 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 theResourceCollection
which is either represented by the given node or one of its children. This is useful in case theResourceCollection
is somewhere placed on a cq page (e.g.: /aPage/jcr:content/cq:collection/...- Parameters:
node
- possible resource collection node.manager
- theResourceCollectionManager
- Returns:
- the
ResourceCollection
if such a collection found otherwisenull
- Throws:
RepositoryException
-RepositoryException
in case an error occurs while fetching collection.
-
getContainingPage
public static Node getContainingPage(ResourceCollection collection, Session session) throws RepositoryException
AResourceCollection
can be part of a cq page. This method returns the containing cq page.- Parameters:
collection
- theResourceCollection
session
- the userSession
- Returns:
- The page node if found otherwise the node which represents the collection.
- Throws:
RepositoryException
-RepositoryException
in case an error occurs while fetching node page.
-
-