Task

public class Task

A task is set of actions that are executed in response to a trigger. The actions and the trigger are defined by their respective Channels.

Constructors

Task

public Task()

Constructor.

Task

public Task(String name, TaskTriggerInformation trigger, List<TaskActionInformation> actions)

Constructor.

Parameters:
  • name – the task name
  • trigger – the task trigger
  • actions – the list of related actions

Task

public Task(String name, TaskTriggerInformation trigger, List<TaskActionInformation> actions, TaskConfig taskConfig, boolean enabled, boolean hasRegisteredChannel)

Constructor.

Parameters:
  • name – the task name
  • trigger – the task trigger
  • actions – the list of related actions
  • taskConfig – the task configuration
  • enabled – defines if this task is enabled
  • hasRegisteredChannel – defines if this task has a registered channel

Methods

addAction

public void addAction(TaskActionInformation action)

Stores the given action.

Parameters:
  • action – the action

addValidationErrors

public void addValidationErrors(Set<TaskError> validationErrors)

equals

public boolean equals(Object obj)

getActions

public List<TaskActionInformation> getActions()

getDescription

public String getDescription()

getFailuresInRow

public int getFailuresInRow()

getId

public Long getId()

getName

public String getName()

getTaskConfig

public TaskConfig getTaskConfig()

getTrigger

public TaskTriggerInformation getTrigger()

getValidationErrors

public Set<TaskError> getValidationErrors()

hasRegisteredChannel

public boolean hasRegisteredChannel()

hasValidationErrors

public boolean hasValidationErrors()

hashCode

public int hashCode()

incrementFailuresInRow

public void incrementFailuresInRow()

Increases the counter of task execution failures that occurred since the last successful execution of this task or since the task was enabled.

isEnabled

public boolean isEnabled()

removeValidationError

public void removeValidationError(String message)

resetFailuresInRow

public void resetFailuresInRow()

Resets the counter of task execution failures that occurred since the last successful execution of this task or since the task was enabled.

setActions

public void setActions(List<TaskActionInformation> actions)

setDescription

public void setDescription(String description)

setEnabled

public void setEnabled(boolean enabled)

setFailuresInRow

public void setFailuresInRow(int failuresInRow)

setHasRegisteredChannel

public void setHasRegisteredChannel(boolean hasRegisteredChannel)

setId

public void setId(Long id)

setName

public void setName(String name)

setTaskConfig

public void setTaskConfig(TaskConfig taskConfig)

setTrigger

public void setTrigger(TaskTriggerInformation trigger)

setValidationErrors

public void setValidationErrors(Set<TaskError> validationErrors)

toString

public String toString()