java.lang.Object
de.digitalcollections.cudami.server.controller.identifiable.entity.ArticleController

@RestController
@Api(description="The article controller",
     name="Article controller")
public class ArticleController
extends java.lang.Object
  • Constructor Summary

    Constructors
    Constructor Description
    ArticleController()  
  • Method Summary

    Modifier and Type Method Description
    de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.Article> findAll​(int pageNumber, int pageSize, java.util.List<de.digitalcollections.model.api.paging.Order> sortBy)  
    org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.Article> getArticle​(java.util.UUID uuid, java.util.Locale pLocale)  
    de.digitalcollections.model.api.identifiable.entity.Article save​(de.digitalcollections.model.api.identifiable.entity.Article article, org.springframework.validation.BindingResult errors)  
    de.digitalcollections.model.api.identifiable.entity.Article update​(java.util.UUID uuid, de.digitalcollections.model.api.identifiable.entity.Article article, org.springframework.validation.BindingResult errors)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ArticleController

      public ArticleController()
  • Method Details

    • findAll

      @ApiMethod(description="Get all articles") @GetMapping(value={"/latest/articles","/v2/articles"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.Article> findAll​(@RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="25") int pageSize, @RequestParam(name="sortBy",required=false) java.util.List<de.digitalcollections.model.api.paging.Order> sortBy)
    • getArticle

      @ApiMethod(description="Get an article as JSON or XML, depending on extension or <tt>format</tt> request parameter or accept header") @GetMapping(value={"/latest/articles/{uuid}","/v2/articles/{uuid}"}, produces={"application/json","application/xml"}) @ApiResponseObject public org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.Article> getArticle​(@ApiPathParam(description="UUID of the article, e.g. <tt>599a120c-2dd5-11e8-b467-0ed5f89f718b</tt>") @PathVariable("uuid") java.util.UUID uuid, @ApiQueryParam(name="pLocale",description="Desired locale, e.g. <tt>de_DE</tt>. If unset, contents in all languages will be returned") @RequestParam(name="pLocale",required=false) java.util.Locale pLocale) throws IdentifiableServiceException
      Throws:
      IdentifiableServiceException
    • save

      @ApiMethod(description="Save a newly created article") @PostMapping(value={"/latest/articles","/v2/articles"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.Article save​(@RequestBody de.digitalcollections.model.api.identifiable.entity.Article article, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException
      Throws:
      IdentifiableServiceException
    • update

      @ApiMethod(description="Update an article") @PutMapping(value={"/latest/articles/{uuid}","/v2/articles/{uuid}"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.Article update​(@PathVariable java.util.UUID uuid, @RequestBody de.digitalcollections.model.api.identifiable.entity.Article article, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException
      Throws:
      IdentifiableServiceException