Class Actions
java.lang.Object
com.adobe.acs.commons.fam.actions.Actions
Various deferred actions to be used with the ActionManager
-
Method Summary
Modifier and TypeMethodDescriptionstatic ActionManager
Obtain the current action manager -- this is necessary for additional tracking such as current itemstatic final CheckedConsumer<org.apache.sling.api.resource.ResourceResolver>
retry
(int retries, long pausePerRetry, CheckedConsumer<org.apache.sling.api.resource.ResourceResolver> action) Retry a single actionstatic final CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver,
String> retryAll
(int retries, long pausePerRetry, CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver, String> action) Retry provided action a given number of times before giving up and throwing an error.static void
static void
setCurrentItem
(String item) static final CheckedConsumer<org.apache.sling.api.resource.ResourceResolver>
startSyntheticWorkflow
(SyntheticWorkflowModel model, String path, SyntheticWorkflowRunner workflowRunner) Run a synthetic workflow on a single nodestatic final CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver,
String> startSyntheticWorkflows
(SyntheticWorkflowModel model, SyntheticWorkflowRunner workflowRunner) Run nodes through synthetic workflow
-
Method Details
-
getCurrentActionManager
Obtain the current action manager -- this is necessary for additional tracking such as current item- Returns:
- current action manager
-
setCurrentActionManager
-
setCurrentItem
-
retryAll
public static final CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver,String> retryAll(int retries, long pausePerRetry, CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver, String> action) Retry provided action a given number of times before giving up and throwing an error. Before each retry attempt, the resource resolver is reverted so when using this it is a good idea to commit from your action directly.- Parameters:
retries
- Number of retries to attemptpausePerRetry
- Milliseconds to wait between attemptsaction
- Action to attempt- Returns:
- New retry wrapper around provided action
-
startSyntheticWorkflows
public static final CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver,String> startSyntheticWorkflows(SyntheticWorkflowModel model, SyntheticWorkflowRunner workflowRunner) Run nodes through synthetic workflow- Parameters:
model
- Synthetic workflow model
-
retry
public static final CheckedConsumer<org.apache.sling.api.resource.ResourceResolver> retry(int retries, long pausePerRetry, CheckedConsumer<org.apache.sling.api.resource.ResourceResolver> action) Retry a single action- Parameters:
retries
- Number of retries to attemptpausePerRetry
- Milliseconds to wait between attemptsaction
- Action to attempt- Returns:
- New retry wrapper around provided action
-
startSyntheticWorkflow
public static final CheckedConsumer<org.apache.sling.api.resource.ResourceResolver> startSyntheticWorkflow(SyntheticWorkflowModel model, String path, SyntheticWorkflowRunner workflowRunner) Run a synthetic workflow on a single node- Parameters:
model
-path
-- Returns:
-