Class MemoryTaskOptions
java.lang.Object
rife.scheduler.taskoptionmanagers.MemoryTaskOptions
- All Implemented Interfaces:
TaskOptionManager
-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
MemoryTaskOptions
public MemoryTaskOptions()
-
-
Method Details
-
setScheduler
Description copied from interface:TaskOptionManagerSets the scheduler that uses this task option manager.- Specified by:
setSchedulerin interfaceTaskOptionManager- Parameters:
scheduler- this task option manager's scheduler
-
getScheduler
Description copied from interface:TaskOptionManagerRetrieves the scheduler of this task option manager.- Specified by:
getSchedulerin interfaceTaskOptionManager- Returns:
- this task option manager's scheduler; or
nullif the scheduler hasn't been set
-
addTaskOption
Description copied from interface:TaskOptionManagerAdds a new task option to a task.The provided task option needs to have the appropriate task ID set, otherwise the addition will fail.
- Specified by:
addTaskOptionin interfaceTaskOptionManager- 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
-
updateTaskOption
Description copied from interface:TaskOptionManagerUpdate an existing task option.The provided task option needs to have the appropriate task ID set, otherwise the update will fail.
- Specified by:
updateTaskOptionin interfaceTaskOptionManager- Parameters:
taskOption- the updated task option- Returns:
trueif the task option was successfully updated; orfalseotherwise- Throws:
TaskOptionManagerException
-
getTaskOption
Description copied from interface:TaskOptionManagerRetrieves a named task options for a particular task.- Specified by:
getTaskOptionin interfaceTaskOptionManager- 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
-
getTaskOptions
Description copied from interface:TaskOptionManagerRetrieves all the task options for a particular task.- Specified by:
getTaskOptionsin interfaceTaskOptionManager- 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
-
removeTaskOption
Description copied from interface:TaskOptionManagerRemove a particular task option.The provided task option needs to have the appropriate task ID set, otherwise the removal will fail.
- Specified by:
removeTaskOptionin interfaceTaskOptionManager- 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
-
removeTaskOption
Description copied from interface:TaskOptionManagerRemove a particular task option.- Specified by:
removeTaskOptionin interfaceTaskOptionManager- 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
-