Interface Trigger

All Known Implementing Classes:
com.inet.taskplanner.server.api.trigger.time.AbstractTimeTrigger, TimeTriggerForCustomSettings

public interface Trigger
The Trigger initiates the execution of a task.

      TriggerDefinition ----> TriggerFactory ----> Trigger
 

Triggers are produced by the corresponding TriggerFactory. Triggers are produced when a Task is created or updated in the TaskPlanner.

Since:
taskplanner 3.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Action to run if the trigger decides that time for execution has come.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    activate(com.inet.id.GUID taskID, Trigger.TriggerAction action)
    Activates this trigger.
    default void
    Deprecated.
    default void
    clears any persisted state of this trigger because the trigger has been significantly changed or manually deactivated The default implementation will do nothing but special implementations may exist.
    void
    Deactivates this trigger.
  • Method Details

    • activate

      default void activate(com.inet.id.GUID taskID, Trigger.TriggerAction action)
      Activates this trigger. Only activated triggers must call the given action. A trigger is activated if the task of the trigger is activated.
      Parameters:
      taskID - id of the triggered task
      action - this action must be executed when this trigger triggers.
      Since:
      taskplanner 4.1
    • activate

      @Deprecated default void activate(Trigger.TriggerAction action)
      Deprecated.
      Activates this trigger. Only activated triggers must call the given action. A trigger is activated if the task of the trigger is activated.
      Parameters:
      action - this action must be executed when this trigger triggers.
      Throws:
      UnsupportedOperationException - if not override
      Since:
      taskplanner 3.0
    • deactivate

      void deactivate()
      Deactivates this trigger. Triggers are deactivated if the owning task is deactivated, deleted or modified where this trigger (-definition) is dropped or changed.
      Since:
      taskplanner 3.0
    • clearState

      default void clearState()
      clears any persisted state of this trigger because the trigger has been significantly changed or manually deactivated The default implementation will do nothing but special implementations may exist.
      Since:
      taskplanner 22.10