Interface TaskTemplateDefinition


public interface TaskTemplateDefinition
interface defining a "task template" which is a template to be used for creating pre-defined tasks with triggers, jobs, etc. already set up for use at first creation of the task.
Since:
taskplanner 5.0
  • Method Summary

    Modifier and Type
    Method
    Description
    returns the localized description of the template to display to the user
    unique key of the template
    getLabel(String key, Locale locale)
    returns the localized label, based on the given locale.
    getName(Locale locale)
    returns the localized name of the template to display to the user
    returns the definition of the task to use for creation of a new task.
    boolean
    whether this template is available and should be displayed
    boolean
    whether this key needs localization (if not, getLabel will return the given key directly)
  • Method Details

    • getKey

      String getKey()
      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 creation of 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 keys that will be requested 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)
      whether this key needs localization (if not, getLabel will return the given key directly)
      Parameters:
      key - key to check
      Returns:
      whether this key needs localization
      Since:
      taskplanner 5.0
    • isAvailable

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