Class 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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isDuplicate​(String uid)
      Check if an event with a given id has already been processed.
      void storeUID​(String uid)
      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, setStartDate, setState, startListening, stopListening
    • Constructor Detail

      • 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 Detail

      • 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.