EnrolledUserEvent

public class EnrolledUserEvent

The EnrolledUserEvent is used to create a Motech event. The event payload contains details about user enrollment.

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

Constructors

EnrolledUserEvent

public EnrolledUserEvent(String externalId, String scheduleName, Time preferredAlertTime, DateTime referenceDateTime, DateTime enrollmentDateTime, String startingMilestoneName)

Creates a EnrolledUserEvent with the externalId attribute set to externalId, the scheduleName attribute to scheduleName, the preferredAlertTime attribute to preferredAlertTime, the referenceDateTime attribute is used to fill referenceDate and referenceTime, the enrollmentDateTime attribute is used to fill enrollmentDate and enrollmentTime, the startingMilestoneName attribute to startingMilestoneName.

Parameters:
  • externalId – the user external id
  • scheduleName – the name of the schedule
  • preferredAlertTime – the time of day to send alerts to client
  • referenceDateTime – the reference date and time on which the schedule will start
  • enrollmentDateTime – the enrollment date and time on which the client is enrolled into the schedule
  • startingMilestoneName – the starting milestone name

Methods

getEnrollmentDate

public LocalDate getEnrollmentDate()

getEnrollmentTime

public Time getEnrollmentTime()

getExternalId

public String getExternalId()

getPreferredAlertTime

public Time getPreferredAlertTime()

getReferenceDate

public LocalDate getReferenceDate()

getReferenceTime

public Time getReferenceTime()

getScheduleName

public String getScheduleName()

getStartingMilestoneName

public String getStartingMilestoneName()

toMotechEvent

public MotechEvent toMotechEvent()

Creates a Motech event with details about user enrollment.

Returns:the Motech event with details about user enrollment