Class ProgressStep
java.lang.Object
com.riadalabs.jira.plugins.insight.services.progress.model.ProgressStep
- All Implemented Interfaces:
Serializable
Indicate a sequential step in an overall progress. Two steps can not be executed in parallel that is the distinction
by a step less process or a process with steps
- Since:
- 5.0
- Author:
- Ola Melin
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionProgressStep
(Progress.Status status, Progress.Result result, AtomicInteger totalWorkUnits, AtomicInteger currentWorkUnits, String currentWorkDescription, com.riadalabs.jira.plugins.insight.services.progress.result.ProgressResult resultData, String resultMessage, Date startDate, Date finishedDate, String actor, String stepDescription, boolean isPlaceholder) ProgressStep
(String description, int totalWorkUnits, String actor) ProgressStep
(String description, String currentWorkDescription, int totalWorkUnits, String actor) -
Method Summary
Modifier and TypeMethodDescriptionCalculates the estimated finish Date based on: startDate, progressInPercent, updatedDate.static ProgressStep
createPlaceholder
(String actor) int
decrementTotalWorkUnits
(int ignoredWorkUnits) getActor()
int
int
Returns the progress in % (based on current work / total work)int
void
int
incrementCurrentWorkUnits
(int incrementCurrentWorkUnits) boolean
void
setCurrentWorkDescription
(String currentWorkDescription) int
setCurrentWorkUnits
(int currentWorkUnits) void
setPlaceholder
(boolean placeholder) int
setTotalWorkUnits
(int totalWorkUnits)
-
Constructor Details
-
ProgressStep
-
ProgressStep
-
ProgressStep
public ProgressStep(Progress.Status status, Progress.Result result, AtomicInteger totalWorkUnits, AtomicInteger currentWorkUnits, String currentWorkDescription, com.riadalabs.jira.plugins.insight.services.progress.result.ProgressResult resultData, String resultMessage, Date startDate, Date finishedDate, String actor, String stepDescription, boolean isPlaceholder)
-
-
Method Details
-
createPlaceholder
-
setCurrentWorkUnits
public int setCurrentWorkUnits(int currentWorkUnits) -
incrementCurrentWorkUnits
public int incrementCurrentWorkUnits(int incrementCurrentWorkUnits) -
incrementCurrentWorkUnits
public void incrementCurrentWorkUnits() -
decrementTotalWorkUnits
public int decrementTotalWorkUnits(int ignoredWorkUnits) -
getStepDescription
-
isPlaceholder
public boolean isPlaceholder() -
getProgressInPercent
public int getProgressInPercent()Returns the progress in % (based on current work / total work) -
setTotalWorkUnits
public int setTotalWorkUnits(int totalWorkUnits) -
getTotalWorkUnits
public int getTotalWorkUnits() -
getCurrentWorkUnits
public int getCurrentWorkUnits() -
setCurrentWorkDescription
-
getCurrentWorkDescription
-
getStatus
-
getResult
-
getStartDate
-
getFinishedDate
-
getActor
-
setPlaceholder
public void setPlaceholder(boolean placeholder) -
calculateEstimatedFinishDate
Calculates the estimated finish Date based on: startDate, progressInPercent, updatedDate. The usage of this calculation is subject to a few assumptions and must be used with care. 1) The status must be: IN_PROGRESS 2) Will not calculate a value unless we have a certain amount of progress. 3) 1 < totalWorkUnits 4) must have a start date. 5) Must have progress.- Returns:
- If certain conditions are met, a calculated: estimated finish date is returned, null otherwise.
-