public class Progression extends Object implements Serializable
The progress of a task is encapsulated as a Progression
value
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.
Constructor and 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
|
Modifier and Type | Method and Description |
---|---|
String |
getMessage() |
int |
getProgress() |
String |
getProgressMessage() |
boolean |
isDone() |
boolean |
isShowProgressPercent()
If false, will not show the number and only the message
|
void |
setDone(boolean done) |
void |
setMessage(String message) |
void |
setProgress(int progress) |
void |
setShowProgressPercent(boolean showProgressPercent)
If false, will not show the number and only the message
|
public Progression(int progress)
progress
- The progress in percent from 0 to 100, where 100 means donepublic Progression(int progress, String message)
progress
- The progress in percent from 0 to 100, where 100 means donemessage
- The message we'd like to show to end userspublic String getMessage()
public void setMessage(String message)
public boolean isDone()
public void setProgress(int progress)
public int getProgress()
public String getProgressMessage()
public boolean isShowProgressPercent()
public void setShowProgressPercent(boolean showProgressPercent)
public void setDone(boolean done)
Copyright © 2018. All rights reserved.