Class TaskOption

java.lang.Object
rife.validation.Validation
rife.scheduler.TaskOption
All Implemented Interfaces:
Cloneable, Constrained, ConstrainedPropertyListener, Validated

public class TaskOption extends Validation implements Cloneable
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 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 class Validation
    • 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

      public TaskOption taskId(int 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

      public void setName(String name)
      Sets the name of this task option.
      Parameters:
      name - this task option's name
      Since:
      1.0
    • name

      public TaskOption name(String name)
      Sets the name of this task option.
      Parameters:
      name - this task option's name
      Returns:
      this task option instance
      Since:
      1.0
    • getName

      public String 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

      public void setValue(String value)
      Sets the value of this task option.
      Parameters:
      value - this task option's value
      Since:
      1.0
    • value

      public TaskOption value(String value)
      Sets the value of this task option.
      Parameters:
      value - this task option's value
      Returns:
      this task option instance
      Since:
      1.0
    • getValue

      public String 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

      public TaskOption clone() throws CloneNotSupportedException
      Overrides:
      clone in class Validation
      Throws:
      CloneNotSupportedException
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object