EnrollmentRequest

public class EnrollmentRequest

EnrollmentRequest represents the request to create an enrollment.

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

Constructors

EnrollmentRequest

public EnrollmentRequest()

Methods

getEnrollmentDateTime

public DateTime getEnrollmentDateTime()

Returns the enrollment date and time of the enrollment.

Returns:the enrollment date and time

getExternalId

public String getExternalId()

Returns the client external id.

Returns:the client external id

getMetadata

public Map<String, String> getMetadata()

Returns the metadata key value map of the enrollment.

Returns:the metadata

getPreferredAlertTime

public Time getPreferredAlertTime()

Returns the preferred alert time of the enrollment.

Returns:the preferred alert time

getReferenceDate

public LocalDate getReferenceDate()

Returns the reference date of the enrollment.

Returns:the reference date

getReferenceDateTime

public DateTime getReferenceDateTime()

Returns the reference date and time of the enrollment.

Returns:the reference date and time

getReferenceTime

public Time getReferenceTime()

Returns the reference time of the enrollment.

Returns:the reference time

getScheduleName

public String getScheduleName()

Returns the schedule name of the enrollment.

Returns:the schedule name

getStartingMilestoneName

public String getStartingMilestoneName()

Returns the starting milestone name of the enrollment.

Returns:the starting milestone name

isStartingMilestoneSpecified

public boolean isStartingMilestoneSpecified()

Returns whether the starting milestone has been specified for the enrollment.

Returns:true if the starting milestone has been specified

setEnrollmentDate

public EnrollmentRequest setEnrollmentDate(LocalDate enrollmentDate)

Sets the enrollment date of the enrollment. The date of enrollment. In case of enrollment into milestones other than first milestone, this becomes the start date of that milestone. Default value is today.

setEnrollmentTime

public EnrollmentRequest setEnrollmentTime(Time enrollmentTime)

Sets the enrollment time of the enrollment. The time of enrollment. In case of enrollment into milestones other than first milestone, this becomes the start time of that milestone. Default value is midnight.

setExternalId

public EnrollmentRequest setExternalId(String externalId)

Sets the client external id.

setMetadata

public EnrollmentRequest setMetadata(Map<String, String> metadata)

Sets the metadata key value map of the enrollment. This is list of string key value pairs associated with an enrollment, which can be used to store some additional information about the enrollment. Default value is empty list.

setPreferredAlertTime

public EnrollmentRequest setPreferredAlertTime(Time preferredAlertTime)

Sets the preferred alert time of the enrollment.

setReferenceDate

public EnrollmentRequest setReferenceDate(LocalDate referenceDate)

Sets the reference date of the enrollment. This is the start date of the schedule based on which all the window duration calculations are made. In case of enrollment into milestones other than first milestone, this date is not used. Default value is today.

setReferenceTime

public EnrollmentRequest setReferenceTime(Time referenceTime)

Sets the reference time of the enrollment. This is the start time of the schedule based on which all the window duration calculations are made. In case of enrollment into milestones other than first milestone, this time is not used. Default value is midnight.

setScheduleName

public EnrollmentRequest setScheduleName(String scheduleName)

Sets the schedule of the enrollment.

setStartingMilestoneName

public EnrollmentRequest setStartingMilestoneName(String startingMilestoneName)

Sets the starting milestone of the Enrollment. Name of the milestone to enroll against. Default value is first milestone name from the schedule.