Class MScheduler

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, AdempiereProcessor, AdempiereProcessor2, I_AD_Scheduler, I_Persistent, Evaluatee, ImmutablePOSupport

public class MScheduler extends X_AD_Scheduler implements AdempiereProcessor, AdempiereProcessor2, ImmutablePOSupport
Scheduler Model
Version:
$Id: MScheduler.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ Contributors: Carlos Ruiz - globalqss - FR [3135351] - Enable Scheduler for buttons
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MScheduler

      public MScheduler(Properties ctx, String AD_Scheduler_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      AD_Scheduler_UU - UUID key
      trxName - Transaction
    • MScheduler

      public MScheduler(Properties ctx, int AD_Scheduler_ID, String trxName)
      Standard Constructor
      Parameters:
      ctx - context
      AD_Scheduler_ID - id
      trxName - transaction
    • MScheduler

      public MScheduler(Properties ctx, ResultSet rs, String trxName)
      Load Constructor
      Parameters:
      ctx - context
      rs - result set
      trxName - transaction
    • MScheduler

      public MScheduler(MScheduler copy)
      Copy constructor
      Parameters:
      copy -
    • MScheduler

      public MScheduler(Properties ctx, MScheduler copy)
      Copy constructor
      Parameters:
      ctx -
      copy -
    • MScheduler

      public MScheduler(Properties ctx, MScheduler copy, String trxName)
      Copy constructor
      Parameters:
      ctx -
      copy -
      trxName -
  • Method Details

    • getActive

      public static MScheduler[] getActive(Properties ctx)
      Get active schedulers
      Parameters:
      ctx - context
      Returns:
      active schedulers
    • getServerID

      public String getServerID()
      Get Server ID
      Specified by:
      getServerID in interface AdempiereProcessor
      Returns:
      server id
    • getDateNextRun

      public Timestamp getDateNextRun(boolean requery)
      Get Next Run time stamp
      Specified by:
      getDateNextRun in interface AdempiereProcessor
      Parameters:
      requery - requery
      Returns:
      next run time stamp
    • getLogs

      public AdempiereProcessorLog[] getLogs()
      Get scheduler logs
      Specified by:
      getLogs in interface AdempiereProcessor
      Returns:
      scheduler logs
    • deleteLog

      public int deleteLog()
      Delete old scheduler logs
      Returns:
      number of records deleted
    • getProcess

      public MProcess getProcess()
      Get Process
      Returns:
      process
    • getParameters

      public MSchedulerPara[] getParameters(boolean reload)
      Get Scheduler Parameters
      Parameters:
      reload - true to reload from DB
      Returns:
      scheduler parameters
    • getRecipients

      public MSchedulerRecipient[] getRecipients(boolean reload)
      Get Scheduler Recipients for notificationss
      Parameters:
      reload - true to reload from DB
      Returns:
      Scheduler Recipients
    • getRecipientAD_User_IDs

      public Integer[] getRecipientAD_User_IDs()
      Get Recipient AD_User_IDs
      Returns:
      array of recipient user IDs
    • getRecipientAD_User_IDs

      public Integer[] getRecipientAD_User_IDs(boolean excludeUploadRecipient)
      Get Recipient AD_User_IDs
      Parameters:
      excludeUploadRecipient - true to exclude recipient with IsUpload=Y
      Returns:
      array of recipient user IDs
    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Description copied from class: PO
      Called before Save for Pre-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - true if it is a new record
      Returns:
      true if record can be saved
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class X_AD_Scheduler
      Returns:
      info
    • getFrequencyType

      public String getFrequencyType()
      Description copied from interface: AdempiereProcessor
      Get the frequency type
      Specified by:
      getFrequencyType in interface AdempiereProcessor
      Returns:
      frequency type
    • getFrequency

      public int getFrequency()
      Description copied from interface: AdempiereProcessor
      Get the frequency
      Specified by:
      getFrequency in interface AdempiereProcessor
      Returns:
      frequency
    • isIgnoreProcessingTime

      public boolean isIgnoreProcessingTime()
      Specified by:
      isIgnoreProcessingTime in interface AdempiereProcessor2
      Returns:
      True if previous DateNextRun should be use as base to calculate the new DateNextRun value. False to follow the legacy behaviour where current server time is use as the base to calculate the new DateNextRun value.
    • getScheduleType

      public String getScheduleType()
      Description copied from interface: AdempiereProcessor
      Get the schedule type
      Specified by:
      getScheduleType in interface AdempiereProcessor
      Returns:
      schedule type
    • getCronPattern

      public String getCronPattern()
      Description copied from interface: AdempiereProcessor
      Get the cron pattern
      Specified by:
      getCronPattern in interface AdempiereProcessor
      Returns:
      cron pattern
    • markImmutable

      public MScheduler markImmutable()
      Description copied from interface: ImmutablePOSupport
      mark PO as immutable
      Specified by:
      markImmutable in interface ImmutablePOSupport
      Returns:
      PO
    • getUploadRecipients

      public MSchedulerRecipient[] getUploadRecipients()
      Get scheduler upload recipients
      Returns:
      array of upload recipients