@@ -0,0 +1,3421 @@
+package net.etalia.client.services;%0A%0Aimport java.util.Map;%0A%0Aimport net.etalia.client.domain.Article;%0Aimport net.etalia.client.domain.Publication;%0Aimport net.etalia.client.domain.StampArticle;%0Aimport net.etalia.client.domain.User;%0A%0Aimport org.springframework.http.HttpStatus;%0Aimport org.springframework.stereotype.Controller;%0Aimport org.springframework.web.bind.annotation.PathVariable;%0Aimport org.springframework.web.bind.annotation.RequestBody;%0Aimport org.springframework.web.bind.annotation.RequestHeader;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RequestMethod;%0Aimport org.springframework.web.bind.annotation.ResponseBody;%0Aimport org.springframework.web.bind.annotation.ResponseStatus;%0A%0A@Controller%0Apublic interface ContentApi %7B%0A%0A%09// ========== USER ==========%0A%0A%09/**%0A%09 * Logs a user in, based on HTTP Header%0A%09 * %3Ccode%3EAuthorization: Etalia_%3Cemail%3E%3C/code%3E%0A%09 * %0A%09 * @return the User that has been logged in, in extradata.auth there is the authentication string to use%0A%09 */%0A%09@RequestMapping(value=%22/user%22, method=RequestMethod.GET)%0A%09public @ResponseBody User authUser(@RequestHeader(%22Authorization%22) String authorization);%0A%0A%09/**%0A%09 * Logs a user in, based on HTTP Header%0A%09 * %3Ccode%3EFBAuthorization: FB_AUTH_TOKEN%3C/code%3E%0A%09 * %0A%09 * @return the User that has been logged in, in extradata.auth there is the authentication string to use%0A%09 */%0A%09@RequestMapping(value=%22/user/fb%22, method=RequestMethod.GET)%0A%09public @ResponseBody User authFBUser(@RequestHeader(%22Authorization%22) String authorization);%0A%0A%09// ========== ARTICLE ==========%0A%0A%09/**%0A%09 * Create a new content article, %0A%09 * @param article%0A%09 * @return%0A%09 */%0A%09@RequestMapping(value=%22/content/article%22, method=RequestMethod.POST)%0A%09public @ResponseBody @ResponseStatus(HttpStatus.CREATED) Article addArticle(@RequestBody Article article);%0A%0A%09@RequestMapping(value=%22/content/article/%7Bid%7D%22, method=RequestMethod.GET)%0A%09public @ResponseBody Article getArticle(@PathVariable(value=%22id%22) String articleId);%0A%0A%09@RequestMapping(value=%22/content/article/%7BarticleId%7D%22, method=RequestMethod.PUT)%0A%09public @ResponseBody @ResponseStatus(HttpStatus.NO_CONTENT) void updateArticle(@RequestBody Article article);%0A%0A%09@RequestMapping(value=%22/content/article/%7BarticleId%7D%22, method=RequestMethod.DELETE)%0A%09public @ResponseBody @ResponseStatus(HttpStatus.NO_CONTENT) void removeArticle(@PathVariable String articleId);%0A%0A%09// ========== PUBLICATION ==========%0A%0A%09@RequestMapping(value=%22/publication%22, method=RequestMethod.POST)%0A%09public @ResponseBody @ResponseStatus(HttpStatus.CREATED) Publication addPublication(@RequestBody Publication publication);%0A%0A%09@RequestMapping(value=%22/publication/%7Bid%7D%22, method=RequestMethod.GET)%0A%09public @ResponseBody Publication getPublication(@PathVariable(%22id%22) String publicationId);%0A%0A%09@RequestMapping(value=%22/publication/%7Bid%7D%22, method=RequestMethod.PUT)%0A%09public @ResponseBody @ResponseStatus(HttpStatus.NO_CONTENT) void updatePublication(@RequestBody Publication publication);%0A%0A%09@RequestMapping(value=%22/publication/%7Bid%7D%22, method=RequestMethod.DELETE)%0A%09public @ResponseStatus(HttpStatus.NO_CONTENT) void removePublication(@PathVariable(%22id%22) String publicationId);%0A%0A%09// ========== STAMP ==========%0A%0A%09@RequestMapping(value=%22/user/%7BuserId%7D/stampArticle%22, method=RequestMethod.POST)%0A%09public @ResponseBody @ResponseStatus(HttpStatus.CREATED) StampArticle addStampArticle(@RequestBody Map%3CString, String%3E newStamp);%0A%0A%7D%0A

Add ContentApi interface