Package rife.scheduler
Interface TaskOptionManager
- All Known Implementing Classes:
DatabaseTaskOptions
,MemoryTaskOptions
public interface TaskOptionManager
This interface defines the methods that classes with
TaskOptionManager
functionalities have to implement.- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addTaskOption
(TaskOption taskOption) Adds a new task option to a task.Retrieves the scheduler of this task option manager.getTaskOption
(int taskId, String name) Retrieves a named task options for a particular task.getTaskOptions
(int taskId) Retrieves all the task options for a particular task.boolean
removeTaskOption
(int taskId, String name) Remove a particular task option.boolean
removeTaskOption
(TaskOption taskOption) Remove a particular task option.void
setScheduler
(Scheduler scheduler) Sets the scheduler that uses this task option manager.boolean
updateTaskOption
(TaskOption taskOption) Update an existing task option.
-
Method Details
-
setScheduler
Sets the scheduler that uses this task option manager.- Parameters:
scheduler
- this task option manager's scheduler- Since:
- 1.0
-
getScheduler
Scheduler getScheduler()Retrieves the scheduler of this task option manager.- Returns:
- this task option manager's scheduler; or
null
if the scheduler hasn't been set - Since:
- 1.0
-
addTaskOption
Adds a new task option to a task.The provided task option needs to have the appropriate task ID set, otherwise the addition will fail.
- Parameters:
taskOption
- the task option to add- Returns:
true
when the task option was successfully added; orfalse
otherwise- Throws:
TaskOptionManagerException
- when an error occurred during the task option addition- Since:
- 1.0
-
updateTaskOption
Update an existing task option.The provided task option needs to have the appropriate task ID set, otherwise the update will fail.
- Parameters:
taskOption
- the updated task option- Returns:
true
if the task option was successfully updated; orfalse
otherwise- Throws:
TaskManagerException
- when an error occurred during the task option updateTaskOptionManagerException
- Since:
- 1.0
-
getTaskOption
Retrieves a named task options for a particular task.- Parameters:
taskId
- the unique ID of the task to retrieve the task option forname
- the name of the task option- Returns:
- the retrieved task option instance; or
null
when the task option couldn't be found - Throws:
TaskOptionManagerException
- when an error occurred during the task option retrieval- Since:
- 1.0
-
getTaskOptions
Retrieves all the task options for a particular task.- Parameters:
taskId
- the unique ID of the task to retrieve the task options for- Returns:
- the retrieved task options collection
- Throws:
TaskOptionManagerException
- when an error occurred during the task option retrieval- Since:
- 1.0
-
removeTaskOption
Remove a particular task option.The provided task option needs to have the appropriate task ID set, otherwise the removal will fail.
- Parameters:
taskOption
- the task option to remove- Returns:
true
when the task option was successfully removed; orfalse
otherwise- Throws:
TaskOptionManagerException
- when an error occurred during the task option removal- Since:
- 1.0
-
removeTaskOption
Remove a particular task option.- Parameters:
taskId
- the unique ID of the task to retrieve the task option forname
- the name of the task option- Returns:
true
when the task option was successfully removed; orfalse
otherwise- Throws:
TaskOptionManagerException
- when an error occurred during the task option removal- Since:
- 1.0
-