@ProviderType
public interface WorkflowHelper
| Modifier and Type | Interface and Description |
|---|---|
static class |
WorkflowHelper.AssetResourceResolverPair
A simple tuple which contains a resolved asset and a resource resolver, so that the resource resolver
can later be closed.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
PAYLOAD_TYPE_JCR_PATH |
static String |
PROCESS_ARGS |
static String |
TYPE_JCR_PATH |
| Modifier and Type | Method and Description |
|---|---|
String[] |
buildArguments(com.day.cq.workflow.metadata.MetaDataMap metaData)
Build an arguments array from the metadata map.
|
WorkflowHelper.AssetResourceResolverPair |
getAssetFromPayload(com.day.cq.workflow.exec.WorkItem item,
com.day.cq.workflow.WorkflowSession workflowSession)
Resolve the asset for the workflow's payload and return it, along with a resolved resource resolver.
|
String |
getExtension(String mimetype)
Return the extension corresponding to the mime type.
|
org.apache.sling.api.resource.Resource |
getPageOrAssetResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String path)
Derives either an Asset or Page resource (dam:Asset or cq:Page) that the provided path belongs to.
|
double |
getQuality(double base,
String qualityStr)
Parse the provided quality string, from 1 to 100, and
apply it to the base.
|
org.apache.sling.api.resource.ResourceResolver |
getResourceResolver(com.adobe.granite.workflow.WorkflowSession workflowSession)
Convenience method for getting a ResourceResolver object from a Granite based Workflow Process.
|
org.apache.sling.api.resource.ResourceResolver |
getResourceResolver(com.day.cq.workflow.WorkflowSession workflowSession)
Convenience method for getting a ResourceResolver object from a CQ based Workflow Process.
|
List<String> |
getValuesFromArgs(String name,
String[] args)
Parse a workflow args string in the formaat >name<:>value<,>name<:>value< and
extract the values with the specified name.
|
boolean |
isPathTypedPayload(com.day.cq.workflow.exec.WorkflowData workflowData)
Method for CQ Workflow APIs.
|
boolean |
isPathTypedPayload(com.adobe.granite.workflow.exec.WorkflowData workflowData)
Method for Granite Workflow APIs.
|
static final String PROCESS_ARGS
static final String TYPE_JCR_PATH
static final String PAYLOAD_TYPE_JCR_PATH
org.apache.sling.api.resource.ResourceResolver getResourceResolver(com.adobe.granite.workflow.WorkflowSession workflowSession)
workflowSession - the granite workflow sessionorg.apache.sling.api.resource.ResourceResolver getResourceResolver(com.day.cq.workflow.WorkflowSession workflowSession)
throws org.apache.sling.api.resource.LoginException
workflowSession - the CQ workflow sessionorg.apache.sling.api.resource.LoginExceptionWorkflowHelper.AssetResourceResolverPair getAssetFromPayload(com.day.cq.workflow.exec.WorkItem item, com.day.cq.workflow.WorkflowSession workflowSession)
item - the workflow workitemworkflowSession - the workflow sessionString getExtension(String mimetype)
mimetype - the mimetypeString[] buildArguments(com.day.cq.workflow.metadata.MetaDataMap metaData)
metaData - the metadata mapsList<String> getValuesFromArgs(String name, String[] args)
name - the argument nameargs - the arguments arraydouble getQuality(double base,
String qualityStr)
base - the maximal quality valuequalityStr - the string to parseorg.apache.sling.api.resource.Resource getPageOrAssetResource(org.apache.sling.api.resource.ResourceResolver resourceResolver,
String path)
resourceResolver - the resourceResolver to resolve the path to the appropriate resourcepath - the path to resolve to an Asset or Pageboolean isPathTypedPayload(com.day.cq.workflow.exec.WorkflowData workflowData)
workflowData - the Workflow databoolean isPathTypedPayload(com.adobe.granite.workflow.exec.WorkflowData workflowData)
workflowData - the Workflow dataCopyright © 2013–2020 Adobe. All rights reserved.