Interface AssetUpdate


public interface AssetUpdate
An update of (part of) an asset being performed. Represents an ongoing update of an asset (or an aspect of it, such as its metadata) to be used in monitoring workflow processes and allow supervision of execution times and successes.
  • Method Details

    • getAsset

      Asset getAsset()
      Get the asset this update is about.
      Returns:
      the asset being updated.
    • getAsset

      Asset getAsset(AssetUpdate.Check check) throws WorkflowException
      Get the asset, if it is acceptable. Otherwise return null.
      Parameters:
      check - the check to be performed
      Returns:
      the checked asset or null
      Throws:
      WorkflowException - on general failure
    • checkAndRun

      void checkAndRun(AssetUpdate.Check check, AssetUpdate.Runner runner) throws WorkflowException
      Perform and the check, and if successful, run the instance
      Parameters:
      check - the check to be performed on the asset
      runner - the code to be executed on a successful check
      Throws:
      WorkflowException - on general failure
    • checkAndRunJob

      Variation of checkAndRun(Check, Runner) that can return the identity of a started, decoupled sling job.
      Parameters:
      check - the check to be performed on the asset
      runner - the code to be executed on a successful check
      Returns:
      the identifier of the started job or null
      Throws:
      WorkflowException - on general failure
    • isIgnored

      boolean isIgnored()
    • ignore

      void ignore()
      Ignore this update in monitoring.
    • done

      void done()
      Report the upate as finished.
    • error

      void error(Exception ex)
      Report an error during update.
      Parameters:
      ex - the exception that as caught, or null.
    • addJob

      void addJob(Job job)
      Announce that a job is run as part of this update.
      Parameters:
      job - the job that will run