Package com.xwiki.confluencepro
Class ConfluenceMigrationJobStatus
- java.lang.Object
-
- org.xwiki.job.AbstractJobStatus<R>
-
- org.xwiki.job.DefaultJobStatus<ConfluenceMigrationJobRequest>
-
- com.xwiki.confluencepro.ConfluenceMigrationJobStatus
-
- All Implemented Interfaces:
org.xwiki.job.event.status.CancelableJobStatus,org.xwiki.job.event.status.JobStatus
public class ConfluenceMigrationJobStatus extends org.xwiki.job.DefaultJobStatus<ConfluenceMigrationJobRequest>
Custom Job Status that holds the questions asked by sub-jobs.- Since:
- 1.0
- Version:
- $Id$
-
-
Constructor Summary
Constructors Constructor Description ConfluenceMigrationJobStatus(ConfluenceMigrationJobRequest request, org.xwiki.job.event.status.JobStatus parentJobStatus, org.xwiki.observation.ObservationManager observationManager, org.xwiki.logging.LoggerManager loggerManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAskedQuestion(List<String> jobId, Object question)voidcancel()Map<List<String>,Object>getAskedQuestions()Collection<String>getSpaces()Map<String,String>getSpaceTargets()Get the map of spaces that were renamed during the Migration.voidsetFilterJobStatus(org.xwiki.job.event.status.CancelableJobStatus filterJobStatus)voidsetSpaces(Collection<String> spaces)Set the list of spaces that are migrated.voidsetSpaceTargets(Map<String,String> spaceTargets)Set the map of spaces that were renamed during the Migration.-
Methods inherited from class org.xwiki.job.AbstractJobStatus
answered, ask, ask, 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 Detail
-
ConfluenceMigrationJobStatus
public ConfluenceMigrationJobStatus(ConfluenceMigrationJobRequest request, org.xwiki.job.event.status.JobStatus parentJobStatus, org.xwiki.observation.ObservationManager observationManager, org.xwiki.logging.LoggerManager loggerManager)
- Parameters:
request- the request provided when started the jobparentJobStatus- the status of the parent jobobservationManager- the observation manager componentloggerManager- the logger manager component
-
-
Method Detail
-
addAskedQuestion
public void addAskedQuestion(List<String> jobId, Object question)
- Parameters:
jobId- the identifier of the job.question- the asked question.
-
getAskedQuestions
public Map<List<String>,Object> getAskedQuestions()
- Returns:
- a map of questions each identified by the job identifiers.
-
setFilterJobStatus
public void setFilterJobStatus(org.xwiki.job.event.status.CancelableJobStatus filterJobStatus)
- Parameters:
filterJobStatus- set the filter job status so it can be canceled.- Since:
- 1.14.0
-
setSpaces
public void setSpaces(Collection<String> spaces)
Set the list of spaces that are migrated.- Parameters:
spaces- the Confluence keys of the migrated spaces- Since:
- 1.19.0
-
getSpaces
public Collection<String> getSpaces()
- Returns:
- the list of spaces that are migrated.
- Since:
- 1.19.0
-
setSpaceTargets
public void setSpaceTargets(Map<String,String> spaceTargets)
Set the map of spaces that were renamed during the Migration.- Parameters:
spaceTargets- the map of spaces that were renamed- Since:
- 1.36.0
-
getSpaceTargets
public Map<String,String> getSpaceTargets()
Get the map of spaces that were renamed during the Migration.- Returns:
- a map where the key is the original space name and the value is the current renamed space name
- Since:
- 1.36.0
-
cancel
public void cancel()
- Specified by:
cancelin interfaceorg.xwiki.job.event.status.CancelableJobStatus- Overrides:
cancelin classorg.xwiki.job.AbstractJobStatus<ConfluenceMigrationJobRequest>
-
-