Class MemoryTaskOptions
java.lang.Object
rife.scheduler.taskoptionmanagers.MemoryTaskOptions
- All Implemented Interfaces:
TaskOptionManager
-
Constructor Summary
-
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.
-
Constructor Details
-
MemoryTaskOptions
public MemoryTaskOptions()
-
-
Method Details
-
setScheduler
Description copied from interface:TaskOptionManager
Sets the scheduler that uses this task option manager.- Specified by:
setScheduler
in interfaceTaskOptionManager
- Parameters:
scheduler
- this task option manager's scheduler
-
getScheduler
Description copied from interface:TaskOptionManager
Retrieves the scheduler of this task option manager.- Specified by:
getScheduler
in interfaceTaskOptionManager
- Returns:
- this task option manager's scheduler; or
null
if the scheduler hasn't been set
-
addTaskOption
Description copied from interface:TaskOptionManager
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.
- Specified by:
addTaskOption
in interfaceTaskOptionManager
- 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
-
updateTaskOption
Description copied from interface:TaskOptionManager
Update an existing task option.The provided task option needs to have the appropriate task ID set, otherwise the update will fail.
- Specified by:
updateTaskOption
in interfaceTaskOptionManager
- Parameters:
taskOption
- the updated task option- Returns:
true
if the task option was successfully updated; orfalse
otherwise- Throws:
TaskOptionManagerException
-
getTaskOption
Description copied from interface:TaskOptionManager
Retrieves a named task options for a particular task.- Specified by:
getTaskOption
in 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
null
when the task option couldn't be found - Throws:
TaskOptionManagerException
- when an error occurred during the task option retrieval
-
getTaskOptions
Description copied from interface:TaskOptionManager
Retrieves all the task options for a particular task.- Specified by:
getTaskOptions
in 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:TaskOptionManager
Remove a particular task option.The provided task option needs to have the appropriate task ID set, otherwise the removal will fail.
- Specified by:
removeTaskOption
in interfaceTaskOptionManager
- 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
-
removeTaskOption
Description copied from interface:TaskOptionManager
Remove a particular task option.- Specified by:
removeTaskOption
in interfaceTaskOptionManager
- 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
-