Class ProgressBean

java.lang.Object
ch.tocco.nice2.tasks.api.progress.ProgressBean

public class ProgressBean extends Object
Represents the current progress of a task. Is used to inform the user (visually) about the current progress.
  • Field Details

    • DEFAULT_PENDING

      public static final String DEFAULT_PENDING
      Default label for status pending
      See Also:
    • DEFAULT_INFINITE

      public static final String DEFAULT_INFINITE
      Default label for status running_infinite
      See Also:
    • DEFAULT_ABSOLUTE

      public static final String DEFAULT_ABSOLUTE
      Default label for status running_absolute
      See Also:
    • DEFAULT_COMPLETED

      public static final String DEFAULT_COMPLETED
      Default label for status completed
      See Also:
    • DEFAULT_FAILED

      public static final String DEFAULT_FAILED
      Default label for status failed
      See Also:
    • DEFAULT_CANCELLED

      public static final String DEFAULT_CANCELLED
      Default label for status cancelled
      See Also:
    • DEFAULT_COMPLETED_NOTIFICATION

      public static final String DEFAULT_COMPLETED_NOTIFICATION
      Default notification when a task is completed
      See Also:
    • DEFAULT_COMPLETED_NOTIFICATION_TYPE

      public static final ProgressBean.NotificationType DEFAULT_COMPLETED_NOTIFICATION_TYPE
      Default notification type when a task is completed
    • DEFAULT_FAILED_NOTIFICATION

      public static final String DEFAULT_FAILED_NOTIFICATION
      Default notification when a task has failed
      See Also:
    • DEFAULT_CANCELLED_NOTIFICATION

      public static final String DEFAULT_CANCELLED_NOTIFICATION
      Default notification when a task is cancelled
      See Also:
  • Constructor Details

  • Method Details

    • getTaskId

      public String getTaskId()
      Get the id of the task.
      Returns:
      the id of the task
    • getTaskName

      public String getTaskName()
      Get the name of the task.
      Returns:
      the name of the task
    • getType

      public ProgressBean.Type getType()
      Get the ProgressBean.Type of the progress.
      Returns:
      the ProgressBean.Type
    • getLabelKey

      public String getLabelKey()
      Get the textresources key of the progress.
      Returns:
      the textressources key
    • getVars

      @Nullable public @Nullable Map<String,String> getVars()
      Get the variables (parameters for the placeholders in the label).
      Returns:
      the variables