Class TaskProgress
- java.lang.Object
-
- org.ametys.workspaces.repository.maintenance.TaskProgress
-
public class TaskProgress extends Object
TaskProgress
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TaskProgress.State
Progress state
-
Constructor Summary
Constructors Constructor Description TaskProgress(float total)
CtorTaskProgress(float total, float start)
Overriden Ctor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Exception
getException()
getExceptionMap<String,Object>
getProgressInfo()
Returns information this progress object.float
getProgressPercentage()
getProgressPercentageTaskProgress.State
getState()
getStateboolean
isFinished()
isFinishedboolean
isInErrorState()
isInErrorStateboolean
isNotStarted()
isNotStartedboolean
isRunning()
isRunningvoid
progress()
Unit progressvoid
progress(float quantity)
Quantitative progressvoid
progressRelativePercentage(int percentage)
Progress by a percentage relative to the range [current progress; total]void
progressTotalPercentage(int percentage)
Progress by a given percentagevoid
setFinished()
setFinishedvoid
setInErrorState()
setInErrorStatevoid
setInErrorState(Exception e)
setInErrorStatevoid
setRunning()
setRunningString
toString()
-
-
-
Constructor Detail
-
TaskProgress
public TaskProgress(float total)
Ctor- Parameters:
total
- The total progress
-
TaskProgress
public TaskProgress(float total, float start)
Overriden Ctor- Parameters:
total
- The total progressstart
- The progress start
-
-
Method Detail
-
progress
public void progress()
Unit progress
-
progress
public void progress(float quantity)
Quantitative progress- Parameters:
quantity
- The quantity to progress
-
progressRelativePercentage
public void progressRelativePercentage(int percentage)
Progress by a percentage relative to the range [current progress; total]- Parameters:
percentage
- must be in the [0; 100] range
-
progressTotalPercentage
public void progressTotalPercentage(int percentage)
Progress by a given percentage- Parameters:
percentage
- must be in the [0; 100] range
-
getProgressPercentage
public float getProgressPercentage()
getProgressPercentage- Returns:
- int
-
setRunning
public void setRunning()
setRunning
-
setFinished
public void setFinished()
setFinished
-
setInErrorState
public void setInErrorState()
setInErrorState
-
setInErrorState
public void setInErrorState(Exception e)
setInErrorState- Parameters:
e
- The exception responsible for the error state
-
isNotStarted
public boolean isNotStarted()
isNotStarted- Returns:
- boolean
-
isRunning
public boolean isRunning()
isRunning- Returns:
- boolean
-
isFinished
public boolean isFinished()
isFinished- Returns:
- boolean
-
isInErrorState
public boolean isInErrorState()
isInErrorState- Returns:
- boolean
-
getException
public Exception getException()
getException- Returns:
- Exception
-
getState
public TaskProgress.State getState()
getState- Returns:
- State
-
getProgressInfo
public Map<String,Object> getProgressInfo()
Returns information this progress object.- Returns:
- a map containing information on the progress status
-
-