use of de.avanux.smartapplianceenabler.appliance.Schedule in project SmartApplianceEnabler by camueller.
the class SaeController method setSchedules.
@RequestMapping(value = SCHEDULES_URL, method = RequestMethod.POST, consumes = "application/xml")
@ResponseBody
public void setSchedules(@RequestParam(value = "ApplianceId") String applianceId, @RequestBody Schedules schedules) {
ApplianceLogger applianceLogger = ApplianceLogger.createForAppliance(logger, applianceId);
List<Schedule> schedulesToSet = schedules.getSchedules();
applianceLogger.debug("Received request to set " + (schedulesToSet != null ? schedulesToSet.size() : "0") + " schedule(s)");
Appliance appliance = ApplianceManager.getInstance().findAppliance(applianceId);
appliance.getRunningTimeMonitor().setSchedules(schedulesToSet);
}
Aggregations