Class MediaProcessorStep

All Implemented Interfaces:
Serializable, Comparable
Direct Known Subclasses:
GeneratedCSVExportStep, GeneratedGenericCSVImportStep, GeneratedGetURLStep

public abstract class MediaProcessorStep extends GeneratedMediaProcessorStep
The MediaProcessorStep offers convenience methods for the handling of JobMedias. It can only be used if the BatchJob it belongs to is executed with a MediaProcessCronJob. Otherwise the prepareMedia(CronJob) will throw an Exception.
See Also:
  • Constructor Details

    • MediaProcessorStep

      public MediaProcessorStep()
  • Method Details

    • prepareMedia

      protected JobMedia prepareMedia(CronJob cronJob) throws JaloInvalidParameterException
      Prepares the JobMedia item which is going to be processed.

      Overwrite this method in order to implement your preparation logic. This default implementation only returns the assigned JobMedia.

      Parameters:
      cronJob - the CronJob, whose JobMedia should be prepared
      Returns:
      the prepared JobMedia
      Throws:
      JaloInvalidParameterException - if the specified CronJob is not an instance of MediaProcessCronJob
    • canPerform

      protected boolean canPerform(CronJob cronJob)
      Returns true if the MediaProcessorStep can be perform using the specified CronJob. A MediaProcessorStep can be performed, if it has an assigned JobMedia and this JobMedia is not locked.
      Specified by:
      canPerform in class Step
      Parameters:
      cronJob - the CronJob, which should be used for execution
      Returns:
      true if the MediaProcessorStep can be perform using the specified CronJob