ActionEventBuilder

public class ActionEventBuilder

The ActionEventBuilder class provides methods for constructing action events.

See also: org.motechproject.tasks.domain.ActionEvent

Methods

createActionEvent

public ActionEvent createActionEvent()

Builds an object of the ActionEvent class.

Returns:the created instance

fromActionEvent

public static ActionEventBuilder fromActionEvent(ActionEvent actionEventRequest)

Builds an object of the ActionEventBuilder class based on the passed ActionEvent instance.

Parameters:
  • actionEventRequest – the action event, not null
Returns:

the instance of the ActionEventBuilder class ready to build instance of the ActionEvent class

fromActionEventRequest

public static ActionEventBuilder fromActionEventRequest(ActionEventRequest actionEventRequest)

Builds an object of the ActionEventBuilder class based on the passed ActionEventRequest instance.

Parameters:
  • actionEventRequest – the action event request, not null
Returns:

the instance of the ActionEventBuilder class ready to build instance of the ActionEvent class

setActionParameters

public ActionEventBuilder setActionParameters(SortedSet<ActionParameter> actionParameters)

setDescription

public ActionEventBuilder setDescription(String description)

setDisplayName

public ActionEventBuilder setDisplayName(String displayName)

setName

public ActionEventBuilder setName(String name)

setServiceInterface

public ActionEventBuilder setServiceInterface(String serviceInterface)

setServiceMethod

public ActionEventBuilder setServiceMethod(String serviceMethod)

setServiceMethodCallManner

public ActionEventBuilder setServiceMethodCallManner(MethodCallManner serviceMethodCallManner)

setSubject

public ActionEventBuilder setSubject(String subject)