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 TypeMethodDescriptionbooleanaddTaskOption(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.booleanremoveTaskOption(int taskId, String name) Remove a particular task option.booleanremoveTaskOption(TaskOption taskOption) Remove a particular task option.voidsetScheduler(Scheduler scheduler) Sets the scheduler that uses this task option manager.booleanupdateTaskOption(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
nullif 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:
truewhen the task option was successfully added; orfalseotherwise- 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:
trueif the task option was successfully updated; orfalseotherwise- 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
nullwhen 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:
truewhen the task option was successfully removed; orfalseotherwise- 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:
truewhen the task option was successfully removed; orfalseotherwise- Throws:
TaskOptionManagerException- when an error occurred during the task option removal- Since:
- 1.0
-