Package org.compiere.model
Class MScheduler
- java.lang.Object
-
- org.compiere.model.PO
-
- org.compiere.model.X_AD_Scheduler
-
- org.compiere.model.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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.compiere.model.X_AD_Scheduler
REPORTOUTPUTTYPE_AD_Reference_ID, REPORTOUTPUTTYPE_CSV, REPORTOUTPUTTYPE_HTML, REPORTOUTPUTTYPE_PDF, REPORTOUTPUTTYPE_XLS, REPORTOUTPUTTYPE_XLSX
-
Fields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, LOCAL_TRX_PREFIX, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
-
Fields inherited from interface org.compiere.model.I_AD_Scheduler
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_PrintFormat_ID, COLUMNNAME_AD_Process_ID, COLUMNNAME_AD_Schedule_ID, COLUMNNAME_AD_Scheduler_ID, COLUMNNAME_AD_Scheduler_UU, COLUMNNAME_AD_Table_ID, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_DateLastRun, COLUMNNAME_DateNextRun, COLUMNNAME_Description, COLUMNNAME_IsActive, COLUMNNAME_KeepLogDays, COLUMNNAME_Name, COLUMNNAME_Processing, COLUMNNAME_R_MailText_ID, COLUMNNAME_Record_ID, COLUMNNAME_ReportOutputType, COLUMNNAME_SchedulerState, COLUMNNAME_Supervisor_ID, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, Model, Table_ID, Table_Name
-
-
Constructor Summary
Constructors Constructor Description MScheduler(Properties ctx, int AD_Scheduler_ID, String trxName)
Standard ConstructorMScheduler(Properties ctx, ResultSet rs, String trxName)
Load ConstructorMScheduler(Properties ctx, MScheduler copy)
MScheduler(Properties ctx, MScheduler copy, String trxName)
MScheduler(MScheduler copy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
beforeSave(boolean newRecord)
Before Saveint
deleteLog()
Delete old Request Logstatic MScheduler[]
getActive(Properties ctx)
Get ActiveString
getCronPattern()
Get the cron patternTimestamp
getDateNextRun(boolean requery)
Get Date Next Runint
getFrequency()
Get the frequencyString
getFrequencyType()
Get the frequency typeAdempiereProcessorLog[]
getLogs()
Get LogsMSchedulerPara[]
getParameters(boolean reload)
Get ParametersMProcess
getProcess()
Get ProcessInteger[]
getRecipientAD_User_IDs()
Get Recipient AD_User_IDsInteger[]
getRecipientAD_User_IDs(boolean excludeUploadRecipient)
Get Recipient AD_User_IDsMSchedulerRecipient[]
getRecipients(boolean reload)
Get RecipientsString
getScheduleType()
Get the schedule typeString
getServerID()
Get Server IDMSchedulerRecipient[]
getUploadRecipients()
boolean
isIgnoreProcessingTime()
MScheduler
markImmutable()
mark PO as immutableString
toString()
String Representation-
Methods inherited from class org.compiere.model.X_AD_Scheduler
get_AccessLevel, getAD_PrintFormat, getAD_PrintFormat_ID, getAD_Process, getAD_Process_ID, getAD_Schedule, getAD_Schedule_ID, getAD_Scheduler_ID, getAD_Scheduler_UU, getAD_Table, getAD_Table_ID, getDateLastRun, getDateNextRun, getDescription, getKeepLogDays, getKeyNamePair, getName, getR_MailText, getR_MailText_ID, getRecord_ID, getReportOutputType, getSchedulerState, getSupervisor, getSupervisor_ID, initPO, isProcessing, setAD_PrintFormat_ID, setAD_Process_ID, setAD_Schedule_ID, setAD_Scheduler_ID, setAD_Scheduler_UU, setAD_Table_ID, setDateLastRun, setDateNextRun, setDescription, setKeepLogDays, setName, setProcessing, setR_MailText_ID, setRecord_ID, setReportOutputType, setSchedulerState, setSupervisor_ID
-
Methods inherited from class org.compiere.model.PO
afterDelete, afterSave, beforeDelete, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock, update_Tree, validForeignKeys
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.compiere.model.AdempiereProcessor
getAD_Client_ID, getCtx, getDateLastRun, getDescription, getName, save, saveEx, setDateLastRun, setDateNextRun
-
Methods inherited from interface org.compiere.model.AdempiereProcessor2
getAD_Schedule_ID
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from interface org.compiere.model.I_AD_Scheduler
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
-
Methods inherited from interface org.compiere.model.I_Persistent
save
-
-
-
-
Constructor Detail
-
MScheduler
public MScheduler(Properties ctx, int AD_Scheduler_ID, String trxName)
Standard Constructor- Parameters:
ctx
- contextAD_Scheduler_ID
- idtrxName
- transaction
-
MScheduler
public MScheduler(Properties ctx, ResultSet rs, String trxName)
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
MScheduler
public MScheduler(MScheduler copy)
- Parameters:
copy
-
-
MScheduler
public MScheduler(Properties ctx, MScheduler copy)
- Parameters:
ctx
-copy
-
-
MScheduler
public MScheduler(Properties ctx, MScheduler copy, String trxName)
- Parameters:
ctx
-copy
-trxName
-
-
-
Method Detail
-
getActive
public static MScheduler[] getActive(Properties ctx)
Get Active- Parameters:
ctx
- context- Returns:
- active processors
-
getServerID
public String getServerID()
Get Server ID- Specified by:
getServerID
in interfaceAdempiereProcessor
- Returns:
- id
-
getDateNextRun
public Timestamp getDateNextRun(boolean requery)
Get Date Next Run- Specified by:
getDateNextRun
in interfaceAdempiereProcessor
- Parameters:
requery
- requery- Returns:
- date next run
-
getLogs
public AdempiereProcessorLog[] getLogs()
Get Logs- Specified by:
getLogs
in interfaceAdempiereProcessor
- Returns:
- logs
-
deleteLog
public int deleteLog()
Delete old Request Log- Returns:
- number of records
-
getProcess
public MProcess getProcess()
Get Process- Returns:
- process
-
getParameters
public MSchedulerPara[] getParameters(boolean reload)
Get Parameters- Parameters:
reload
- reload- Returns:
- parameter
-
getRecipients
public MSchedulerRecipient[] getRecipients(boolean reload)
Get Recipients- Parameters:
reload
- reload- Returns:
- Recipients
-
getRecipientAD_User_IDs
public Integer[] getRecipientAD_User_IDs()
Get Recipient AD_User_IDs- Returns:
- array of user IDs
-
getRecipientAD_User_IDs
public Integer[] getRecipientAD_User_IDs(boolean excludeUploadRecipient)
Get Recipient AD_User_IDs- Parameters:
excludeUploadRecipient
-- Returns:
- array of user IDs
-
beforeSave
protected boolean beforeSave(boolean newRecord)
Before Save- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new- Returns:
- true
-
toString
public String toString()
String Representation- Overrides:
toString
in classX_AD_Scheduler
- Returns:
- info
-
getFrequencyType
public String getFrequencyType()
Description copied from interface:AdempiereProcessor
Get the frequency type- Specified by:
getFrequencyType
in interfaceAdempiereProcessor
- Returns:
- frequency type
-
getFrequency
public int getFrequency()
Description copied from interface:AdempiereProcessor
Get the frequency- Specified by:
getFrequency
in interfaceAdempiereProcessor
- Returns:
- frequency
-
isIgnoreProcessingTime
public boolean isIgnoreProcessingTime()
- Specified by:
isIgnoreProcessingTime
in interfaceAdempiereProcessor2
- 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 the new DateNextRun value.
-
getScheduleType
public String getScheduleType()
Description copied from interface:AdempiereProcessor
Get the schedule type- Specified by:
getScheduleType
in interfaceAdempiereProcessor
- Returns:
- schedule type
-
getCronPattern
public String getCronPattern()
Description copied from interface:AdempiereProcessor
Get the cron pattern- Specified by:
getCronPattern
in interfaceAdempiereProcessor
- Returns:
- cron pattern
-
markImmutable
public MScheduler markImmutable()
Description copied from interface:ImmutablePOSupport
mark PO as immutable- Specified by:
markImmutable
in interfaceImmutablePOSupport
- Returns:
- PO
-
getUploadRecipients
public MSchedulerRecipient[] getUploadRecipients()
- Returns:
- list of upload recipients
-
-