diff --git a/src/main/java/algoLike/push/HandsA.java b/src/main/java/algoLike/push/HandsA.java index 10e7bf4..406a289 100644 --- a/src/main/java/algoLike/push/HandsA.java +++ b/src/main/java/algoLike/push/HandsA.java @@ -7,8 +7,13 @@ import org.springframework.stereotype.Component; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.core.JsonProcessingException; +import pushPullRefactor.Getter; +import pushPullRefactor.Message; +import pushPullRefactor.Resource; +import pushPullRefactor.State; @Path("/handsA") +@Resource("handsA") @Component public class HandsA { private Client client = ClientBuilder.newClient(); @@ -16,9 +21,11 @@ private Map.Entry resultByDrawingB; private Map.Entry> resultBySelectingA; private Map.Entry> resultBySelectingB; + @State private List> value = new ArrayList>(); @Path("/resultByDrawingA") @POST + @Message({}) public void updateResultByDrawingA(@FormParam("resultByDrawingA") String resultByDrawingA_json, @FormParam("deck") List deck_json) throws JsonProcessingException { List> deck = new ArrayList<>(); for (String str: deck_json) { @@ -51,6 +58,7 @@ } @Path("/resultByDrawingB") @POST + @Message({}) public void updateResultByDrawingB(@FormParam("resultByDrawingB") String resultByDrawingB_json, @FormParam("deck") List deck_json) throws JsonProcessingException { List> deck = new ArrayList<>(); for (String str: deck_json) { @@ -80,6 +88,7 @@ } @Path("/resultBySelectingA") @POST + @Message({}) public void updateResultBySelectingA(@FormParam("resultBySelectingA") String resultBySelectingA_json) throws JsonProcessingException { Map.Entry> resultBySelectingA; { @@ -104,6 +113,7 @@ } @Path("/resultBySelectingB") @POST + @Message({}) public void updateResultBySelectingB(@FormParam("resultBySelectingB") String resultBySelectingB_json) throws JsonProcessingException { Map.Entry> resultBySelectingB; { @@ -128,6 +138,7 @@ } @Produces(MediaType.APPLICATION_JSON) @GET + @Getter public List> getValue() { return value; }