ActionEventRequest

public class ActionEventRequest

Service layer object denoting a ActionEvent. It is a part of the org.motechproject.tasks.contract.ChannelRequest and is used by org.motechproject.tasks.service.ChannelService for adding new or updating already existent action events.

Constructors

ActionEventRequest

public ActionEventRequest()

Constructor.

ActionEventRequest

public ActionEventRequest(String name, String displayName, String subject, String description, String serviceInterface, String serviceMethod, String serviceMethodCallManner, SortedSet<ActionParameterRequest> actionParameters)

Constructor.

ActionEventRequest

public ActionEventRequest(String name, String displayName, String subject, String description, String serviceInterface, String serviceMethod, String serviceMethodCallManner, SortedSet<ActionParameterRequest> actionParameters, SortedSet<ActionParameterRequest> postActionParameters)

Constructor.

Parameters:
  • name – the event name
  • displayName – the event display name
  • subject – the event subject
  • description – the event description
  • serviceInterface – the event service interface
  • serviceMethod – the event service method
  • serviceMethodCallManner – the event service method call manner, for supported values check {@see org.motechproject.tasks.domain.enums.MethodCallManner}
  • actionParameters – the action parameters

Methods

addParameter

public void addParameter(ActionParameterRequest parameter, boolean changeOrder)

Adds the given parameter request to the list of stored parameter requests.

Parameters:
  • parameter – the action parameter request
  • changeOrder – defines if order of the given parameter should continue numeration of the stored list

addPostActionParameter

public void addPostActionParameter(ActionParameterRequest parameter, boolean changeOrder)

Adds the given parameter request to the list of stored post action parameter requests.

Parameters:
  • parameter – the post action parameter request
  • changeOrder – defines if order of the given parameter should continue numeration of the stored list

equals

public boolean equals(Object obj)

getActionParameters

public SortedSet<ActionParameterRequest> getActionParameters()

Returns the action parameters.

Returns:the action parameters

getDescription

public String getDescription()

Returns the description of the action event.

Returns:the action event description

getDisplayName

public String getDisplayName()

Returns the display name of the action event.

Returns:the action event display name

getName

public String getName()

Returns the name of the action event.

Returns:the action event name

getPostActionParameters

public SortedSet<ActionParameterRequest> getPostActionParameters()

Returns the post action parameters.

Returns:the post action parameters

getServiceInterface

public String getServiceInterface()

Returns the service interface of the action event.

Returns:the action event service interface

getServiceMethod

public String getServiceMethod()

Returns the service method of the action event.

Returns:the action event service method

getServiceMethodCallManner

public String getServiceMethodCallManner()

Returns the service method call manner of the action event.

Returns:the action event service method call manner

getSubject

public String getSubject()

Returns the subject of the action event.

Returns:the action event subject

hasService

public boolean hasService()

Checks if this action event request has service interface and method specified.

Returns:true if action has service interface and method specified, false otherwise

hasSubject

public boolean hasSubject()

Checks if this action event request has subject.

Returns:true if action event has subject, false otherwise

hashCode

public int hashCode()

isValid

public boolean isValid()

Checks if this action event request has subject or service defined.

Returns:true if this has subject or service set, false otherwise

toString

public String toString()