Class ProgressBean
java.lang.Object
ch.tocco.nice2.tasks.api.progress.ProgressBean
Represents the current progress of a task. Is used to inform the user (visually) about the current progress.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Default label for status running_absolutestatic final String
Default label for status cancelledstatic final String
Default notification when a task is cancelledstatic final String
Default label for status completedstatic final String
Default notification when a task is completedstatic final ProgressBean.NotificationType
Default notification type when a task is completedstatic final String
Default label for status failedstatic final String
Default notification when a task has failedstatic final String
Default label for status running_infinitestatic final String
Default label for status pending -
Constructor Summary
ConstructorDescriptionProgressBean
(String taskId, String taskName, ProgressBean.Type type, String labelKey, @Nullable Map<String, String> vars) -
Method Summary
Modifier and TypeMethodDescriptionGet the textresources key of the progress.Get the id of the task.Get the name of the task.getType()
Get theProgressBean.Type
of the progress.getVars()
Get the variables (parameters for the placeholders in the label).
-
Field Details
-
DEFAULT_PENDING
Default label for status pending- See Also:
-
DEFAULT_INFINITE
Default label for status running_infinite- See Also:
-
DEFAULT_ABSOLUTE
Default label for status running_absolute- See Also:
-
DEFAULT_COMPLETED
Default label for status completed- See Also:
-
DEFAULT_FAILED
Default label for status failed- See Also:
-
DEFAULT_CANCELLED
Default label for status cancelled- See Also:
-
DEFAULT_COMPLETED_NOTIFICATION
Default notification when a task is completed- See Also:
-
DEFAULT_COMPLETED_NOTIFICATION_TYPE
Default notification type when a task is completed -
DEFAULT_FAILED_NOTIFICATION
Default notification when a task has failed- See Also:
-
DEFAULT_CANCELLED_NOTIFICATION
Default notification when a task is cancelled- See Also:
-
-
Constructor Details
-
ProgressBean
-
-
Method Details
-
getTaskId
Get the id of the task.- Returns:
- the id of the task
-
getTaskName
Get the name of the task.- Returns:
- the name of the task
-
getType
Get theProgressBean.Type
of the progress.- Returns:
- the
ProgressBean.Type
-
getLabelKey
Get the textresources key of the progress.- Returns:
- the textressources key
-
getVars
Get the variables (parameters for the placeholders in the label).- Returns:
- the variables
-