Class Actions

java.lang.Object
com.adobe.acs.commons.fam.actions.Actions

@ProviderType public final class Actions extends Object
Various deferred actions to be used with the ActionManager
  • Method Details

    • getCurrentActionManager

      public static ActionManager getCurrentActionManager()
      Obtain the current action manager -- this is necessary for additional tracking such as current item
      Returns:
      current action manager
    • setCurrentActionManager

      public static void setCurrentActionManager(ActionManager a)
    • setCurrentItem

      public static void setCurrentItem(String item)
    • 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 attempt
      pausePerRetry - Milliseconds to wait between attempts
      action - 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 attempt
      pausePerRetry - Milliseconds to wait between attempts
      action - 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: