Class ImportJobStatus

java.lang.Object
org.xwiki.job.AbstractJobStatus<R>
org.xwiki.job.DefaultJobStatus<ImportJobRequest>
org.xwiki.contrib.moccacalendar.importJob.ImportJobStatus
All Implemented Interfaces:
org.xwiki.job.event.status.CancelableJobStatus, org.xwiki.job.event.status.JobStatus

@Unstable public class ImportJobStatus extends org.xwiki.job.DefaultJobStatus<ImportJobRequest>
The status of the import job.
Since:
2.14
Version:
$Id$
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.xwiki.job.event.status.JobStatus

    org.xwiki.job.event.status.JobStatus.State
  • Constructor Summary

    Constructors
    Constructor
    Description
    ImportJobStatus(String jobType, ImportJobRequest request, org.xwiki.observation.ObservationManager observationManager, org.xwiki.logging.LoggerManager loggerManager)
    Create a new import job status.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Check if an event with a given id has already been processed.
    void
    Update the events UID that have already been used.

    Methods inherited from class org.xwiki.job.AbstractJobStatus

    answered, ask, ask, cancel, getEndDate, getError, getJobType, getLog, getLog, getLoggerTail, getLogTail, getParentJobStatus, getProgress, getQuestion, getQuestionTimeLeft, getRequest, getStartDate, getState, ignoreLogs, isCancelable, isCanceled, isIsolated, isSerialized, isSubJob, setCancelable, setEndDate, setError, setIsolated, setLoggerTail, setParentJobStatus, setStartDate, setState, startListening, stopListening

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ImportJobStatus

      public ImportJobStatus(String jobType, ImportJobRequest request, org.xwiki.observation.ObservationManager observationManager, org.xwiki.logging.LoggerManager loggerManager)
      Create a new import job status.
      Parameters:
      jobType - the job type.
      request - the request provided when the job was started.
      observationManager - the observation manager.
      loggerManager - the logger manager.
  • Method Details

    • storeUID

      public void storeUID(String uid)
      Update the events UID that have already been used.
      Parameters:
      uid - the id of the event.
    • isDuplicate

      public boolean isDuplicate(String uid)
      Check if an event with a given id has already been processed.
      Parameters:
      uid - the id of the event.
      Returns:
      true if an event with the same id has already been processed, or false otherwise.