Package com.adobe.acs.commons.workflow
Interface WorkflowPackageManager
@ProviderType
public interface WorkflowPackageManager
-
Method Summary
Modifier and TypeMethodDescriptioncom.day.cq.wcm.api.Pagecreate(org.apache.sling.api.resource.ResourceResolver resourceResolver, String name, String... paths) Creates a Workflow Package for the provided paths.com.day.cq.wcm.api.Pagecreate(org.apache.sling.api.resource.ResourceResolver resourceResolver, String bucketSegment, String name, String... paths) Creates a Workflow Package for the provided paths.voidDeletes the specified Workflow Package.getPaths(org.apache.sling.api.resource.ResourceResolver resourceResolver, String workflowPackagePath) Gets the payload paths in the Workflow Package.getPaths(org.apache.sling.api.resource.ResourceResolver resourceResolver, String workflowPackagePath, String[] nodeTypes) Gets the payload paths in the Workflow Package.booleanisWorkflowPackage(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path) Checks if the resource at the specified path is a Workflow Package Page.
-
Method Details
-
create
com.day.cq.wcm.api.Page create(org.apache.sling.api.resource.ResourceResolver resourceResolver, String bucketSegment, String name, String... paths) throws com.day.cq.wcm.api.WCMException, javax.jcr.RepositoryException Creates a Workflow Package for the provided paths. The Workflow Page will include the provided paths and any jcr:content sub-structure. Stores all workflow packages under /etc/workflow/packages/{bucketSegment}- Parameters:
resourceResolver- the resource resolver used to create the packagebucketSegment- a path segment used to organize workflow packagesname- the name of the packagepaths- the paths to include- Returns:
- the Page representing the Workflow Page
- Throws:
com.day.cq.wcm.api.WCMExceptionjavax.jcr.RepositoryException
-
create
com.day.cq.wcm.api.Page create(org.apache.sling.api.resource.ResourceResolver resourceResolver, String name, String... paths) throws com.day.cq.wcm.api.WCMException, javax.jcr.RepositoryException Creates a Workflow Package for the provided paths. The Workflow Page will include the provided paths and any jcr:content sub-structure. Stores all workflow packages under /etc/workflow/packages- Parameters:
resourceResolver- the resource resolver used to create the packagename- the name of the packagepaths- the paths to include- Returns:
- the Page representing the Workflow Page
- Throws:
com.day.cq.wcm.api.WCMExceptionjavax.jcr.RepositoryException
-
getPaths
List<String> getPaths(org.apache.sling.api.resource.ResourceResolver resourceResolver, String workflowPackagePath) throws javax.jcr.RepositoryException Gets the payload paths in the Workflow Package. This method will always return a List. - If the path does not resolve to a resource > an empty list - If the path does not resolve to a Workflow Package > a List of one item; the param path - If the path does resolve to a Workflow Package > a List of all resources in the Workflow Package but not the WF Package itself.- Parameters:
resourceResolver- The resource resolver to access the Workflow PackageworkflowPackagePath- the absolute path to the Workflow Package- Returns:
- a list of paths contained in the Workflow Package
- Throws:
javax.jcr.RepositoryException
-
getPaths
List<String> getPaths(org.apache.sling.api.resource.ResourceResolver resourceResolver, String workflowPackagePath, String[] nodeTypes) throws javax.jcr.RepositoryException Gets the payload paths in the Workflow Package. This method will always return a List. - If the path does not resolve to a resource > an empty list - If the path does not resolve to a Workflow Package > a List of one item; the param path - If the path does resolve to a Workflow Package > a List of all resources in the Workflow Package but not the WF Package itself.- Parameters:
resourceResolver- The resource resolver to access the Workflow PackageworkflowPackagePath- the absolute path to the Workflow PackagenodeTypes- the allowed node types to include in the Workflow Package- Returns:
- a list of paths contained in the Workflow Package
- Throws:
javax.jcr.RepositoryException
-
delete
void delete(org.apache.sling.api.resource.ResourceResolver resourceResolver, String workflowPackagePath) throws javax.jcr.RepositoryException Deletes the specified Workflow Package.- Parameters:
resourceResolver- The resource resolver to access the Workflow PackageworkflowPackagePath- the absolute path to the Workflow Package to delete- Throws:
javax.jcr.RepositoryException
-
isWorkflowPackage
boolean isWorkflowPackage(org.apache.sling.api.resource.ResourceResolver resourceResolver, String path) Checks if the resource at the specified path is a Workflow Package Page.- Parameters:
resourceResolver- The resource resolver to access the Workflow Package candidatepath- The path to the candidate Workflow Package- Returns:
- true if the path points to a Workflow Package Page
-