diff --git a/wrapper/src/main/java/wekan/wrapper/api/BoardService.java b/wrapper/src/main/java/wekan/wrapper/api/BoardService.java index 3842d2f..4f84e4d 100644 --- a/wrapper/src/main/java/wekan/wrapper/api/BoardService.java +++ b/wrapper/src/main/java/wekan/wrapper/api/BoardService.java @@ -22,7 +22,7 @@ public interface BoardService { Call deleteBoard(@Path("boardId") String boardId); @POST("/api/boards/{boardId}/members/{memberId}") - Call setBoardMemberPermission( + Call setMemberPermission( @Path("boardId") String board, @Path("memberId") String member, @Body MemberPermission memberPermission diff --git a/wrapper/src/main/java/wekan/wrapper/entity/Board.java b/wrapper/src/main/java/wekan/wrapper/entity/Board.java index 10beb0a..a082b4f 100644 --- a/wrapper/src/main/java/wekan/wrapper/entity/Board.java +++ b/wrapper/src/main/java/wekan/wrapper/entity/Board.java @@ -16,7 +16,8 @@ public class Board { // TODO list of labels // TODO list of members private Permission permission; - private Color color; + @SerializedName("color") + private BoardBackgroundColor backgroundColor; private String description; private String subtasksDefaultBoardId; private String subtasksDefaultListId; @@ -62,8 +63,8 @@ public class Board { return permission; } - public Color getColor() { - return color; + public BoardBackgroundColor getBackgroundColor() { + return backgroundColor; } public String getDescription() { @@ -125,7 +126,7 @@ public class Board { ", modifiedAt=" + modifiedAt + ", starts=" + starts + ", permission=" + permission + - ", color=" + color + + ", color=" + backgroundColor + ", description='" + description + '\'' + ", subtasksDefaultBoardId='" + subtasksDefaultBoardId + '\'' + ", subtasksDefaultListId='" + subtasksDefaultListId + '\'' + diff --git a/wrapper/src/main/java/wekan/wrapper/entity/Color.java b/wrapper/src/main/java/wekan/wrapper/entity/BoardBackgroundColor.java similarity index 94% rename from wrapper/src/main/java/wekan/wrapper/entity/Color.java rename to wrapper/src/main/java/wekan/wrapper/entity/BoardBackgroundColor.java index c211fb8..cc71175 100644 --- a/wrapper/src/main/java/wekan/wrapper/entity/Color.java +++ b/wrapper/src/main/java/wekan/wrapper/entity/BoardBackgroundColor.java @@ -2,7 +2,7 @@ package wekan.wrapper.entity; import com.google.gson.annotations.SerializedName; -public enum Color { +public enum BoardBackgroundColor { @SerializedName("belize") BELIZE, @SerializedName("nephritis") diff --git a/wrapper/src/main/java/wekan/wrapper/entity/BoardPrototype.java b/wrapper/src/main/java/wekan/wrapper/entity/BoardPrototype.java index 4766382..97afb56 100644 --- a/wrapper/src/main/java/wekan/wrapper/entity/BoardPrototype.java +++ b/wrapper/src/main/java/wekan/wrapper/entity/BoardPrototype.java @@ -1,5 +1,7 @@ package wekan.wrapper.entity; +import com.google.gson.annotations.SerializedName; + public class BoardPrototype { private String title; private String owner; @@ -8,7 +10,8 @@ public class BoardPrototype { private boolean isNoComments; private boolean isCommentOnly; private Permission permission; - private Color color; + @SerializedName("color") + private BoardBackgroundColor backgroundColor; private BoardPrototype( String title, @@ -18,7 +21,7 @@ public class BoardPrototype { boolean isNoComments, boolean isCommentOnly, Permission permission, - Color color + BoardBackgroundColor backgroundColor ) { this.title = title; this.owner = owner; @@ -27,7 +30,7 @@ public class BoardPrototype { this.isNoComments = isNoComments; this.isCommentOnly = isCommentOnly; this.permission = permission; - this.color = color; + this.backgroundColor = backgroundColor; } public static class Builder { @@ -38,7 +41,7 @@ public class BoardPrototype { private boolean isNoComments = false; private boolean isCommentOnly = false; private Permission permission = Permission.PRIVATE; - private Color color = Color.BELIZE; + private BoardBackgroundColor backgroundColor = BoardBackgroundColor.BELIZE; public Builder() { } @@ -52,7 +55,7 @@ public class BoardPrototype { isNoComments, isCommentOnly, permission, - color + backgroundColor ); } @@ -91,8 +94,8 @@ public class BoardPrototype { return this; } - public Builder setColor(Color color) { - this.color = color; + public Builder setBackgroundColor(BoardBackgroundColor backgroundColor) { + this.backgroundColor = backgroundColor; return this; } } diff --git a/wrapper/src/test/java/wekan/wrapper/api/BoardServiceTest.java b/wrapper/src/test/java/wekan/wrapper/api/BoardServiceTest.java index 5ea31c7..78d57fc 100644 --- a/wrapper/src/test/java/wekan/wrapper/api/BoardServiceTest.java +++ b/wrapper/src/test/java/wekan/wrapper/api/BoardServiceTest.java @@ -118,7 +118,7 @@ public class BoardServiceTest { assertFalse(board.isArchived()); assertEquals(0, board.getStarts()); assertEquals(Permission.PRIVATE, board.getPermission()); - assertEquals(Color.CORTEZA, board.getColor()); + assertEquals(BoardBackgroundColor.CORTEZA, board.getBackgroundColor()); assertTrue(board.isAllowsSubtasks()); assertEquals(PresentParentTask.NO_PARENT, board.getPresentParentTask()); assertEquals(0, board.getSpentTime());