UnenrolledUserEvent

public class UnenrolledUserEvent

The UnenrolledUserEvent is used to create a Motech event. The event payload contains details about user unenrollment.

See also: org.motechproject.scheduletracking.service.EnrollmentService

Constructors

UnenrolledUserEvent

public UnenrolledUserEvent(String externalId, String scheduleName)

Creates a UnenrolledUserEvent with the externalId attribute set to externalId, the scheduleName attribute to scheduleName.

Parameters:
  • externalId – the user external id
  • scheduleName – the name of the schedule

UnenrolledUserEvent

public UnenrolledUserEvent(Map<String, Object> parameters)

Creates a UnenrolledUserEvent from map with the given parameters.

Parameters:
  • parameters – the parameters map, it should contains the external id and the schedule name

Methods

getExternalId

public String getExternalId()

getScheduleName

public String getScheduleName()

toMotechEvent

public MotechEvent toMotechEvent()

Creates a Motech event with details about user unenrollment.

Returns:the Motech event with details about user unenrollment