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 ClassesModifier and TypeInterfaceDescriptionstatic interfaceAction to run if the trigger decides that it is time for execution. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidactivate(com.inet.id.GUID taskID, Trigger.TriggerAction action) Activates this trigger.default voidactivate(Trigger.TriggerAction action) Deprecated.default voidClears any persisted state of this trigger because the trigger has been significantly changed or manually deactivated.voidDeactivates this trigger.
-
Method Details
-
activate
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 taskaction- this action must be executed when this trigger triggers.- Since:
- taskplanner 4.1
-
activate
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 overridden- 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 does nothing, but specialized implementations may clear state.- Since:
- taskplanner 22.10
-