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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getDescription(java.util.Locale locale)
returns the localized description of the template to display to the userjava.lang.String
getKey()
unique key of the templatejava.lang.String
getLabel(java.lang.String key, java.util.Locale locale)
returns the localized label, based on the given locale.java.lang.String
getName(java.util.Locale locale)
returns the localized name of the template to display to the userTaskDefinition
getTaskDefinition()
returns the definition of the task to use for creation of a new task.boolean
isAvailable()
whether this template is available and should be displayedboolean
needsLocalization(java.lang.String key)
whether this key needs localization (if not, getLabel will return the given key directly)
-
-
-
Method Detail
-
getKey
java.lang.String getKey()
unique key of the template- Returns:
- unique key of the template
- Since:
- taskplanner 5.0
-
getName
java.lang.String getName(java.util.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
java.lang.String getDescription(java.util.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
java.lang.String getLabel(java.lang.String key, java.util.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 localizelocale
- locale to localize with- Returns:
- localized text
- Since:
- taskplanner 5.0
-
needsLocalization
boolean needsLocalization(java.lang.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
-
-