Class ScheduledJobCompletedEvent

java.lang.Object
com.broadleafcommerce.common.messaging.domain.ScheduledJobCompletedEvent

public class ScheduledJobCompletedEvent extends Object
A DTO containing information about an event emitted when a ScheduledJob (from ScheduledJobServices) finishes its execution.

This is used to create a ScheduledJobExecutionDetail for recording the history of past executions of a scheduled job.

Author:
karanjariwala
  • Constructor Details

    • ScheduledJobCompletedEvent

      public ScheduledJobCompletedEvent(String jobId, String tenantId, String jobType, String jobExecutionDetailId, Instant endTime, boolean success, String note, String error, Map<String,Object> attributes)
    • ScheduledJobCompletedEvent

      public ScheduledJobCompletedEvent()
  • Method Details

    • getJobId

      public String getJobId()
      The Context ID of the scheduled job for which this completion event is emitted
    • getTenantId

      public String getTenantId()
      The ID of the associated tenant
    • getJobType

      public String getJobType()
      The type of the job for which this completion event is emitted
    • getJobExecutionDetailId

      public String getJobExecutionDetailId()
      The Context ID of the scheduled job execution detail
    • getEndTime

      public Instant getEndTime()
      The time at which the scheduled job finished its execution
    • isSuccess

      public boolean isSuccess()
      A flag indicating whether the scheduled job finished successfully
    • getNote

      public String getNote()
      A note/message to be set on the scheduled job execution detail. In case of a successful execution, it will be set with information about the job execution
    • getError

      public String getError()
      The message to be set on the scheduled job execution detail in case an error occurs. In case of an unsuccessful execution, it will be set with error information about the job execution
    • getAttributes

      public Map<String,Object> getAttributes()
      A map to hold additional information on the event about the execution detail
    • setJobId

      public void setJobId(String jobId)
      The Context ID of the scheduled job for which this completion event is emitted
    • setTenantId

      public void setTenantId(String tenantId)
      The ID of the associated tenant
    • setJobType

      public void setJobType(String jobType)
      The type of the job for which this completion event is emitted
    • setJobExecutionDetailId

      public void setJobExecutionDetailId(String jobExecutionDetailId)
      The Context ID of the scheduled job execution detail
    • setEndTime

      public void setEndTime(Instant endTime)
      The time at which the scheduled job finished its execution
    • setSuccess

      public void setSuccess(boolean success)
      A flag indicating whether the scheduled job finished successfully
    • setNote

      public void setNote(String note)
      A note/message to be set on the scheduled job execution detail. In case of a successful execution, it will be set with information about the job execution
    • setError

      public void setError(String error)
      The message to be set on the scheduled job execution detail in case an error occurs. In case of an unsuccessful execution, it will be set with error information about the job execution
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      A map to hold additional information on the event about the execution detail
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object