Class ProjectController


  • @RestController
    @Api(description="The project controller",
         name="Project controller")
    public class ProjectController
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ProjectController​(de.digitalcollections.cudami.server.business.api.service.identifiable.entity.ProjectService projectService)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.Project> findAll​(int pageNumber, int pageSize, java.lang.String sortField, de.digitalcollections.model.api.paging.enums.Direction sortDirection, de.digitalcollections.model.api.paging.enums.NullHandling nullHandling)  
      org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.Project> getWebpage​(java.util.UUID uuid, java.util.Locale pLocale)  
      de.digitalcollections.model.api.identifiable.entity.Project save​(de.digitalcollections.model.api.identifiable.entity.Project project, org.springframework.validation.BindingResult errors)  
      de.digitalcollections.model.api.identifiable.entity.Project update​(java.util.UUID uuid, de.digitalcollections.model.api.identifiable.entity.Project project, org.springframework.validation.BindingResult errors)  
      • Methods inherited from class java.lang.Object

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

      • ProjectController

        @Autowired
        public ProjectController​(de.digitalcollections.cudami.server.business.api.service.identifiable.entity.ProjectService projectService)
    • Method Detail

      • findAll

        @ApiMethod(description="Get all projects")
        @RequestMapping(value={"/latest/projects","/v2/projects"},
                        produces="application/json",
                        method=GET)
        @ApiResponseObject
        public de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.Project> findAll​(@RequestParam(name="pageNumber",required=false,defaultValue="0")
                                                                                                                                        int pageNumber,
                                                                                                                                        @RequestParam(name="pageSize",required=false,defaultValue="5")
                                                                                                                                        int pageSize,
                                                                                                                                        @RequestParam(name="sortField",required=false,defaultValue="uuid")
                                                                                                                                        java.lang.String sortField,
                                                                                                                                        @RequestParam(name="sortDirection",required=false,defaultValue="ASC")
                                                                                                                                        de.digitalcollections.model.api.paging.enums.Direction sortDirection,
                                                                                                                                        @RequestParam(name="nullHandling",required=false,defaultValue="NATIVE")
                                                                                                                                        de.digitalcollections.model.api.paging.enums.NullHandling nullHandling)
      • getWebpage

        @ApiMethod(description="Get an project as JSON or XML, depending on extension or <tt>format</tt> request parameter or accept header")
        @RequestMapping(value={"/latest/projects/{uuid}","/v2/projects/{uuid}"},
                        produces={"application/json","application/xml"},
                        method=GET)
        @ApiResponseObject
        public org.springframework.http.ResponseEntity<de.digitalcollections.model.api.identifiable.entity.Project> getWebpage​(@ApiPathParam(description="UUID of the project, 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 de.digitalcollections.cudami.server.business.api.service.exceptions.IdentifiableServiceException
        Throws:
        de.digitalcollections.cudami.server.business.api.service.exceptions.IdentifiableServiceException
      • save

        @ApiMethod(description="Save a newly created project")
        @RequestMapping(value={"/latest/projects","/v2/projects"},
                        produces="application/json",
                        method=POST)
        @ApiResponseObject
        public de.digitalcollections.model.api.identifiable.entity.Project save​(@RequestBody
                                                                                de.digitalcollections.model.api.identifiable.entity.Project project,
                                                                                org.springframework.validation.BindingResult errors)
                                                                         throws de.digitalcollections.cudami.server.business.api.service.exceptions.IdentifiableServiceException
        Throws:
        de.digitalcollections.cudami.server.business.api.service.exceptions.IdentifiableServiceException
      • update

        @ApiMethod(description="Update an project")
        @RequestMapping(value={"/latest/projects/{uuid}","/v2/projects/{uuid}"},
                        produces="application/json",
                        method=PUT)
        @ApiResponseObject
        public de.digitalcollections.model.api.identifiable.entity.Project update​(@PathVariable
                                                                                  java.util.UUID uuid,
                                                                                  @RequestBody
                                                                                  de.digitalcollections.model.api.identifiable.entity.Project project,
                                                                                  org.springframework.validation.BindingResult errors)
                                                                           throws de.digitalcollections.cudami.server.business.api.service.exceptions.IdentifiableServiceException
        Throws:
        de.digitalcollections.cudami.server.business.api.service.exceptions.IdentifiableServiceException