Package org.wicketstuff.progressbar
Class Progression
- java.lang.Object
-
- org.wicketstuff.progressbar.Progression
-
public class Progression extends Object
The progress of a task is encapsulated as a
Progressionvalue object. Currently the progress is only stored as an int percentage value (0 to 100) and optionally a message describing the current task.This class has no dependency to Wicket and could be used in the service layer.
- Author:
- Christopher Hlubek (hlubek)
-
-
Constructor Summary
Constructors Constructor Description Progression(int progress)Create a new Progression value object from a percentage progress value.Progression(int progress, String message)Create a new Progression value object from a percentage progress value and a message describing the current task
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetProgress()StringgetProgressMessage()booleanisDone()
-
-
-
Constructor Detail
-
Progression
public Progression(int progress)
Create a new Progression value object from a percentage progress value.- Parameters:
progress- The progress in percent from 0 to 100, where 100 means done
-
Progression
public Progression(int progress, String message)Create a new Progression value object from a percentage progress value and a message describing the current task- Parameters:
progress- The progress in percent from 0 to 100, where 100 means donemessage- The message we'd like to show to end users
-
-
Method Detail
-
isDone
public boolean isDone()
- Returns:
- true iff the progress is done
-
getProgress
public int getProgress()
-
getProgressMessage
public String getProgressMessage()
-
-