TrackedSchedulesJsonReader

public interface TrackedSchedulesJsonReader

TrackedSchedulesJsonReader interface provide methods for creating org.motechproject.scheduletracking.domain.json.ScheduleRecord form json data and json files.

Methods

getAllSchedules

List<ScheduleRecord> getAllSchedules(String definitionsDirectoryName)

Builds schedules records from the given directory which is in the classpath. Only files with ‘json’ extension will be scanned.

Parameters:
  • definitionsDirectoryName – the name of the directory which is in the classpath
Returns:

the list of the the schedule records

getSchedule

ScheduleRecord getSchedule(String schduleJson)

Builds a schedule record from the given json data.

Parameters:
  • schduleJson – the json data with the schedule definition
Returns:

the schedule record