Class TaskProgress

java.lang.Object
org.ametys.workspaces.repository.maintenance.TaskProgress

public class TaskProgress extends Object
TaskProgress
  • Constructor Details

    • TaskProgress

      public TaskProgress(float total)
      Ctor
      Parameters:
      total - The total progress
    • TaskProgress

      public TaskProgress(float total, float start)
      Overriden Ctor
      Parameters:
      total - The total progress
      start - The progress start
  • Method Details

    • 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

      getException
      Returns:
      Exception
    • getState

      getState
      Returns:
      State
    • getProgressInfo

      Returns information this progress object.
      Returns:
      a map containing information on the progress status
    • toString

      public String toString()
      Overrides:
      toString in class Object