@POST @Path("/setLog") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.APPLICATION_JSON) public Response setLog(MultivaluedMap<String, String> formParams) { DaoAlarms al = new DaoAlarms(); al.GenerateLog(formParams.getFirst("alarmId")); return Response.status(Response.Status.OK).build(); }
@POST @Path("/getAlarm") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.APPLICATION_JSON) public Response getAlarm(MultivaluedMap<String, String> formParams) { ArrayList<AlarmContainer> Container = new ArrayList<AlarmContainer>(); DaoAlarms al = new DaoAlarms(); Container = al.getAlarmsbyPrioritiy(formParams.getFirst("priority"), formParams.getFirst("time")); return Response.status(Response.Status.OK).entity(Container).build(); }