EnrollmentRequest¶
-
public class
EnrollmentRequest
¶ EnrollmentRequest
represents the request to create an enrollment.See also:
org.motechproject.scheduletracking.service.ScheduleTrackingService
Methods¶
getEnrollmentDateTime¶
getExternalId¶
getMetadata¶
getPreferredAlertTime¶
-
public Time
getPreferredAlertTime
()¶ Returns the preferred alert time of the enrollment.
Returns: the preferred alert time
getReferenceDate¶
getReferenceDateTime¶
getReferenceTime¶
-
public Time
getReferenceTime
()¶ Returns the reference time of the enrollment.
Returns: the reference time
getScheduleName¶
getStartingMilestoneName¶
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.