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 TypeMethodDescriptiongetDescription
(Locale locale) returns the localized description of the template to display to the usergetKey()
unique key of the templatereturns the localized label, based on the given locale.returns the localized name of the template to display to the userreturns the definition of the task to use for creation of a new task.boolean
whether this template is available and should be displayedboolean
needsLocalization
(String key) 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
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
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
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 localizelocale
- locale to localize with- Returns:
- localized text
- Since:
- taskplanner 5.0
-
needsLocalization
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
-