Interface ScheduleTaskFactory<DTO extends ScheduleTaskFactory.TaskDto,T extends ScheduleTask>
- Type Parameters:
DTO- persistence and transfer type, seeScheduleTaskFactory.TaskDtoT- 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
data
transfer object (which is also the persistent format), a createTask(ScheduleEntry, ScheduleTaskFactory.TaskDto) schedule task}, and an executor.- Since:
- 4.2.2
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceMarker 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> EcreateEditorFactory(@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.TaskExecutorFactory providing an executor object for performing a task.Provides the API type for tasks being created by this factory.@NotNull StringProvides a description of the created task's job.@NotNull StringProvides the display name for creating tasks from this factory.Provides the DTO type for tasks.booleanisLicensed(@NotNull SpecialistsBroker broker) Is this task type enabled by license?booleanDeprecated.since 5.2.16 - no replacementbooleanDeprecated.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 returntrueifcreateTask(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 returntrueifgenerated tasksmay 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:
createDtoneeds to be called first to obtain a valid DTO.- Parameters:
scheduleEntry- theScheduleEntrydto- 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 areScheduleTaskDialogFactoryfor the java client and 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
-