ScheduleTrackingService¶
-
public interface
ScheduleTrackingService
¶ Schedule Tracking Service interface provides methods to enroll an external id into a schedule, fulfill milestones in a schedule and uneroll an external id from a schedule. It also provides querying functionality on Enrollments using various search criteria.
Methods¶
add¶
enroll¶
-
Long
enroll
(EnrollmentRequest enrollmentRequest)¶ Enrolls a client with external id into a schedule using the details in the EnrollmentRequest and schedules alerts. If the client has already enrolled for the same schedule which is currently active, then we update the existing details and reschedule alerts.
Parameters: - enrollmentRequest – the enrollment details
Returns: the enrollment id
fulfillCurrentMilestone¶
-
void
fulfillCurrentMilestone
(String externalId, String scheduleName, LocalDate fulfillmentDate, Time fulfillmentTime)¶ Fulfills the current milestone of the enrollment(with fulfillmentDate and time as the the given date and time) which belongs to the given externalId and schedule name.
Parameters: - externalId – the client external id
- scheduleName – the schedule name
- fulfillmentDate – the fulfillment date
- fulfillmentTime – the fulfillment time
fulfillCurrentMilestone¶
-
void
fulfillCurrentMilestone
(String externalId, String scheduleName, LocalDate fulfillmentDate)¶ Fulfills the current milestone of the enrollment(with fulfillmentDate and time as midnight) which belongs to the given externalId and schedule name.
Parameters: - externalId – the client external id
- scheduleName – the schedule name
- fulfillmentDate – the fulfillment date
getAlertTimings¶
-
MilestoneAlerts
getAlertTimings
(EnrollmentRequest enrollmentRequest)¶ Gives the alert timings of all the windows in the milestone without actually scheduling the alert jobs
Parameters: - enrollmentRequest – the enrollment request
Returns: the alert timings for all the windows of the milestone
getEnrollment¶
-
EnrollmentRecord
getEnrollment
(String externalId, String scheduleName)¶ Returns the enrollment record corresponds to the given external id and schedule name.
Parameters: - externalId – the client external id
- scheduleName – the schedule name
Returns: the enrolment
getScheduleByName¶
remove¶
search¶
-
List<EnrollmentRecord>
search
(EnrollmentsQuery query)¶ Searches and returns the enrollment records as per the criteria in the given enrolments query.
Parameters: - query – the enrolments query which contains search criteria
Returns: the enrolments list
searchWithWindowDates¶
-
List<EnrollmentRecord>
searchWithWindowDates
(EnrollmentsQuery query)¶ Searches and returns the enrollment records(with all window start dates populated in them) as per the criteria in the given enrollments query.
Parameters: - query – the enrolments query which contains search criteria
Returns: the enrolments list
unenroll¶
updateEnrollment¶
-
void
updateEnrollment
(String externalId, String scheduleName, UpdateCriteria updateCriteria)¶ Updates an active enrollment which has the given external id and schedule name.
Parameters: - updateCriteria – states the fields to be updated in the enrollment