Package rife.scheduler
Class TaskOption
java.lang.Object
rife.validation.Validation
rife.scheduler.TaskOption
- All Implemented Interfaces:
Cloneable
,Constrained
,ConstrainedPropertyListener
,Validated
A task option provides a way to configure an existing task.
For a task option to be valid, a task ID needs to be associated and both the task option name and value have to be set.
- Since:
- 1.0
-
Constructor Summary
ConstructorDescriptionCreate a new task option instance that is not associated with any task. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
This method is called at least once and maximum once when any method related to Validated rules, subjects and group or Constrained properties are used.clone()
boolean
getName()
Retrieves the name of this task option.int
Retrieves the task ID this task option is associated with.getValue()
Retrieves the value of this task option.Sets the name of this task option.void
Sets the name of this task option.void
setTaskId
(int taskId) Sets the task ID that this task option is associated with.void
Sets the value of this task option.taskId
(int taskId) Sets the task ID that this task option is associated with.Sets the value of this task option.Methods inherited from class rife.validation.Validation
addConstrainedPropertyRules, addConstraint, addConstraint, addGroup, addRule, addValidationError, constraintSet, countValidationErrors, focusGroup, generateConstrainedPropertyRules, getConstrainedBean, getConstrainedProperties, getConstrainedProperty, getErrorIndication, getGroup, getGroups, getLoadingErrors, getRules, getValidatedSubjects, getValidationErrors, hasPropertyConstraint, isSubjectValid, limitSubjectErrors, makeErrorValid, makeSubjectValid, provideValidatedBean, replaceValidationErrors, resetGroup, resetValidation, retrieveValidatedBean, unlimitSubjectErrors, validate, validate, validateGroup, validateGroup
-
Constructor Details
-
TaskOption
public TaskOption()Create a new task option instance that is not associated with any task.- Since:
- 1.0
-
-
Method Details
-
activateValidation
protected void activateValidation()Description copied from class:Validation
This method is called at least once and maximum once when any method related to Validated rules, subjects and group or Constrained properties are used.By overriding this method, you can thus isolate all the validation setup code and don't enforce a performance penalty at each object construction when doing it in the default constructor.
- Overrides:
activateValidation
in classValidation
-
setTaskId
public void setTaskId(int taskId) Sets the task ID that this task option is associated with.- Parameters:
taskId
- the associated task ID- Since:
- 1.0
-
taskId
Sets the task ID that this task option is associated with.- Parameters:
taskId
- the associated task ID- Returns:
- this task option instance
- Since:
- 1.0
-
getTaskId
public int getTaskId()Retrieves the task ID this task option is associated with.- Returns:
- the associated task ID; or
-1
when no task has been associated
-
setName
Sets the name of this task option.- Parameters:
name
- this task option's name- Since:
- 1.0
-
name
Sets the name of this task option.- Parameters:
name
- this task option's name- Returns:
- this task option instance
- Since:
- 1.0
-
getName
Retrieves the name of this task option.- Returns:
- this task option's name; or
null
if the name hasn't been set yet
-
setValue
Sets the value of this task option.- Parameters:
value
- this task option's value- Since:
- 1.0
-
value
Sets the value of this task option.- Parameters:
value
- this task option's value- Returns:
- this task option instance
- Since:
- 1.0
-
getValue
Retrieves the value of this task option.- Returns:
- this task option's value; or
null
if the value hasn't been set yet - Since:
- 1.0
-
clone
- Overrides:
clone
in classValidation
- Throws:
CloneNotSupportedException
-
equals
-