Package com.atlassian.jira.task
Class StepTaskProgressSink
java.lang.Object
com.atlassian.jira.task.StepTaskProgressSink
- All Implemented Interfaces:
TaskProgressSink
Sink that divides a range a progress range into a number of steps. For instance, this can be used
to divide a percentage range up to progress can be reported.
This can be used to track the progress of a task that is made up of a number of individual steps. For example, migrating issue workflow requires that each issue in a project be updated with the new workflow. This class can be used to output a percentage based on the number of issues currently processed using:
TaskProgressSink stepSink = new StepTaskProgressSink(0, 100, numberOfIssues, rootSink).
for (each issue)
{
stepSink.makeProgress(currentIssue, "Migrating Issue Workflow", "Processing issue.....");
}
- Since:
- v3.13
-
Field Summary
Fields inherited from interface com.atlassian.jira.task.TaskProgressSink
NULL_SINK -
Constructor Summary
ConstructorsConstructorDescriptionStepTaskProgressSink(long startProgress, long endProgress, long actions, TaskProgressSink sink) Create the Sink with the passed parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidmakeProgress(long taskProgress, String currentSubTask, String message) This method can be called to indicate that progress is being made by a task.
-
Constructor Details
-
StepTaskProgressSink
public StepTaskProgressSink(long startProgress, long endProgress, long actions, TaskProgressSink sink) Create the Sink with the passed parameters.- Parameters:
startProgress- the start of the range.endProgress- the end of the range.actions- the number of actions to divide the range into.sink- the sink actually used to publish the results.
-
-
Method Details
-
makeProgress
This method can be called to indicate that progress is being made by a task. In this case an progress is made by completeing a particular action.- Specified by:
makeProgressin interfaceTaskProgressSink- Parameters:
taskProgress- the current step.currentSubTask- the name of the current sub task or null if there isnt onemessage- an optional message about the progress or null
-