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 Summary
Modifier and TypeMethodDescriptiongetDescription(Locale locale) Returns the localized description of the template to display to the user.getKey()Gets the unique key of the template.Returns the localized label based on the given locale.Returns the localized name of the template to display to the user.Returns the definition of the task to use for creating a new task.booleanReturns whether this template is available and should be displayed.booleanneedsLocalization(String key) Returns whether this key needs localization.
-
Method Details
-
getKey
String getKey()Gets the unique key of the template.- Returns:
- unique key of the template
- Since:
- taskplanner 5.0
-
getName
-
getDescription
-
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
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 localizelocale- locale to localize with- Returns:
- localized text
- Since:
- taskplanner 5.0
-
needsLocalization
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
-