Class ScheduledJob
- java.lang.Object
- 
- com.broadleafcommerce.scheduledjob.domain.ScheduledJob
 
- 
- All Implemented Interfaces:
- com.broadleafcommerce.data.tracking.core.ContextStateAware,- Serializable
 
 public class ScheduledJob extends Object implements com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable Represents a scheduled job for the system to execute. Can be a single use or repeatable job.- Author:
- Chad Harchar (charchar)
- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description ScheduledJob()ScheduledJob(boolean enabled, String id, String name, String type, String timingType, boolean executed, Instant previousLastExecuted, Instant lastExecuted, Instant updated, Instant targetDate, String cron, List<ScheduledJobDetail> details, boolean manageInAdmin, String author, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)ScheduledJob(String id)Convenience constructor mostly intended for testing.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)StringgetAuthor()The admin user who created this jobcom.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStategetContextState()A subset ofTrackinginformation to expose the context state for this object.StringgetCron()A cron expression used to drive the schedule for the job execution.List<ScheduledJobDetail>getDetails()Collection of detailed information for the jobStringgetId()The context ID of the scheduled job.InstantgetLastExecuted()The date on which the job last executed.StringgetName()Display name for this scheduled job.InstantgetPreviousLastExecuted()The previous date on which the job last executed.InstantgetTargetDate()The date on which a single use job should execute.StringgetTimingType()The timing type of this scheduled job.StringgetType()The type of this scheduled job, used to help identify and organize jobs that share a common origin.InstantgetUpdated()The date on which the job was last updated by a user.inthashCode()booleanisEnabled()Whether this scheduled job is enabled, thus allowing it to run.booleanisExecuted()Whether this scheduled job has been executed.booleanisManageInAdmin()Whether or not the job can be managed through the Admin interface.voidsetAuthor(String author)The admin user who created this jobvoidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)A subset ofTrackinginformation to expose the context state for this object.voidsetCron(String cron)A cron expression used to drive the schedule for the job execution.voidsetDetails(List<ScheduledJobDetail> details)Collection of detailed information for the jobvoidsetEnabled(boolean enabled)Whether this scheduled job is enabled, thus allowing it to run.voidsetExecuted(boolean executed)Whether this scheduled job has been executed.voidsetId(String id)The context ID of the scheduled job.voidsetLastExecuted(Instant lastExecuted)The date on which the job last executed.voidsetManageInAdmin(boolean manageInAdmin)Whether or not the job can be managed through the Admin interface.voidsetName(String name)Display name for this scheduled job.voidsetPreviousLastExecuted(Instant previousLastExecuted)The previous date on which the job last executed.voidsetTargetDate(Instant targetDate)The date on which a single use job should execute.voidsetTimingType(String timingType)The timing type of this scheduled job.voidsetType(String type)The type of this scheduled job, used to help identify and organize jobs that share a common origin.voidsetUpdated(Instant updated)The date on which the job was last updated by a user.StringtoString()
 
- 
- 
- 
Constructor Detail- 
ScheduledJobpublic ScheduledJob(String id) Convenience constructor mostly intended for testing.- Parameters:
- id-
 
 - 
ScheduledJobpublic ScheduledJob(boolean enabled, String id, String name, String type, String timingType, boolean executed, Instant previousLastExecuted, Instant lastExecuted, Instant updated, Instant targetDate, String cron, List<ScheduledJobDetail> details, boolean manageInAdmin, String author, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
 - 
ScheduledJobpublic ScheduledJob() 
 
- 
 - 
Method Detail- 
isEnabledpublic boolean isEnabled() Whether this scheduled job is enabled, thus allowing it to run.- Returns:
- Whether this scheduled job is enabled, thus allowing it to run.
 
 - 
getIdpublic String getId() The context ID of the scheduled job.- Returns:
- the context ID of the scheduled job.
 
 - 
getNamepublic String getName() Display name for this scheduled job.- Returns:
- the name of this scheduled job
 
 - 
getTypepublic String getType() The type of this scheduled job, used to help identify and organize jobs that share a common origin.- Returns:
- The type of this scheduled job, used to help identify and organize targets that share a common origin.
 
 - 
getTimingTypepublic String getTimingType() The timing type of this scheduled job. Can be either based on a target date or recurring based on a cron expression.- Returns:
- The timing type of this scheduled job. Can be either single date or recurring based on a cron expression.
 
 - 
isExecutedpublic boolean isExecuted() Whether this scheduled job has been executed.- Returns:
- Whether or not the job has been executed
 
 - 
getPreviousLastExecutedpublic Instant getPreviousLastExecuted() The previous date on which the job last executed. This is useful for jobs that need to communicate the previous date they executed on to external listeners sincelastExecutedwill already have been updated to the current execution date (i.e., now) by the time they receive the message.Some jobs will use the date the job last executed in order to limit queries to entities that have been modified since then, such as checking which Product Tags have gone expired since the last time they were checked. - Returns:
- The previous date on which the job last executed.
 
 - 
getLastExecutedpublic Instant getLastExecuted() The date on which the job last executed.- Returns:
- The date on which the job last executed.
 
 - 
getUpdatedpublic Instant getUpdated() The date on which the job was last updated by a user.- Returns:
- The date on which the job was last updated by a user.
 
 - 
getTargetDatepublic Instant getTargetDate() The date on which a single use job should execute.- Returns:
- The date on which a single use job should execute
 
 - 
getCronpublic String getCron() A cron expression used to drive the schedule for the job execution.- Returns:
- A cron expression used to drive the schedule for the job execution
 
 - 
getDetailspublic List<ScheduledJobDetail> getDetails() Collection of detailed information for the job- Returns:
- Collection of detailed information for the job
 
 - 
isManageInAdminpublic boolean isManageInAdmin() Whether or not the job can be managed through the Admin interface.- Returns:
- Whether or not the job can be managed through the Admin interface
 
 - 
getAuthorpublic String getAuthor() The admin user who created this job
 - 
getContextStatepublic com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState() A subset ofTrackinginformation to expose the context state for this object.- Specified by:
- getContextStatein interface- com.broadleafcommerce.data.tracking.core.ContextStateAware
- Returns:
- a subset of Trackinginformation to expose the context state for this object
 
 - 
setEnabledpublic void setEnabled(boolean enabled) Whether this scheduled job is enabled, thus allowing it to run.- Parameters:
- enabled- Whether this scheduled job is enabled, thus allowing it to run.
 
 - 
setIdpublic void setId(String id) The context ID of the scheduled job.- Parameters:
- id- the context ID of the scheduled job.
 
 - 
setNamepublic void setName(String name) Display name for this scheduled job.- Parameters:
- name- the name of this scheduled job
 
 - 
setTypepublic void setType(String type) The type of this scheduled job, used to help identify and organize jobs that share a common origin.- Parameters:
- type- The type of this scheduled job, used to help identify and organize targets that share a common origin.
 
 - 
setTimingTypepublic void setTimingType(String timingType) The timing type of this scheduled job. Can be either based on a target date or recurring based on a cron expression.- Parameters:
- timingType- The timing type of this scheduled job. Can be either single date or recurring based on a cron expression.
 
 - 
setExecutedpublic void setExecuted(boolean executed) Whether this scheduled job has been executed.- Parameters:
- executed- Whether or not the job has been executed
 
 - 
setPreviousLastExecutedpublic void setPreviousLastExecuted(Instant previousLastExecuted) The previous date on which the job last executed. This is useful for jobs that need to communicate the previous date they executed on to external listeners sincelastExecutedwill already have been updated to the current execution date (i.e., now) by the time they receive the message.Some jobs will use the date the job last executed in order to limit queries to entities that have been modified since then, such as checking which Product Tags have gone expired since the last time they were checked. - Parameters:
- previousLastExecuted- The previous date on which the job last executed.
 
 - 
setLastExecutedpublic void setLastExecuted(Instant lastExecuted) The date on which the job last executed.- Parameters:
- lastExecuted- The date on which the job last executed.
 
 - 
setUpdatedpublic void setUpdated(Instant updated) The date on which the job was last updated by a user.- Parameters:
- updated- The date on which the job was last updated by a user.
 
 - 
setTargetDatepublic void setTargetDate(Instant targetDate) The date on which a single use job should execute.- Parameters:
- targetDate- The date on which a single use job should execute
 
 - 
setCronpublic void setCron(String cron) A cron expression used to drive the schedule for the job execution.- Parameters:
- cron- A cron expression used to drive the schedule for the job execution
 
 - 
setDetailspublic void setDetails(List<ScheduledJobDetail> details) Collection of detailed information for the job- Parameters:
- details- Collection of detailed information for the job
 
 - 
setManageInAdminpublic void setManageInAdmin(boolean manageInAdmin) Whether or not the job can be managed through the Admin interface.- Parameters:
- manageInAdmin- Whether or not the job can be managed through the Admin interface
 
 - 
setAuthorpublic void setAuthor(String author) The admin user who created this job
 - 
setContextStatepublic void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.- Specified by:
- setContextStatein interface- com.broadleafcommerce.data.tracking.core.ContextStateAware
- Parameters:
- contextState- a subset of- Trackinginformation to expose the context state for this object
 
 - 
canEqualprotected boolean canEqual(Object other) 
 
- 
 
-