@POST @Path("/") public Response add(Timer timer) { hasAccessTimer(timer); TimerUtils.addTimer(timer); return RestUtils.getResponse(Status.CREATED); }
@POST @Path("/disable") public Response disable(List<Integer> ids) { updateTimerIds(ids); TimerUtils.disableTimers(ids); return RestUtils.getResponse(Status.NO_CONTENT); }
@PUT @Path("/") public Response update(Timer timer) { hasAccessTimer(timer); TimerUtils.updateTimer(timer); return RestUtils.getResponse(Status.NO_CONTENT); }