Interface ScheduleTaskFactory<DTO extends ScheduleTaskFactory.TaskDto,T extends ScheduleTask>
- Type Parameters:
DTO
- persistence and transfer type, seeScheduleTaskFactory.TaskDto
T
- api type, seeScheduleTask
public interface ScheduleTaskFactory<DTO extends ScheduleTaskFactory.TaskDto,T extends ScheduleTask>
Module class to hook new schedule task types into FirstSpirit. Implementations provide a
datatransfer object
(which is also the persistent format), a createTask(ScheduleEntry,ScheduleTaskFactory.TaskDto)
schedule task}, and an executor
.- Since:
- 4.2.2
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Marker interface for task data transfer and persistence object. -
Method Summary
Modifier and TypeMethodDescriptionCreate a new Task DTO to use with a task factory to create a new task.<E> E
createEditorFactory
(@NotNull Class<E> type, T task) Create a gui factory of a specified type.createTask
(@NotNull ScheduleEntry scheduleEntry, DTO dto) Create a new task.@NotNull de.espirit.firstspirit.server.scheduler.TaskExecutor
Factory providing an executor object for performing a task.Provides the API type for tasks being created by this factory.@NotNull String
Provides a description of the created task's job.@NotNull String
Provides the display name for creating tasks from this factory.Provides the DTO type for tasks.boolean
isLicensed
(@NotNull SpecialistsBroker broker) Is this task type enabled by license?boolean
Deprecated.since 5.2.16 - no replacementboolean
Deprecated.since 5.2.16 - no replacement
-
Method Details
-
getApiType
Provides the API type for tasks being created by this factory.- Returns:
- the api interface
<T>
- Since:
- 4.2.2
-
getDtoType
Provides the DTO type for tasks.- Returns:
- the task Data transfer object type
- Since:
- 4.2.2
-
getDisplayName
Provides the display name for creating tasks from this factory.- Returns:
- the visible task selection display name
- Since:
- 4.2.2
-
getDescription
Provides a description of the created task's job.- Returns:
- the task desciption
- Since:
- 4.2.2
-
mayExecuteWithoutProject
Deprecated.since 5.2.16 - no replacementImplementations returntrue
ifcreateTask(ScheduleEntry,ScheduleTaskFactory.TaskDto)
generated tasks} may be executed without project binding.- Returns:
- true if task may be executed without a project binding
- Since:
- 4.2.2
- See Also:
-
mayExecuteWithProject
Deprecated.since 5.2.16 - no replacementImplementations returntrue
ifgenerated tasks
may be executed with project binding.- Returns:
- true if task may be executed with a project binding
- Since:
- 4.2.2
- See Also:
-
createDto
Create a new Task DTO to use with a task factory to create a new task.Note: this method needs to be called before
creating a new task
.- Returns:
- the newly created data transfer object
- Since:
- 4.2.2
- See Also:
-
createTask
Create a new task.Note:
createDto
needs to be called first to obtain a valid DTO.- Parameters:
scheduleEntry
- theScheduleEntry
dto
- a specialized dto object (seecreateDto()
)- Returns:
- The task instance.
- Since:
- 4.2.2
- See Also:
-
createTaskExecutor
@NotNull @NotNull de.espirit.firstspirit.server.scheduler.TaskExecutor createTaskExecutor()Factory providing an executor object for performing a task.- Returns:
- the specific
TaskExecutor
- Since:
- 4.2.2
-
createEditorFactory
Create a gui factory of a specified type. If the specified type is not supported implementations should returnnull
.- Type Parameters:
E
- dialog factory type- Parameters:
type
- desired factory type, current known types areScheduleTaskDialogFactory
for the java clientand TODO (name class for web client)task
- a specialized task object- Returns:
- a gui factory which provides a gui of the specified type
- Since:
- 4.2.2
-
isLicensed
Is this task type enabled by license?- Returns:
- true if this task type is licensed
- Since:
- 5.2.201
-