1 package info.ejava.examples.jaxrs.todos.client;
2
3 import javax.ws.rs.core.Response;
4
5 import info.ejava.examples.jaxrs.todos.dto.TodoItemDTO;
6 import info.ejava.examples.jaxrs.todos.dto.TodoListDTO;
7
8 public interface TodosJaxRsClient {
9 static String APPLICATION_PATH = "api";
10 static String TODO_LISTS_PATH = "todo_lists";
11 static String TODO_LIST_PATH = "todo_lists/{listName}";
12 static String TODO_ITEMS_PATH = "todo_items";
13 static String TODO_ITEM_PATH = "todo_items/{itemName}";
14 static final String OFFSET = "offset";
15 static final String LIMIT = "limit";
16 static final String NAME_PARAM = "name";
17
18 Response createTodoList(TodoListDTO todoList);
19 Response getTodoLists(Integer offset, Integer limit);
20 Response getTodoList(String listName);
21 Response deleteTodoList(String listName);
22 Response renameTodoList(String oldName, String newName);
23
24 Response addTodoItem(String listName, TodoItemDTO item);
25 Response updateTodoItem(String listName, TodoItemDTO item);
26 Response deleteTodoItem(String listName, String itemName);
27
28 Response deleteAll();
29 }