diff --git a/src/main/java/stockManagement/push/Shipping.java b/src/main/java/stockManagement/push/Shipping.java index 0fd2f0b..c8e5716 100644 --- a/src/main/java/stockManagement/push/Shipping.java +++ b/src/main/java/stockManagement/push/Shipping.java @@ -21,7 +21,7 @@ @State private Map.Entry value; @PUT - @Message("handling") + @Message({"handling"}) public void updateHandling(@FormParam("handling") String handling_json) throws JsonProcessingException { Map.Entry> handling; { diff --git a/src/main/java/stockManagement/push/Shortage.java b/src/main/java/stockManagement/push/Shortage.java index 38a3616..c32a7c3 100644 --- a/src/main/java/stockManagement/push/Shortage.java +++ b/src/main/java/stockManagement/push/Shortage.java @@ -23,7 +23,7 @@ private Map value = new HashMap(); @Path("/available") @POST - @Message({}) + @Message({"available"}) public void updateAvailable(@FormParam("available") String available_json) throws JsonProcessingException { Map.Entry available; { diff --git a/src/main/java/stockManagement/push/Stock.java b/src/main/java/stockManagement/push/Stock.java index ac490cd..f162ec2 100644 --- a/src/main/java/stockManagement/push/Stock.java +++ b/src/main/java/stockManagement/push/Stock.java @@ -18,14 +18,14 @@ @State private Map value = new HashMap(); @POST - @Message("deriver") - public void updateDeriver(@FormParam("deriver") String deriver_json) throws JsonProcessingException { - Map.Entry> deriver; + @Message({"handling"}) + public void updateHandling(@FormParam("handling") String handling_json) throws JsonProcessingException { + Map.Entry> handling; { - Map> i = new ObjectMapper().readValue(deriver_json, HashMap.class); - deriver = new AbstractMap.SimpleEntry<>(i.entrySet().iterator().next().getKey(), new AbstractMap.SimpleEntry<>(Integer.parseInt(i.entrySet().iterator().next().getValue().entrySet().iterator().next().getKey()), i.entrySet().iterator().next().getValue().entrySet().iterator().next().getValue())); + Map> i = new ObjectMapper().readValue(handling_json, HashMap.class); + handling = new AbstractMap.SimpleEntry<>(i.entrySet().iterator().next().getKey(), new AbstractMap.SimpleEntry<>(Integer.parseInt(i.entrySet().iterator().next().getValue().entrySet().iterator().next().getKey()), i.entrySet().iterator().next().getValue().entrySet().iterator().next().getValue())); } - this.value.put(deriver.getKey(),deriver.getValue().getValue()); + this.value.put(handling.getKey(),handling.getValue().getValue()); } @Produces(MediaType.APPLICATION_JSON) @GET