Package com.xwiki.admintools.jobs
Class PackageUploadJobStatus
java.lang.Object
org.xwiki.job.AbstractJobStatus<R>
org.xwiki.job.DefaultJobStatus<PackageUploadJobRequest>
com.xwiki.admintools.jobs.PackageUploadJobStatus
- All Implemented Interfaces:
org.xwiki.job.event.status.CancelableJobStatus,org.xwiki.job.event.status.JobStatus
@Unstable
public class PackageUploadJobStatus
extends org.xwiki.job.DefaultJobStatus<PackageUploadJobRequest>
The status of a package upload job.
- Since:
- 1.1
- 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
ConstructorsConstructorDescriptionPackageUploadJobStatus(String jobType, PackageUploadJobRequest request, org.xwiki.observation.ObservationManager observationManager, org.xwiki.logging.LoggerManager loggerManager) Create a new upload job status. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a new log to the job results.getJobID()Get the ID for the job.Get the list result list from the job.booleanhasLevel(JobResultLevel level) Check if any job result has a specific level of severity.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
-
Constructor Details
-
PackageUploadJobStatus
public PackageUploadJobStatus(String jobType, PackageUploadJobRequest request, org.xwiki.observation.ObservationManager observationManager, org.xwiki.logging.LoggerManager loggerManager) Create a new upload 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
-
getJobResults
Get the list result list from the job.- Returns:
- list with
JobResultcontaining the results.
-
addLog
Add a new log to the job results.- Parameters:
statusLog- the new log result.
-
hasLevel
Check if any job result has a specific level of severity.- Parameters:
level- represents the searched level of severity.- Returns:
trueif there is any match for the given level, orfalseotherwise.
-
getJobID
Get the ID for the job.- Returns:
- the job ID as a
List.
-