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:
-
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, UUID_NEW_RECORD, 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
ConstructorDescriptionMScheduler
(Properties ctx, int AD_Scheduler_ID, String trxName) Standard ConstructorMScheduler
(Properties ctx, String AD_Scheduler_UU, String trxName) UUID based ConstructorMScheduler
(Properties ctx, ResultSet rs, String trxName) Load ConstructorMScheduler
(Properties ctx, MScheduler copy) Copy constructorMScheduler
(Properties ctx, MScheduler copy, String trxName) Copy constructorMScheduler
(MScheduler copy) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
beforeSave
(boolean newRecord) Before Saveint
Delete old scheduler logsstatic MScheduler[]
getActive
(Properties ctx) Get active schedulersGet the cron patterngetDateNextRun
(boolean requery) Get Next Run time stampint
Get the frequencyGet the frequency typegetLogs()
Get scheduler logsgetParameters
(boolean reload) Get Scheduler ParametersGet ProcessInteger[]
Get Recipient AD_User_IDsInteger[]
getRecipientAD_User_IDs
(boolean excludeUploadRecipient) Get Recipient AD_User_IDsgetRecipients
(boolean reload) Get Scheduler Recipients for notificationssGet the schedule typeGet Server IDGet scheduler upload recipientsboolean
mark PO as immutabletoString()
String RepresentationMethods 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, buildInsertSQL, 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_UUID, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, 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, loadByUU, loadComplete, loadDefaults, loadPO, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveCrossTenantSafe, saveCrossTenantSafeEx, saveCrossTenantSafeEx, 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, toInsertSQL, 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 Details
-
MScheduler
UUID based Constructor- Parameters:
ctx
- ContextAD_Scheduler_UU
- UUID keytrxName
- Transaction
-
MScheduler
Standard Constructor- Parameters:
ctx
- contextAD_Scheduler_ID
- idtrxName
- transaction
-
MScheduler
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
MScheduler
Copy constructor- Parameters:
copy
-
-
MScheduler
Copy constructor- Parameters:
ctx
-copy
-
-
MScheduler
Copy constructor- Parameters:
ctx
-copy
-trxName
-
-
-
Method Details
-
getActive
Get active schedulers- Parameters:
ctx
- context- Returns:
- active schedulers
-
getServerID
Get Server ID- Specified by:
getServerID
in interfaceAdempiereProcessor
- Returns:
- server id
-
getDateNextRun
Get Next Run time stamp- Specified by:
getDateNextRun
in interfaceAdempiereProcessor
- Parameters:
requery
- requery- Returns:
- next run time stamp
-
getLogs
Get scheduler logs- Specified by:
getLogs
in interfaceAdempiereProcessor
- Returns:
- scheduler logs
-
deleteLog
public int deleteLog()Delete old scheduler logs- Returns:
- number of records deleted
-
getProcess
Get Process- Returns:
- process
-
getParameters
Get Scheduler Parameters- Parameters:
reload
- true to reload from DB- Returns:
- scheduler parameters
-
getRecipients
Get Scheduler Recipients for notificationss- Parameters:
reload
- true to reload from DB- Returns:
- Scheduler Recipients
-
getRecipientAD_User_IDs
Get Recipient AD_User_IDs- Returns:
- array of recipient user IDs
-
getRecipientAD_User_IDs
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) Before Save- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new- Returns:
- true
-
toString
String Representation- Overrides:
toString
in classX_AD_Scheduler
- Returns:
- info
-
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 calculate the new DateNextRun value.
-
getScheduleType
Description copied from interface:AdempiereProcessor
Get the schedule type- Specified by:
getScheduleType
in interfaceAdempiereProcessor
- Returns:
- schedule type
-
getCronPattern
Description copied from interface:AdempiereProcessor
Get the cron pattern- Specified by:
getCronPattern
in interfaceAdempiereProcessor
- Returns:
- cron pattern
-
markImmutable
Description copied from interface:ImmutablePOSupport
mark PO as immutable- Specified by:
markImmutable
in interfaceImmutablePOSupport
- Returns:
- PO
-
getUploadRecipients
Get scheduler upload recipients- Returns:
- array of upload recipients
-