Interface TaskTemplateDefinition


public interface TaskTemplateDefinition
Interface defining a "task template" that is used for creating predefined tasks with triggers, jobs, etc. already set up for use at first creation of the task.
Since:
taskplanner 5.0
  • Method Details

    • getKey

      String getKey()
      Gets the unique key of the template.
      Returns:
      unique key of the template
      Since:
      taskplanner 5.0
    • getName

      String getName(Locale locale)
      Returns the localized name of the template to display to the user.
      Parameters:
      locale - locale for i18n
      Returns:
      the localized name of the template to display to the user
      Since:
      taskplanner 5.0
    • getDescription

      String getDescription(Locale locale)
      Returns the localized description of the template to display to the user.
      Parameters:
      locale - locale for i18n
      Returns:
      the localized description of the template to display to the user
      Since:
      taskplanner 5.0
    • getTaskDefinition

      TaskDefinition getTaskDefinition()
      Returns the definition of the task to use for creating a new task.
      Returns:
      the definition of the task to use for creation of a new task.
      Since:
      taskplanner 5.0
    • getLabel

      String getLabel(String key, Locale locale)
      Returns the localized label based on the given locale. The requested keys are the keys of the properties of the task's triggers, jobs, and result actions. If no localization is needed (see needsLocalization), then this will not localize but return the key itself
      Parameters:
      key - key to localize
      locale - locale to localize with
      Returns:
      localized text
      Since:
      taskplanner 5.0
    • needsLocalization

      boolean needsLocalization(String key)
      Returns whether this key needs localization. If not, getLabel returns the given key directly.
      Parameters:
      key - key to check
      Returns:
      whether this key needs localization
      Since:
      taskplanner 5.0
    • isAvailable

      boolean isAvailable()
      Returns whether this template is available and should be displayed.
      Returns:
      whether this template is available and should be displayed
      Since:
      taskplanner 5.0