Search in sources :

Example 1 with Schedule

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);
}
Also used : Appliance(de.avanux.smartapplianceenabler.appliance.Appliance) Schedule(de.avanux.smartapplianceenabler.appliance.Schedule) ApplianceLogger(de.avanux.smartapplianceenabler.log.ApplianceLogger)

Aggregations

Appliance (de.avanux.smartapplianceenabler.appliance.Appliance)1 Schedule (de.avanux.smartapplianceenabler.appliance.Schedule)1 ApplianceLogger (de.avanux.smartapplianceenabler.log.ApplianceLogger)1