Class CronJobManager

All Implemented Interfaces:
ItemLifecycleListener, Serializable

public class CronJobManager extends GeneratedCronJobManager
The CronJobManager offers create-methods for CronJobExtension items and methods for Trigger handling.
See Also:
  • Field Details

    • LOADONSTARTUP_CONFIG_PARAM

      public static final String LOADONSTARTUP_CONFIG_PARAM
      See Also:
    • CRON_JOB_HISTORY_RESET_THRESHOLD_HOURS

      public static final String CRON_JOB_HISTORY_RESET_THRESHOLD_HOURS
      See Also:
    • BEAN_NAME

      public static final String BEAN_NAME
      See Also:
    • listener

      public static final de.hybris.platform.cronjob.jalo.CronJobManager.CronJobTenantListener listener
    • cronjobLogger

      public static final CronJobLogListener cronjobLogger
  • Constructor Details

    • CronJobManager

      public CronJobManager()
  • Method Details

    • setKeyGenerator

      public void setKeyGenerator(KeyGenerator keyGenerator)
    • processStartMessage

      protected void processStartMessage(String str)
    • doStart

      protected void doStart(String cronJobPK)
    • performOnOtherNode

      @Deprecated(since="ages", forRemoval=false) public void performOnOtherNode(int nodeID, CronJob cronJob)
      Tries to performs a given cronjob on a different node.
      Parameters:
      nodeID - the node to perform this cronjob at
      cronJob - the cronjob to perform
    • onFirstSessionCreation

      public void onFirstSessionCreation()
      Description copied from class: Extension
      Is called on first session creation (while startup) exactly one time. Put here code which has to be called within startup process.
      Overrides:
      onFirstSessionCreation in class Extension
    • startupCronjobEngine

      protected void startupCronjobEngine()
    • stopConjobEngine

      protected void stopConjobEngine()
    • getCronjobBroadcastMessagePrefix

      protected String getCronjobBroadcastMessagePrefix()
    • getInstance

      public static CronJobManager getInstance()
      Returns the CronJobManager instance.
      Returns:
      the CronJobManager instance
    • getInstance

      public static CronJobManager getInstance(Tenant tenant)
    • checkBeforeItemRemoval

      protected void checkBeforeItemRemoval(SessionContext ctx, Item item) throws ConsistencyCheckException
      Superclass method overridden to avoid calls to ejb layer.
      Overrides:
      checkBeforeItemRemoval in class Extension
      Parameters:
      ctx - the current session context
      item - the item which should be removed
      Throws:
      ConsistencyCheckException - thrown to abort removal due to consistency errors
    • notifyItemRemoval

      protected void notifyItemRemoval(SessionContext ctx, Item item)
      Superclass method overridden to avoid calls to ejb layer.
      Overrides:
      notifyItemRemoval in class Extension
      Parameters:
      ctx - the currency session context
      item - the item which is going to be removed
    • createBatchJob

      @Deprecated(since="4.3", forRemoval=false) public BatchJob createBatchJob(String code)
      Deprecated.
      since 4.3 BatchJob is obsolete
      Creates a BatchJob with the specified code.
      Parameters:
      code - the code of the new BatchJob
      Returns:
      the new BatchJob
    • createCronJob

      @Deprecated(since="ages", forRemoval=false) public CronJob createCronJob(Job job, String code, boolean active)
      Deprecated.
      since ages - use plainCronJobModel creation instead, refer to wiki documentation
      Creates a CronJob for the specified Job, with the specified code and active flag. The node id of the new CronJob is set to the value configured in the project|local.properties file in the extension directory with the 'cronjob.clusterid' property.
      Parameters:
      job - the Job which should be performed using this new CronJob
      code - the code of the new CronJob
      active - true, if the new CronJob should be active. false, if the CronJob should be inactive
      Returns:
      the new CronJob
    • createCronJob

      @Deprecated(since="ages", forRemoval=false) public CronJob createCronJob(Job job, String code, boolean active, int node)
      Deprecated.
      since ages - use plainCronJobModel creation instead, refer to wiki documentation
      Creates a CronJob for the specified Job, with the specified code and active flag. The node id of the new CronJob is set to the value configured in the project|local.properties file in the extension directory with the 'cronjob.mastermode' property.
      Parameters:
      job - the Job which should be performed using this new CronJob
      code - the code of the new CronJob
      active - true, if the new CronJob should be active. false, if the CronJob should be inactive
      node - the id of the node, this CronJob should be executed on
      Returns:
      the new CronJob
    • createTypeSystemExportJob

      @Deprecated(since="ages", forRemoval=false) public TypeSystemExportJob createTypeSystemExportJob(String code)
      Deprecated.
      since agesTypeSystemExportJob is obsolete since 4.3
      Creates a new TypeSystemExportJob instance with the specified code.
      Parameters:
      code - the code of the new TypeSystemExportJob
      Returns:
      a new TypeSystemExportJob instance with the specified code
    • createTrigger

      @Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, Date date)
      Deprecated.
      since ages - use plainTriggerModel creation instead, refer to wiki documentation
      Creates a trigger for a single date only.
      Parameters:
      cronJob - the cronjob to perform
      date - the date to perform cronjob at
    • createTrigger

      @Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, boolean relative)
      Deprecated.
      since ages - use plainTriggerModel creation instead, refer to wiki documentation
      Creates a Trigger for the specified CronJob.
      Parameters:
      cronJob - the CronJob the Trigger should be assigned to
      second - the second at which the Trigger should fire (0-59 or -1 for every second)
      relative - true if time values should be considered relative to each other or false if not
      Returns:
      the Trigger created
    • createTrigger

      @Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, int minute, boolean relative)
      Deprecated.
      since ages - use plainTriggerModel creation instead, refer to wiki documentation
      Creates a Trigger for the specified CronJob.
      Parameters:
      cronJob - the CronJob the Trigger should be assigned to
      second - the second at which the Trigger should fire (0-59 or -1 for every second)
      minute - the minute at which the Trigger should fire (0-59 or -1 for every minute)
      relative - true if time values should be considered relative to each other or false if not
      Returns:
      the Trigger created
    • createTrigger

      @Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, boolean relative)
      Deprecated.
      since ages - use plainTriggerModel creation instead, refer to wiki documentation
      Creates a Trigger for the specified CronJob.
      Parameters:
      cronJob - the CronJob the Trigger should be assigned to
      second - the second at which the Trigger should fire (0-59 or -1 for every second)
      minute - the minute at which the Trigger should fire (0-59 or -1 for every minute)
      hour - hour at which the Trigger should fire (0-23 or -1 for every hour)
      relative - true if time values should be considered relative to each other or false if not
      Returns:
      the Trigger created
    • createTrigger

      @Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, int day, boolean relative)
      Deprecated.
      since ages - use plainTriggerModel creation instead, refer to wiki documentation
      Creates a Trigger for the specified CronJob.
      Parameters:
      cronJob - the CronJob the Trigger should be assigned to
      second - the second at which the Trigger should fire (0-59 or -1 for every second)
      minute - the minute at which the Trigger should fire (0-59 or -1 for every minute)
      hour - hour at which the Trigger should fire (0-23 or -1 for every hour)
      day - the day of month the Trigger should fire (0-31 or -1 for every day)
      relative - true if time values should be considered relative to each other or false if not
      Returns:
      the Trigger created
    • createTrigger

      @Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, boolean relative)
      Deprecated.
      since ages - use plainTriggerModel creation instead, refer to wiki documentation
      Creates a Trigger for the specified CronJob.
      Parameters:
      cronJob - the CronJob the Trigger should be assigned to
      second - the second at which the Trigger should fire (0-59 or -1 for every second)
      minute - the minute at which the Trigger should fire (0-59 or -1 for every minute)
      hour - hour at which the Trigger should fire (0-23 or -1 for every hour)
      day - the day of month the Trigger should fire (0-31 or -1 for every day)
      month - the month at which the Trigger should fire (0-11 or -1 for every month)
      relative - true if time values should be considered relative to each other or false if not
      Returns:
      the Trigger created
    • createTrigger

      @Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, int year)
      Deprecated.
      since ages - use plainTriggerModel creation instead, refer to wiki documentation
      Creates a Trigger for the specified CronJob.
      Parameters:
      cronJob - the CronJob the Trigger should be assigned to
      second - the second at which the Trigger should fire (0-59 or -1 for every second)
      minute - the minute at which the Trigger should fire (0-59 or -1 for every minute)
      hour - hour at which the Trigger should fire (0-23 or -1 for every hour)
      day - the day of month the Trigger should fire (0-31 or -1 for every day)
      month - the month at which the Trigger should fire (0-11 or -1 for every month)
      year - the year when the Trigger should fire (-1 for every year)
      Returns:
      the Trigger created
    • createTrigger

      @Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, List daysOfWeek, boolean relative)
      Deprecated.
      since ages - use plainTriggerModel creation instead, refer to wiki documentation
      Creates a Trigger for the specified CronJob.
      Parameters:
      cronJob - the CronJob the Trigger should be assigned to
      second - the second at which the Trigger should fire (0-59 or -1 for every second)
      minute - the minute at which the Trigger should fire (0-59 or -1 for every minute)
      hour - hour at which the Trigger should fire (0-23 or -1 for every hour)
      daysOfWeek - a List of EnumerationValues ((@link CronJobConstants.TC.DayOfWeek}, Value constants ((@link CronJobConstants.Enumerations.DayOfWeek)})
      relative - true if time values should be considered relative to each other or false if not
      Returns:
      the Trigger created
    • createTrigger

      @Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, int year, List daysOfWeek, boolean relative)
      Deprecated.
      since ages - use plainTriggerModel creation instead, refer to wiki documentation
      Creates a Trigger for the specified CronJob.
      Parameters:
      cronJob - the CronJob the Trigger should be assigned to
      second - the second at which the Trigger should fire (0-59 or -1 for every second)
      minute - the minute at which the Trigger should fire (0-59 or -1 for every minute)
      hour - hour at which the Trigger should fire (0-23 or -1 for every hour)
      day - the day of month the Trigger should fire (0-31 or -1 for every day)
      month - the month at which the Trigger should fire (0-11 or -1 for every month)
      year - the year when the Trigger should fire (-1 for every year)
      daysOfWeek - a List of
      relative - true if time values should be considered relative to each other or false if not
      Returns:
      the Trigger created
    • getJob

      @Deprecated(since="ages", forRemoval=false) public Job getJob(String code)
      Deprecated.
      since ages - use plainJobModel creation instead, refer to wiki documentation
      Returns the Job with the specified code.
      Parameters:
      code - the code of the searched Job
      Returns:
      the Job
    • getRunningOrRestartedCronJobsForNode

      @Deprecated(since="ages", forRemoval=false) public Collection<CronJob> getRunningOrRestartedCronJobsForNode(int nodeID)
      Deprecated.
      Returns a Collection of all running or restarted CronJobs for the specified nodeID.
      Parameters:
      nodeID - the ID of the node, for which all restarted or running Cronjobs should be returned
      Returns:
      a Collection of all running or restarted CronJobs for the specified nodeID
    • abortRunningCronJobsForClusterNode

      @Deprecated(since="ages", forRemoval=false) public boolean abortRunningCronJobsForClusterNode(int nodeID)
      Deprecated.
      since ages - use CronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel) instead to abort a specific cronJob. Note that since 4.3 aborting the cronJob on the distant node is not possible.
      Sets all running or restarted CronJobs for the specified nodeID to status ABORT (using CronJob.setAborted()). This is an internal method that should run only after system restart before the timerthread is started to catch all cronjobs that were hit by a hard shutdown (e.g. CTRL-C on Windows).
      Parameters:
      nodeID - the ID of the node, whose running / restarted CronJobs should be aborted
      Returns:
      true if all CronJobs were aborted successfully, false otherwise
    • abortRunningCronJobsForClusterNodes

      @Deprecated(since="2011", forRemoval=true) public void abortRunningCronJobsForClusterNodes(Set<Integer> nodeIds, int maxCronJobsCount)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 2011 - use CronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel) instead to abort a specific cronJob.
    • abortRunningCronJobsForClusterNodes

      @Deprecated(since="internal") public void abortRunningCronJobsForClusterNodes(Set<Integer> staleNodeIds, Set<Integer> allNodeIds, int maxCronJobsCount)
      Deprecated.
      Sets all running or restarted CronJobs for the specified nodeIDs to status ABORT. This is an internal method that should run only by a unlocking mechanism to catch all cronjobs that were hit by a hard shutdown (e.g. CTRL-C on Windows) on environment with clustering and autodiscovery enabled (random nodeIds).
      Parameters:
      staleNodeIds - the IDs of the nodes, whose running / restarted CronJobs should be aborted
    • findAndFixAllCronJobHistoryEntries

      public void findAndFixAllCronJobHistoryEntries()
    • findAllCronJobHistoryEntries

      protected List<List<PK>> findAllCronJobHistoryEntries()
    • getLocalCronJobsToBeAborted

      @Deprecated(since="internal") protected List<org.apache.commons.lang3.tuple.Pair<PK,Integer>> getLocalCronJobsToBeAborted(Set<PK> cronJobsToCheck)
      Deprecated.
    • getCronJobsToBeAborted

      @Deprecated(since="2011", forRemoval=true) protected List<org.apache.commons.lang3.tuple.Pair<PK,Integer>> getCronJobsToBeAborted(Set<Integer> nodeID, int maxCount)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 2011 - use getCronJobsToBeAborted(Set, Set, int) instead
    • getCronJobsToBeAborted

      protected List<org.apache.commons.lang3.tuple.Pair<PK,Integer>> getCronJobsToBeAborted(Set<Integer> staleNodeIds, Set<Integer> allNodeIds, int maxCount)

      Method gets the running cronjobs that are marked as running on given staleNodeIds or is not in allNodeIds set.

      If allNodeIds is not provided (set is empty or null), the method will return only cronjobs that are marked as running on node in staleNodeIds set.

      If staleNodeIds is not provided (set is empty or null), the method will return only cronjobs that are marked as running on node not in allNodeIds set.

      If both staleNodeIds and allNodeIds are not provided (empty or null), the method will return empty list (the query won't be executed)

      Parameters:
      staleNodeIds -
      allNodeIds -
      maxCount - the max number of entries to be returned. Unlimited if value is equal or less than 0.
    • updateCronJobsStatusToAborted

      protected Set<PK> updateCronJobsStatusToAborted(List<org.apache.commons.lang3.tuple.Pair<PK,Integer>> result)
    • updateCronJobStatusToAborted

      protected boolean updateCronJobStatusToAborted(PK pk, Integer runningOnClusterNodeId, PK cronJobStatusAbortedPK, org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
    • sendAfterCronJobCrashAbortEvent

      protected void sendAfterCronJobCrashAbortEvent(AfterCronJobCrashAbortEvent evt)
    • prepareCrashAbortEvent

      protected AfterCronJobCrashAbortEvent prepareCrashAbortEvent(CronJob cj)
    • getActiveTriggers

      @Deprecated(since="ages", forRemoval=false) public Collection<Trigger> getActiveTriggers()
      Deprecated.
      since ages - as of release 4.3, please use TriggerService.getActiveTriggers()
      Returns a Collection of all Triggers, whose next activation time (Trigger.getNextTime(long) lies before the current system time.
      Returns:
      a Collection of all Triggers, whose next activation time (Trigger.getNextTime(long) is smaller than current system time
    • getActiveTriggers

      @Deprecated(since="ages", forRemoval=false) public Collection<Trigger> getActiveTriggers(Date date)
      Deprecated.
      since ages - as of release 4.3, please use TriggerService.getActiveTriggers(Calendar)
      Returns a Collection of all Triggers, whose next activation time (Trigger.getNextTime(long) lies before the specified date.
      Parameters:
      date - the date
      Returns:
      a Collection of all Triggers, whose next activation time (Trigger.getNextTime(long) lies before the specified date
    • createBatchJob

      @Deprecated(since="ages", forRemoval=false) public BatchJob createBatchJob(Map params)
      Deprecated.
      since agesBatchJob is obsolete since 4.3
      Creates a new BatchJob using the parameters specified in the params Map.
      Overrides:
      createBatchJob in class GeneratedCronJobManager
      Parameters:
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new BatchJob created using the parameters specified in the params Map
    • createBatchJob

      @Deprecated(since="ages", forRemoval=false) public BatchJob createBatchJob(SessionContext ctx, Map params)
      Deprecated.
      since agesBatchJob is obsolete since 4.3
      Creates a new BatchJob using the parameters specified in the params Map.
      Overrides:
      createBatchJob in class GeneratedCronJobManager
      Parameters:
      ctx - the SessionContext, which will be used
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new BatchJob created using the parameters specified in the params Map
    • createChangeDescriptor

      @Deprecated(since="ages", forRemoval=false) public ChangeDescriptor createChangeDescriptor(Map params)
      Deprecated.
      since ages - use plainChangeDescriptorModel creation instead, refer to wiki documentation
      Creates a new ChangeDescriptor using the parameters specified in the params Map.
      Overrides:
      createChangeDescriptor in class GeneratedCronJobManager
      Parameters:
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new ChangeDescriptor created using the parameters specified in the params Map
    • createChangeDescriptor

      @Deprecated(since="ages", forRemoval=false) public ChangeDescriptor createChangeDescriptor(SessionContext ctx, Map params)
      Deprecated.
      since ages - use plainChangeDescriptorModel creation instead, refer to wiki documentation
      Creates a new ChangeDescriptor using the parameters specified in the params Map.
      Overrides:
      createChangeDescriptor in class GeneratedCronJobManager
      Parameters:
      ctx - the SessionContext, which will be used
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new ChangeDescriptor created using the parameters specified in the params Map
    • createCronJob

      @Deprecated(since="ages", forRemoval=false) public CronJob createCronJob(Map params)
      Deprecated.
      since ages - use plainCronJobModel creation instead, refer to wiki documentation
      Creates a new CronJob using the parameters specified in the params Map.
      Overrides:
      createCronJob in class GeneratedCronJobManager
      Parameters:
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new CronJob created using the parameters specified in the params Map
    • createCronJob

      @Deprecated(since="ages", forRemoval=false) public CronJob createCronJob(SessionContext ctx, Map params)
      Deprecated.
      since ages - use plainCronJobModel creation instead, refer to wiki documentation
      Creates a new CronJob using the parameters specified in the params Map.
      Overrides:
      createCronJob in class GeneratedCronJobManager
      Parameters:
      ctx - the SessionContext, which will be used
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new CronJob created using the parameters specified in the params Map
    • createCSVExportStep

      @Deprecated(since="4.3", forRemoval=false) public CSVExportStep createCSVExportStep(Map params)
      Deprecated.
      since 4.3 Step is obsolete
      Creates a new CSVExportStep using the parameters specified in the params Map.
      Overrides:
      createCSVExportStep in class GeneratedCronJobManager
      Parameters:
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new CSVExportStep created using the parameters specified in the params Map
    • createCSVExportStep

      @Deprecated(since="4.3", forRemoval=false) public CSVExportStep createCSVExportStep(SessionContext ctx, Map params)
      Deprecated.
      since 4.3 Step is obsolete
      Creates a new CSVExportStep using the parameters specified in the params Map.
      Overrides:
      createCSVExportStep in class GeneratedCronJobManager
      Parameters:
      ctx - the SessionContext, which will be used
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new CSVExportStep created using the parameters specified in the params Map
    • createFlexibleSearchCronJob

      @Deprecated(since="ages", forRemoval=false) public FlexibleSearchCronJob createFlexibleSearchCronJob(Map params)
      Deprecated.
      since agesFlexibleSearchCronJob is obsolete since 4.3
      Creates a new FlexibleSearchCronJob using the parameters specified in the params Map.
      Overrides:
      createFlexibleSearchCronJob in class GeneratedCronJobManager
      Parameters:
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new FlexibleSearchCronJob created using the parameters specified in the params Map
    • createFlexibleSearchCronJob

      @Deprecated(since="ages", forRemoval=false) public FlexibleSearchCronJob createFlexibleSearchCronJob(SessionContext ctx, Map params)
      Deprecated.
      since agesFlexibleSearchCronJob is obsolete since 4.3
      Creates a new FlexibleSearchCronJob using the parameters specified in the params Map.
      Overrides:
      createFlexibleSearchCronJob in class GeneratedCronJobManager
      Parameters:
      ctx - the SessionContext, which will be used
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new FlexibleSearchCronJob created using the parameters specified in the params Map
    • createGetURLStep

      @Deprecated(since="4.3", forRemoval=false) public GetURLStep createGetURLStep(Map params)
      Deprecated.
      since 4.3 Step is obsolete
      Creates a new GetURLStep using the parameters specified in the params Map.
      Overrides:
      createGetURLStep in class GeneratedCronJobManager
      Parameters:
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new GetURLStep created using the parameters specified in the params Map
    • createGetURLStep

      @Deprecated(since="4.3", forRemoval=false) public GetURLStep createGetURLStep(SessionContext ctx, Map params)
      Deprecated.
      since 4.3 Step is obsolete
      Creates a new GetURLStep using the parameters specified in the params Map.
      Overrides:
      createGetURLStep in class GeneratedCronJobManager
      Parameters:
      ctx - the SessionContext, which will be used
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new GetURLStep created using the parameters specified in the params Map
    • createJobLog

      @Deprecated(since="ages", forRemoval=false) public JobLog createJobLog(Map params)
      Deprecated.
      since ages - there should be used aJobLogModel directly instead
      Creates a new JobLog using the parameters specified in the params Map.
      Overrides:
      createJobLog in class GeneratedCronJobManager
      Parameters:
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new JobLog created using the parameters specified in the params Map
    • createJobLog

      @Deprecated(since="ages", forRemoval=false) public JobLog createJobLog(SessionContext ctx, Map params)
      Deprecated.
      since ages - there should be used aJobLogModel directly instead
      Creates a new JobLog using the parameters specified in the params Map.
      Overrides:
      createJobLog in class GeneratedCronJobManager
      Parameters:
      ctx - the SessionContext, which will be used
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new JobLog created using the parameters specified in the params Map
    • createJobMedia

      @Deprecated(since="ages", forRemoval=false) public JobMedia createJobMedia(Map params)
      Deprecated.
      since ages - there should be used aJobMediaModel directly instead
      Creates a new JobMedia using the parameters specified in the params Map.
      Overrides:
      createJobMedia in class GeneratedCronJobManager
      Parameters:
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new JobMedia created using the parameters specified in the params Map
    • createJobMedia

      @Deprecated(since="ages", forRemoval=false) public JobMedia createJobMedia(SessionContext ctx, Map params)
      Deprecated.
      since ages - there should be used aJobMediaModel directly instead
      Creates a new JobMedia using the parameters specified in the params Map.
      Overrides:
      createJobMedia in class GeneratedCronJobManager
      Parameters:
      ctx - the SessionContext, which will be used
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new JobMedia created using the parameters specified in the params Map
    • createMediaProcessCronJob

      @Deprecated(since="ages", forRemoval=false) public MediaProcessCronJob createMediaProcessCronJob(Map params)
      Deprecated.
      since ages - there should be used aMediaProcessCronJobModel directly instead
      Creates a new MediaProcessCronJob using the parameters specified in the params Map.
      Overrides:
      createMediaProcessCronJob in class GeneratedCronJobManager
      Parameters:
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new MediaProcessCronJob created using the parameters specified in the params Map
    • createMediaProcessCronJob

      @Deprecated(since="ages", forRemoval=false) public MediaProcessCronJob createMediaProcessCronJob(SessionContext ctx, Map params)
      Deprecated.
      since ages - there should be used aMediaProcessCronJobModel directly instead
      Creates a new MediaProcessCronJob using the parameters specified in the params Map.
      Overrides:
      createMediaProcessCronJob in class GeneratedCronJobManager
      Parameters:
      ctx - the SessionContext, which will be used
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new MediaProcessCronJob created using the parameters specified in the params Map
    • createTrigger

      @Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(Map params)
      Deprecated.
      since ages - use plainTriggerModel creation instead, refer to wiki documentation
      Creates a new Trigger using the parameters specified in the params Map.
      Overrides:
      createTrigger in class GeneratedCronJobManager
      Parameters:
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new Trigger created using the parameters specified in the params Map
    • createTrigger

      @Deprecated(since="ages", forRemoval=false) public Trigger createTrigger(SessionContext ctx, Map params)
      Deprecated.
      since ages - use plainTriggerModel creation instead, refer to wiki documentation
      Creates a new Trigger using the parameters specified in the params Map. Since 5.5.1 TriggerTask is created additionally.
      Overrides:
      createTrigger in class GeneratedCronJobManager
      Parameters:
      ctx - the SessionContext, which will be used
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new Trigger created using the parameters specified in the params Map
    • createTypeSystemExportJob

      @Deprecated(since="ages", forRemoval=false) public TypeSystemExportJob createTypeSystemExportJob(Map params)
      Deprecated.
      since agesTypeSystemExportJob is obsolete since 4.3
      Creates a new TypeSystemExportJob using the parameters specified in the params Map.
      Overrides:
      createTypeSystemExportJob in class GeneratedCronJobManager
      Parameters:
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new TypeSystemExportJob created using the parameters specified in the params Map
    • createTypeSystemExportJob

      @Deprecated(since="ages", forRemoval=false) public TypeSystemExportJob createTypeSystemExportJob(SessionContext ctx, Map params)
      Deprecated.
      since agesTypeSystemExportJob is obsolete since 4.3
      Creates a new TypeSystemExportJob using the parameters specified in the params Map.
      Overrides:
      createTypeSystemExportJob in class GeneratedCronJobManager
      Parameters:
      ctx - the SessionContext, which will be used
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new TypeSystemExportJob created using the parameters specified in the params Map
    • createURLCronJob

      @Deprecated(since="ages", forRemoval=false) public URLCronJob createURLCronJob(Map params)
      Deprecated.
      since agesURLCronJob is obsolete since 4.3
      Creates a new URLCronJob using the parameters specified in the params Map.
      Overrides:
      createURLCronJob in class GeneratedCronJobManager
      Parameters:
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new URLCronJob created using the parameters specified in the params Map
    • createURLCronJob

      @Deprecated(since="ages", forRemoval=false) public URLCronJob createURLCronJob(SessionContext ctx, Map params)
      Deprecated.
      since agesURLCronJob is obsolete since 4.3
      Creates a new URLCronJob using the parameters specified in the params Map.
      Overrides:
      createURLCronJob in class GeneratedCronJobManager
      Parameters:
      ctx - the SessionContext, which will be used
      params - Map of parameters. (Mapping 'attribute qualifier' -> 'attribute value')
      Returns:
      a new URLCronJob created using the parameters specified in the params Map
    • getNextConjobNumber

      @Deprecated(since="ages", forRemoval=false) public String getNextConjobNumber()
      Deprecated.
      since ages - please use getNextCronjobNumber() instead!
    • getNextCronjobNumber

      public String getNextCronjobNumber()
    • isCreatorDisabled

      public boolean isCreatorDisabled()
      Part of DataCreator interface. Returns false
      Overrides:
      isCreatorDisabled in class Extension
      Returns:
      false
    • createEssentialData

      public void createEssentialData(Map params, JspContext jspc) throws Exception
      Overrides:
      createEssentialData in class Extension
      Throws:
      Exception
    • getDefaultCronJobFinishNotificationTemplate

      @Deprecated(since="ages", forRemoval=false) public RendererTemplate getDefaultCronJobFinishNotificationTemplate()
      Deprecated.
      Gets the default notification template for a cronjob. It is set at creation time of a cronjob if no template is provided.
      Returns:
      default notification template
      Since:
      3.1-u7
    • getCronJobMediaFolder

      @Deprecated(since="ages", forRemoval=false) public MediaFolder getCronJobMediaFolder()
      Deprecated.
      since ages - use plainMediaFolderModel creation instead, refer to wiki documentation
      Gets the HMC specific MediaFolder used for storing hmc system medias.
      Returns:
      folder for hmc specific medias
      Since:
      3.1-u4
    • findTaskForTrigger

      protected TriggerTask findTaskForTrigger(Trigger trigger)
      Searches for Task for the given Trigger.
    • startTimerTask

      @Deprecated(since="ages", forRemoval=false) public static void startTimerTask()
      Deprecated.
      since ages - - Since 5.5.1 explicit CronJob management should not be done, because CronJobs are handled by TaskEngine
    • stopTimerTask

      @Deprecated(since="ages", forRemoval=false) public static void stopTimerTask()
      Deprecated.
      since ages - - Since 5.5.1 explicit CronJob management should not be done, because CronJobs are handled by TaskEngine
    • notifyInitializationStart

      public void notifyInitializationStart(Map<String,String> params, JspContext ctx) throws Exception
      Overrides:
      notifyInitializationStart in class Extension
      Throws:
      Exception
    • notifyInitializationEnd

      public void notifyInitializationEnd(Map params, JspContext ctx) throws Exception
      Overrides:
      notifyInitializationEnd in class Extension
      Throws:
      Exception
    • getOrCreateMoveMediaJob

      @Deprecated(since="ages", forRemoval=false) public MoveMediaJob getOrCreateMoveMediaJob()
      Deprecated.
      since ages - useCronJobService.getJob(String) instead with spring bean of MoveMediaJobPerformable as parameter value.
      Gets the central import job instance or creates it if not existent already.
      Returns:
      import job instance
    • afterItemCreation

      public void afterItemCreation(SessionContext ctx, ComposedType type, Item createdItem, Item.ItemAttributeMap attributes) throws JaloBusinessException
      Overwritten to trigger re-poll whenever a new task item has been created. Creates also Tasks for Triggers if necessary.
      Specified by:
      afterItemCreation in interface ItemLifecycleListener
      Overrides:
      afterItemCreation in class Manager
      Parameters:
      ctx - the currency session context
      type - the type of the item which will be created
      createdItem - the created item
      Throws:
      JaloBusinessException
      See Also:
    • startTaskEngine

      protected void startTaskEngine()
      Starts the actual task engine. Internally a polling thread is polling scheduled tasks from database and performs them asynchronously.
    • stopTaskEngine

      protected void stopTaskEngine()
      Stops the task engine. From now on scheduled tasks are not longer performed at this platform instance. Please note that other nodes may still be running and perform tasks.
    • getTaskEngine

      protected TaskEngine getTaskEngine()
    • createStrandedCronJobsRegistry

      protected StrandedItemsRegistry createStrandedCronJobsRegistry()
    • getStrandedCronJobsRegistry

      public StrandedItemsRegistry getStrandedCronJobsRegistry()