public class CQWorkflowClient extends WorkflowClient
WorkflowClient.Status
CQClient.Builder, CQClient.InternalBuilder<T extends CQClient>
Modifier and Type | Field and Description |
---|---|
static String |
CQ_MODEL_PAGE_TEMPLATE |
static String |
LAUNCHER_CONFIG |
static String |
ROOT_PATH_MODEL |
static String |
SAVE_SUFFIX |
MANAGE_WF_ENGINE_PATH, MANAGE_WF_INBOX_PATH, MANAGE_WF_INSTANCES_PATH, MANAGE_WF_MODELS_PATH, MODEL_DESCR_TYPE_JSON, MODEL_LIST_TYPE_ID, MODEL_LIST_TYPE_URI, PAYLOAD_TYPE_JCR, PAYLOAD_TYPE_URL
LOG, STATISTICS_ROOT, wcmCommands
Constructor and Description |
---|
CQWorkflowClient(org.apache.http.impl.client.CloseableHttpClient http,
org.apache.sling.testing.clients.SlingClientConfig config) |
CQWorkflowClient(URI serverUrl,
String user,
String password) |
Modifier and Type | Method and Description |
---|---|
org.apache.sling.testing.clients.SlingHttpResponse |
createNewModelPage(String modelName,
String modelTitle,
int... expectedStatusRange)
Creates a new Model page in the default directory "/etc/workflow/models/".
|
void |
createWorkflowLauncher(String workflowId,
String path,
String nodeType,
EventType eventType)
Adds a new workflow launcher.
|
void |
editWorkflowLauncher(String launcherId,
Map<String,String> propMap)
Edit an existing workflow launcher identified by the launcher configuration name with a set of properties to change
|
void |
editWorkflowLauncher(String launcherId,
String propName,
String value)
Edit one property of an existing workflow launcher identified by the launcher configuration name
|
void |
enableDisableWorkflowLauncher(String launcherId,
boolean enabled)
Enables or disables the workflow launcher
|
Map<String,String> |
getWorkflowLauncher(String launcherId)
Returns a
Map with properties of the workflow launcher |
boolean |
isWorkflowTransient(String workflowModel)
Finds out if the Transient feature flag is enabled for a workflow.
|
org.apache.sling.testing.clients.SlingHttpResponse |
saveModel(String modelPath,
int... expectedStatus)
Saves a model.
|
abortWorkflow, advanceWorkItem, approveAndAdvanceWorkItem, approveComment, chooseRouteAndAdvance, delegateWorkItem, deleteModel, deployModel, deployModel, getInboxItems, getWorkflowEngineInfo, getWorkflowInstance, getWorkflowInstanceHistory, getWorkflowInstances, getWorkflowInstances, getWorkflowInstances, getWorkflowInstances, getWorkflowInstanceURLs, getWorkflowModel, getWorkflowModelAsJSON, getWorkflowModels, getWorkItemBackRouteIds, getWorkItemByURI, isWorkflowEngineActive, parseJSONDate, setWorkflowInstanceStatus, startWorkflow, startWorkflow, startWorkflowEngine, stepBackWorkItem, stopWorkflowEngine, updateModel, updateWfInstanceComment, updateWfInstanceMetaData, updateWfInstanceTitle
copyLanguages, copyPage, createPage, createPageWithRetry, createVersion, deletePage, deletePageWithRetry, lockPage, movePage, movePage, resetPageStatistics, restoreTree, restoreVersion, rolloutPage, searchAndReplaceInPages, searchInPages, setPageProperties, setPageProperty, setPagePropertyImage, unlockPage, uploadAsset, uploadFileCQStyle
createFolder, createNode, createNodeRecursive, deletePath, doGetJson, exists, getJsonNode, getJsonNode, getNodeNameFromPath, getParentPath, getUUId, getUUID, importContent, importContent, importJson, move, setPropertiesString, setPropertyString, setPropertyStringArray, upload, waitExists, waitUntilExists
adaptTo, addValue, close, doDelete, doGet, doGet, doGet, doHead, doPatch, doPost, doPost, doPut, doRawRequest, doRequest, doStreamGet, doStreamPost, doStreamRequest, execute, execute, execute, execute, execute, execute, execute, execute, getClientId, getConnectionManager, getCookieStore, getCredentialsProvider, getParams, getPassword, getPath, getPath, getUrl, getUrl, getUrl, getUser, getValue, getValues, hasValue
public static final String LAUNCHER_CONFIG
public static final String ROOT_PATH_MODEL
public static final String CQ_MODEL_PAGE_TEMPLATE
public static final String SAVE_SUFFIX
public CQWorkflowClient(org.apache.http.impl.client.CloseableHttpClient http, org.apache.sling.testing.clients.SlingClientConfig config) throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
public org.apache.sling.testing.clients.SlingHttpResponse createNewModelPage(String modelName, String modelTitle, int... expectedStatusRange) throws org.apache.sling.testing.clients.ClientException
modelName
- name of the modelmodelTitle
- title to be given to this modelexpectedStatusRange
- expected HTTP statusorg.apache.sling.testing.clients.ClientException
- if the request failspublic org.apache.sling.testing.clients.SlingHttpResponse saveModel(String modelPath, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException
modelPath
- Name of the model to saveexpectedStatus
- list of expected http status codesorg.apache.sling.testing.clients.ClientException
- if the request failspublic void createWorkflowLauncher(String workflowId, String path, String nodeType, EventType eventType) throws org.apache.sling.testing.clients.ClientException
workflowId
- the workflow URIpath
- the path it binds tonodeType
- the node type it affectseventType
- the event type to the nodeorg.apache.sling.testing.clients.ClientException
- if the call to the backend failspublic void editWorkflowLauncher(String launcherId, String propName, String value) throws org.apache.sling.testing.clients.ClientException
Edit one property of an existing workflow launcher identified by the launcher configuration name
The rest of the properties on the workflow launcher stay the same
launcherId
- the launcher configuration stringpropName
- The name of the property about to be changedvalue
- The value of the property about to be changedorg.apache.sling.testing.clients.ClientException
- if the request failspublic void editWorkflowLauncher(String launcherId, Map<String,String> propMap) throws org.apache.sling.testing.clients.ClientException
Edit an existing workflow launcher identified by the launcher configuration name with a set of properties to change
The rest of the properties on the workflow launcher stay the same
launcherId
- the launcher configuration stringpropMap
- A map with properties names and values to be changed on the workfloworg.apache.sling.testing.clients.ClientException
- if the request failspublic Map<String,String> getWorkflowLauncher(String launcherId) throws org.apache.sling.testing.clients.ClientException
Map
with properties of the workflow launcherlauncherId
- the URI of the launcherMap
with propertiesorg.apache.sling.testing.clients.ClientException
- if the request failspublic void enableDisableWorkflowLauncher(String launcherId, boolean enabled) throws org.apache.sling.testing.clients.ClientException
launcherId
- the id of the launcherenabled
- "true" to enable, "false" to disableorg.apache.sling.testing.clients.ClientException
- if the request failspublic boolean isWorkflowTransient(String workflowModel) throws org.apache.sling.testing.clients.ClientException
workflowModel
- the path of the workflow model. These are stored at
/etc/workflow/models/
. The model path to be
provided can be relative (or absolute) to this pathTrue
if the workflow is transient in nature,
False
otherwise.org.apache.sling.testing.clients.ClientException
- if it fails to find the specified workflow model.Copyright © 2018. All rights reserved.