diff --git a/src/main/java/org/ntlab/acanthus_server/entities/Account.java b/src/main/java/org/ntlab/acanthus_server/entities/Account.java index cb48a1e..7be09f3 100644 --- a/src/main/java/org/ntlab/acanthus_server/entities/Account.java +++ b/src/main/java/org/ntlab/acanthus_server/entities/Account.java @@ -21,18 +21,34 @@ package org.ntlab.acanthus_server.entities; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.ArrayList; +import java.util.HashMap; import java.util.UUID; +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "name", + "email", + "work" +}) + +// public class Account { - private Integer uid; + @JsonProperty("name") private String name; + @JsonProperty("email") private String email; - private ArrayList workList = new ArrayList<>(); + @JsonProperty("work") + private HashMap workHashMap = new HashMap<>(); @JsonIgnore + private Integer uid; + @JsonIgnore private String token; @JsonIgnore private String password; @@ -66,7 +82,8 @@ } public void addWork(Work work) { - this.workList.add(work); + var aid = work.getAnimation().getAid(); + this.workHashMap.put(aid,work); } //----------------------------------------------------------------- @@ -93,25 +110,32 @@ //----------------------------------------------------------------- // 招待されている作品を返す - public ArrayList getInvitedList() { - var invitedList = new ArrayList(); + public HashMap getInvitedMap() { + var invitedMap = new HashMap(); - for (var work : workList){ - if (work.isInviting()) invitedList.add(work); + for (var work : workHashMap.values()) { + if (work.isInviting()){ + var aid = work.getAnimation().getAid(); + invitedMap.put(aid, work); + } } - - return invitedList; + return invitedMap; } + //----------------------------------------------------------------- // 参加している作品を返す - public ArrayList getWorkingList() { - var workingList = new ArrayList(); + public HashMap getWorkingList() { + var workingMap = new HashMap(); - for (var work : workList) { - if (work.isWorking()) workingList.add(work); + for (var work : workHashMap.values()) { + if (work.isWorking()){ + var aid = work.getAnimation().getAid(); + workingMap.put(aid, work); + } } - return workingList; + return workingMap; } + //----------------------------------------------------------------- //----------------------------------------------------------------- // トークンを更新する 藤井 diff --git a/src/main/java/org/ntlab/acanthus_server/entities/AccountJson.java b/src/main/java/org/ntlab/acanthus_server/entities/AccountJson.java new file mode 100644 index 0000000..e306864 --- /dev/null +++ b/src/main/java/org/ntlab/acanthus_server/entities/AccountJson.java @@ -0,0 +1,28 @@ +package org.ntlab.acanthus_server.entities; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) + +//----------------------------------------------------------------- +// アカウント一覧取得用のJsonクラス +public class AccountJson { + + @JsonProperty("uid") + private Integer uid; + @JsonProperty("name") + private String name; + @JsonProperty("email") + private String email; + + //----------------------------------------------------------------- + //----------------------------------------------------------------- + public AccountJson(Account account){ + this.uid = account.getUid(); + this.name = account.getName(); + this.email = account.getEmail(); + } + //----------------------------------------------------------------- +} diff --git a/src/main/java/org/ntlab/acanthus_server/entities/Animation.java b/src/main/java/org/ntlab/acanthus_server/entities/Animation.java index 2744949..ce9c108 100644 --- a/src/main/java/org/ntlab/acanthus_server/entities/Animation.java +++ b/src/main/java/org/ntlab/acanthus_server/entities/Animation.java @@ -1,10 +1,15 @@ package org.ntlab.acanthus_server.entities; +import org.ntlab.acanthus_server.models.Accounts; +import org.ntlab.acanthus_server.models.Gallery; + import java.util.ArrayList; import java.util.Collection; +import java.util.Date; +import java.util.HashMap; public class Animation { - private Integer aid; + private int aid; private String name; private String description; private Boolean ispublic; @@ -13,25 +18,32 @@ private Integer likes; private Integer views; private ArrayList hashTag; - private Integer owner; + private Account owner; private ArrayList editors; private ArrayList invites; - private ArrayList pageMap; + private HashMap pageMap; - public Animation(String name, Integer owner) { - - //一意のaidをふる - // this.aid = - this.ispublic = false; + public Animation(String name, Account owner) { + this.aid = aid; + Date dt = new Date(); + this.createdDate = dt.toString(); + setIsPublic(false); this.owner = owner; - //this.editors.add(Editor); - //this.pageMap.add(0, this.aid); + this.editors.add(new Editor(owner)); + this.pageMap.put(0, 0); } + private Gallery gallery = Gallery.getInstance(); + private Accounts accounts = Accounts.getInstance(); + public void setName(String name){ this.name = name; } + public void setAid(Integer aid){ + this.aid = aid; + } + public void setDescription(String description){ this.description = description; } @@ -40,7 +52,37 @@ this.ispublic = ispublic; } + public Integer getAid() { return aid; } + public Collection getAnimationInvites() { return invites; } + + + //----------------------------------------------------------------- + // 本当に招待されているかを確認する + public Collection searchAnimationInvites(Integer aid, String invitedUid, String invitedUserToken) { + Animation anime_info = gallery.getAnimationInformation(aid); + Account invitedAccount = accounts.getAccountByUid(Integer.parseInt(invitedUid)); + ArrayList invitedlist = null; + + for(Account account : anime_info.invites) { + if(account == invitedAccount) { + invitedlist.add(account); + return invitedlist; + } + } + return null; + } + + //----------------------------------------------------------------- + //作品に招待する + public void addAccoutToAnimationInvites(Integer aid, String ownerUid, String invitedUid) { + Animation animation = gallery.getAnimationByAid(aid); + Account invitedAccount = accounts.getAccountByUid(Integer.parseInt(invitedUid)); + invites.add(invitedAccount); + } + + //----------------------------------------------------------------- } + diff --git a/src/main/java/org/ntlab/acanthus_server/entities/Position.java b/src/main/java/org/ntlab/acanthus_server/entities/Position.java index ef23208..b76fbfa 100644 --- a/src/main/java/org/ntlab/acanthus_server/entities/Position.java +++ b/src/main/java/org/ntlab/acanthus_server/entities/Position.java @@ -1,5 +1,12 @@ package org.ntlab.acanthus_server.entities; +import com.fasterxml.jackson.annotation.JsonIgnore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.UUID; + public class Position { - + + } diff --git a/src/main/java/org/ntlab/acanthus_server/entities/WorkJson.java b/src/main/java/org/ntlab/acanthus_server/entities/WorkJson.java new file mode 100644 index 0000000..616b46e --- /dev/null +++ b/src/main/java/org/ntlab/acanthus_server/entities/WorkJson.java @@ -0,0 +1,25 @@ +package org.ntlab.acanthus_server.entities; + +import java.util.ArrayList; +import java.util.Collection; + +public class WorkJson { + private ArrayList aid = new ArrayList<>(); + + public WorkJson(Collection workList){ + for (var intAid : workList){ + String strAid = "/gallery/" + intAid.getAnimation().getAid(); + aid.add(strAid); + } + + getAid(); + } + + public Collection getAid() { + return aid; + } + + public void setAid(ArrayList aid) { + this.aid = aid; + } +} diff --git a/src/main/java/org/ntlab/acanthus_server/models/Accounts.java b/src/main/java/org/ntlab/acanthus_server/models/Accounts.java index 52de49b..3aceea6 100644 --- a/src/main/java/org/ntlab/acanthus_server/models/Accounts.java +++ b/src/main/java/org/ntlab/acanthus_server/models/Accounts.java @@ -41,7 +41,7 @@ /** * @param uid ユーザーID */ - public Account getAccountByUid(int uid) { + public Account getAccountByUid(Integer uid) { return accountHashMap.get(uid); } diff --git a/src/main/java/org/ntlab/acanthus_server/models/Gallery.java b/src/main/java/org/ntlab/acanthus_server/models/Gallery.java index e155267..2ed3d3e 100644 --- a/src/main/java/org/ntlab/acanthus_server/models/Gallery.java +++ b/src/main/java/org/ntlab/acanthus_server/models/Gallery.java @@ -1,8 +1,14 @@ package org.ntlab.acanthus_server.models; +import org.ntlab.acanthus_server.entities.Account; import org.ntlab.acanthus_server.entities.Animation; import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.Random; + /* * 作品管理シングルトン @@ -13,13 +19,13 @@ private static Gallery theInstance = null; private HashMap animationHashMap = new HashMap<>(); - //シングルトン取得 - public static Gallery getInstance() { - if (theInstance == null) { - theInstance = new Gallery(); - } - return theInstance; + //シングルトン取得 + public static Gallery getInstance() { + if (theInstance == null) { + theInstance = new Gallery(); } + return theInstance; + } /*インスタンス生成を禁止するコンストラクタ*/ private Gallery(){ @@ -28,4 +34,17 @@ public HashMap getMap(){return animationHashMap;} -} + public Animation getAnimationInformation( Integer aid){return animationHashMap.get(aid);} + + public int registAnimation(String name, Account owner){ + var newAnimation = new Animation(name, owner); + var aid = new Random().nextInt(); + newAnimation.setAid(aid); + animationHashMap.put(aid,newAnimation); + return aid; + } + + public Animation getAnimationByAid(Integer aid) { + return animationHashMap.get(aid); + } +} \ No newline at end of file diff --git a/src/main/java/org/ntlab/acanthus_server/resources/accounts/AccountsRest.java b/src/main/java/org/ntlab/acanthus_server/resources/accounts/AccountsRest.java index 6ad0cbe..c8ac315 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/accounts/AccountsRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/accounts/AccountsRest.java @@ -2,11 +2,13 @@ import org.apache.catalina.loader.WebappClassLoader; import org.ntlab.acanthus_server.entities.Account; +import org.ntlab.acanthus_server.entities.AccountJson; import org.ntlab.acanthus_server.models.Accounts; import org.springframework.stereotype.Component; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; +import java.util.ArrayList; import java.util.Collection; @Component @@ -17,54 +19,82 @@ //----------------------------------------------------------------- // GET //----------------------------------------------------------------- - // すべてのアカウントを返す + // すべてのアカウント情報を返す + + /** + * @param name ユーザー名 + */ @GET @Produces(MediaType.APPLICATION_JSON) - public Collection getAccounts() { - return accounts.getAllAccounts(); + public Collection getAccounts(@QueryParam("name") String name) { + + var accountJsonList = new ArrayList(); + + // 名前の一致するアカウントを返す + if (name != null) { + for (var account : accounts.getAccountsByName(name)) { + var newAccountJson = new AccountJson(account); + accountJsonList.add(newAccountJson); + } + } + // 全アカウントの取得 + else{ + for (var account : accounts.getAllAccounts()) { + var newAccountJson = new AccountJson(account); + accountJsonList.add(newAccountJson); + } + } + return accountJsonList; } //----------------------------------------------------------------- - // UIdに一致するアカウントを返す - @GET - @Produces(MediaType.APPLICATION_JSON) - public Account getAccount(@QueryParam("uid") int uid) { - return accounts.getAccountByUid(uid); - } + // Uidで個人のアカウント情報を取得する + // 個人情報の開示をするので, トークンあり - //----------------------------------------------------------------- - // 名前が一致するアカウントをすべて返す. + /** + * @param uidStr ユーザーIDの文字列 + * @param token トークン + */ @GET + @Path("/{uid}") @Produces(MediaType.APPLICATION_JSON) - public Collection getAccounts(@QueryParam("name") String name) { - return accounts.getAccountsByName(name); + public Account getAccountByUid(@PathParam("uid") String uidStr, @QueryParam("token") String token) { + var uid = Integer.parseInt(uidStr); + var searchAccount = accounts.getAccountByUid(uid); + + if (!searchAccount.getUid().equals(uid)) throw new WebApplicationException(404); + if (!searchAccount.getToken().equals(token)) throw new WebApplicationException(400); + + return searchAccount; } //----------------------------------------------------------------- // POST //----------------------------------------------------------------- // アカウントの新規作成 + /** - * @param name ユーザー名 - * @param email メアド + * @param name ユーザー名 + * @param email メアド * @param password パスワード */ @POST @Produces(MediaType.APPLICATION_JSON) - public int createAccount(@FormParam("name") String name , @FormParam("email") String email, @FormParam("password") String password){ + public int createAccount(@FormParam("name") String name, @FormParam("email") String email, @FormParam("password") String password) { // password: 最低8文字以上の入力 var passMinLen = 8; - if(password.length() < passMinLen) throw new WebApplicationException(401); + if (password.length() < passMinLen) throw new WebApplicationException(401); // すでに同じメールアドレスが存在しているか var existAccount = accounts.getAccountByEmail(email); - if(existAccount != null) throw new WebApplicationException(400); + if (existAccount != null) throw new WebApplicationException(400); // アカウント登録 var newAccount = accounts.registerAccount(name, email, password); return newAccount.getUid(); } + //----------------------------------------------------------------- } diff --git a/src/main/java/org/ntlab/acanthus_server/resources/accounts/LoginRest.java b/src/main/java/org/ntlab/acanthus_server/resources/accounts/LoginRest.java index 1faf919..bce300e 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/accounts/LoginRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/accounts/LoginRest.java @@ -13,23 +13,25 @@ private Accounts accounts = Accounts.getInstance(); //----------------------------------------------------------- + /** * ログイン時のトークン認証 * アカウントが存在して, かつトークンを持っているかを確認する */ @GET @Produces(MediaType.APPLICATION_JSON) - public boolean hasLoginToken(@QueryParam("uid") int uid, @QueryParam("token") String token) { - + public boolean hasLoginToken(@QueryParam("uid") String uidStr, @QueryParam("token") String token) { + var uid = Integer.parseInt(uidStr); var searchAccount = accounts.getAccountByUid(uid); if (searchAccount == null) throw new WebApplicationException(404); if (!searchAccount.getToken().equals(token)) throw new WebApplicationException(400); - return true; + throw new WebApplicationException(200); } //----------------------------------------------------------- + /** * ログイン時, トークンをアカウントに発行させる * @@ -38,14 +40,15 @@ */ @PUT @Produces(MediaType.APPLICATION_JSON) - public void authenticateLoginToken(@FormParam("e-mail") String email, @FormParam("password") String password) { + public String issueLoginToken(@FormParam("email") String email, @FormParam("password") String password) { var searchAccount = accounts.getAccountByEmail(email); - if (searchAccount == null) throw new WebApplicationException(404); - if (searchAccount.isMatchedPassword(password)) throw new WebApplicationException(401); + if (searchAccount == null) throw new WebApplicationException(400); + if (!searchAccount.isMatchedPassword(password)) throw new WebApplicationException(401); searchAccount.updateToken(); + return searchAccount.getToken(); } //----------------------------------------------------------- diff --git a/src/main/java/org/ntlab/acanthus_server/resources/accounts/WorkRest.java b/src/main/java/org/ntlab/acanthus_server/resources/accounts/WorkRest.java index 1b8094a..14d7e3d 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/accounts/WorkRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/accounts/WorkRest.java @@ -1,26 +1,37 @@ package org.ntlab.acanthus_server.resources.accounts; +import org.ntlab.acanthus_server.entities.Account; +import org.ntlab.acanthus_server.entities.Animation; +import org.ntlab.acanthus_server.entities.Work; +import org.ntlab.acanthus_server.entities.WorkJson; import org.ntlab.acanthus_server.models.Accounts; +import org.ntlab.acanthus_server.models.Gallery; import org.springframework.stereotype.Component; import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; +import java.util.ArrayList; +import java.util.Collection; @Component @Path("/accounts") public class WorkRest { private Accounts accounts = Accounts.getInstance(); + private Gallery gallery = Gallery.getInstance(); //各ユーザーの作品を取得するメソッド @Path("/{uid}/work") @GET - public String getWork(@PathParam("uid") Integer uid, @QueryParam("token") String token) { + @Produces(MediaType.APPLICATION_JSON) + public WorkJson getWork(@PathParam("uid") Integer uid, @QueryParam("token") String token) { var account = accounts.getAccountByUid(uid); if(account != null && account.getToken().equals(token)){ //指定ユーザーの制作作品の表示 - return "account.getWork()"; + Collection workList = account.getWorkingList().values(); + return new WorkJson(workList); }else{ //ユーザーID、トークンが間違っている時のレスポンス throw new WebApplicationException(401); @@ -32,12 +43,20 @@ @Path("/{uid}/work") @POST - public String createWork(@PathParam("uid") Integer uid, @FormParam("token") String token){ + @Produces(MediaType.APPLICATION_JSON) + public Integer createWork(@PathParam("uid") Integer uid, @FormParam("token") String token){ var account = accounts.getAccountByUid(uid); if(account != null && account.getToken().equals(token)){ //指定ユーザーの新しい作品の追加 - return "fake2"; + String name = "aa"; + int newAid = gallery.registAnimation(name, account); + var animation = gallery.getAnimationInformation(newAid); + var newWork = new Work(); + newWork.setWork(); + newWork.setAnimation(animation); + account.addWork(newWork); + return newAid; }else{ //ユーザーID、トークンが間違っている時のレスポンス throw new WebApplicationException(401); @@ -49,6 +68,7 @@ @Path("/{uid}/work") @PUT + @Produces(MediaType.APPLICATION_JSON) public String updateWork(@PathParam("uid") Integer uid, @FormParam("token") String token, @FormParam("aid") Integer aid) { var account = accounts.getAccountByUid(uid); diff --git a/src/main/java/org/ntlab/acanthus_server/resources/gallery/GalleryRest.java b/src/main/java/org/ntlab/acanthus_server/resources/gallery/GalleryRest.java index 59f4a89..af5ada5 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/gallery/GalleryRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/gallery/GalleryRest.java @@ -1,12 +1,15 @@ package org.ntlab.acanthus_server.resources.gallery; +import org.ntlab.acanthus_server.entities.Account; import org.ntlab.acanthus_server.entities.Animation; +import org.ntlab.acanthus_server.models.Accounts; import org.ntlab.acanthus_server.models.Gallery; import org.springframework.stereotype.Component; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; +//import java.security.acl.Owner; import java.util.*; @Component @@ -21,14 +24,23 @@ @POST @Produces(MediaType.APPLICATION_JSON) - public void createAnimation(@FormParam("aid") Integer aid , @FormParam("name") String name ,@FormParam("token") String token){ + public Integer createAnimation(@FormParam("aid") Integer aid , @FormParam("name") String name ,@FormParam("token") String token ,@FormParam("uid") Integer uid){ - + Accounts accounts = Accounts.getInstance(); + Account Owner = accounts.getAccountByUid(uid); + return gallery.registAnimation(name, Owner); } - -} + @Path("/{aid}") + @GET + @Produces(MediaType.APPLICATION_JSON) + public Animation getAnimationInformation(@PathParam("aid") Integer aid){ + var searchAnimation =gallery.getAnimationInformation(aid); + return searchAnimation; + } + +} \ No newline at end of file diff --git a/src/main/java/org/ntlab/acanthus_server/resources/gallery/InvitesRest.java b/src/main/java/org/ntlab/acanthus_server/resources/gallery/InvitesRest.java index bca3267..53461f5 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/gallery/InvitesRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/gallery/InvitesRest.java @@ -1,6 +1,8 @@ package org.ntlab.acanthus_server.resources.gallery; +import org.ntlab.acanthus_server.entities.Account; import org.ntlab.acanthus_server.entities.Animation; +import org.ntlab.acanthus_server.models.Accounts; import org.ntlab.acanthus_server.models.Gallery; import org.springframework.stereotype.Component; @@ -12,18 +14,23 @@ @Path("/gallery") public class InvitesRest { - private Gallery animation = Gallery.getInstance(); + private Gallery animations = Gallery.getInstance(); @Path("/{aid}/invites") @GET @Produces(MediaType.APPLICATION_JSON) - public Collection isGalleryInvites(@PathParam("aid")Integer aid, @QueryParam("invitedUid") String invitedUid, @QueryParam("invitedUidToken") String invitedUserToken, @QueryParam("Token") String ownerToken) { + public Collection isGalleryInvites(@PathParam("aid")Integer aid, @QueryParam("invitedUid") String invitedUid, @QueryParam("invitedUidToken") String invitedUserToken, @QueryParam("Token") String ownerToken) { + Animation animation = animations.getAnimationByAid(aid); + + //トークンの確認 + if (invitedUid == null && invitedUserToken == null) { //招待した人を確認する - return null; - }else{ + return animation.getAnimationInvites(); + } + if(ownerToken == null){ //招待されているかを確認する - + return animation.searchAnimationInvites(aid, invitedUid, invitedUserToken); } return null; } @@ -32,7 +39,11 @@ @PUT @Produces(MediaType.APPLICATION_JSON) public String addInvite(@PathParam("aid")Integer aid, @FormParam("ownerUid") String ownerUid, @FormParam("invitedUid") String invitedUid) { + Animation animation = animations.getAnimationByAid(aid); + //トークンの確認 + + animation.addAccoutToAnimationInvites(aid,ownerUid,invitedUid); return "追加しました"; } @@ -43,6 +54,6 @@ public String deleteInvite(@PathParam("aid")Integer aid, @FormParam("invitedUid") String invitedUid, @FormParam("invitedToken") String invitedToken) { - return "追加しました"; + return "削除しました"; } -} +} \ No newline at end of file diff --git a/src/main/java/org/ntlab/acanthus_server/resources/gallery/LayersRest.java b/src/main/java/org/ntlab/acanthus_server/resources/gallery/LayersRest.java index 911b322..899e920 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/gallery/LayersRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/gallery/LayersRest.java @@ -1,5 +1,7 @@ package org.ntlab.acanthus_server.resources.gallery; +import org.ntlab.acanthus_server.entities.Position; +import org.ntlab.acanthus_server.models.Gallery; import org.springframework.stereotype.Component; import javax.ws.rs.*; @@ -14,17 +16,11 @@ * 指定したレイヤー情報(順番、枚数)を獲得 * @PathParam Integer aid 作品ID */ - @Path("/{aid}/pageMap/0/layers/0") @GET @Produces(MediaType.APPLICATION_JSON) public ArrayList getLayersRest(@PathParam("aid") Integer aid) { return null; - /* if() { - - } - */ -/**/ } } diff --git a/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java b/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java index 8b9bfe6..321f21b 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java @@ -1,11 +1,13 @@ package org.ntlab.acanthus_server.resources.gallery; - import org.springframework.stereotype.Component; +import org.ntlab.acanthus_server.entities.Position; +import org.ntlab.acanthus_server.models.Gallery; +import org.springframework.stereotype.Component; - import javax.ws.rs.*; - import javax.ws.rs.core.MediaType; - import java.util.ArrayList; - import java.util.Optional; +import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; +import java.util.ArrayList; +import java.util.Collection; @Component @Path("/gallery") @@ -20,7 +22,6 @@ * @Formparam Integer color 色情報 * @Formparam Integer thick 太さ情報 */ - @Path("/{aid}/pageMap/0/layers/0/strokes") @POST @Produces(MediaType.APPLICATION_JSON) @@ -34,11 +35,10 @@ * @PathParam Integer aid 作品のID * @PathParam Integer strokeNo 線番号 */ - @Path("/{aid}/pageMap/0/layers/0/strokes/{strokeNo}/position") @GET @Produces(MediaType.APPLICATION_JSON) - public ArrayList getPositions(@PathParam("aid") Integer aid, @PathParam("strokeNo") Integer strokeNo) { + public String getPositions(@PathParam("aid") Integer aid, @PathParam("strokeNo") Integer strokeNo) { return null; } @@ -48,7 +48,6 @@ * @FormParam Integer x x座標 * @FormParam Integer y y座標 */ - @Path("/{aid}/pageMap/0/layers/0/strokes/{strokeNo}/position") @POST @Produces(MediaType.APPLICATION_JSON)