public interface ScheduleTaskTemplate extends Lockable
ScheduleStorage.createScheduleTaskTemplate()
Modifier and Type | Method and Description |
---|---|
<T extends ScheduleTask> |
createTask(Class<T> type)
Create and set a task of the provided type.
|
boolean |
delete()
Delete this template.
|
long |
getId()
Returns the id of the schedule task template.
|
Project |
getProject()
Returns the
Project or null if the schedule task template is server scoped. |
ScheduleTask |
getTask()
Returns the current task instance or
null . |
int |
getUsageCount()
Returns the number of usages of this template.
|
List<ScheduleEntry> |
getUsages()
Returns a list of schedule entries which contains task that use this template.
|
boolean |
isChanged()
Returns
true , if this template has been changed, false otherwise. |
boolean |
isCopyAllowed()
Is it allowed to copy this template or are only references allowed?
|
boolean |
isProjectTaskTemplate()
Returns
true |
boolean |
isPublic()
Returns
true , if this template is visible for other projects, false if this template is only available
for local usage. |
void |
setCopyAllowed(boolean value)
(Dis-)allow copying of this template.
|
void |
setProject(Project project)
Set
project to make the schedule task template project scoped or null for server scoped. |
void |
setPublic(boolean value)
Set
value to true , if this template should be visible for other projects, false if this template
should be only available for local usage. |
long getId()
boolean isProjectTaskTemplate()
true, if the schedule task template is project scoped, false
if it is server scoped.
true, if the schedule task template is project scoped, false
if it is server scoped.
getProject()
@Nullable Project getProject()
Project
or null
if the schedule task template is server scoped.Project
or null
if the schedule task template is server scoped.void setProject(@Nullable Project project)
project
to make the schedule task template project scoped or null
for server scoped.project
- Set the schedule task template project scoped by given Project
or null
for server scoped.boolean isChanged()
true
, if this template has been changed, false
otherwise.boolean isPublic()
true
, if this template is visible for other projects, false
if this template is only available
for local usage.true
, if this template is visible for other projects, false
if this template is only available
for local usage.#isProjectTemplate()
void setPublic(boolean value)
value
to true
, if this template should be visible for other projects, false
if this template
should be only available for local usage.value
- true
, if this template should be visible for other projects, false
if this template should
be only available for local usage.@Nullable ScheduleTask getTask()
null
. For new task templates this is null
until createTask(Class)
has been called.null
if no task instance has been created.createTask(Class)
<T extends ScheduleTask> T createTask(Class<T> type)
type
- Task type.ScheduleTask
boolean delete()
true
, if template could be deleted, false
otherwise.@NotNull List<ScheduleEntry> getUsages()
int getUsageCount()
getUsages()
boolean isCopyAllowed()
true
if copies a allowed, false
if only references are allowed.setCopyAllowed(boolean)
void setCopyAllowed(boolean value)
value
- true
to allow copying of this task template, false
to only allow references to this
task template.Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210