Class ProjectController
- java.lang.Object
-
- de.digitalcollections.cudami.server.controller.identifiable.entity.ProjectController
-
@RestController @Api(description="The project controller", name="Project controller") public class ProjectController extends Object
-
-
Constructor Summary
Constructors Constructor Description ProjectController(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, 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(UUID uuid, Locale pLocale)de.digitalcollections.model.api.identifiable.entity.Projectsave(de.digitalcollections.model.api.identifiable.entity.Project project, org.springframework.validation.BindingResult errors)de.digitalcollections.model.api.identifiable.entity.Projectupdate(UUID uuid, de.digitalcollections.model.api.identifiable.entity.Project project, org.springframework.validation.BindingResult errors)
-
-
-
Constructor Detail
-
ProjectController
@Autowired public ProjectController(ProjectService projectService)
-
-
Method Detail
-
findAll
@ApiMethod(description="Get all projects") @GetMapping(value={"/latest/projects","/v2/projects"}, produces="application/json") @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") 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") @GetMapping(value={"/latest/projects/{uuid}","/v2/projects/{uuid}"}, produces={"application/json","application/xml"}) @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") 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) Locale pLocale) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
save
@ApiMethod(description="Save a newly created project") @PostMapping(value={"/latest/projects","/v2/projects"}, produces="application/json") @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 IdentifiableServiceException- Throws:
IdentifiableServiceException
-
update
@ApiMethod(description="Update an project") @PutMapping(value={"/latest/projects/{uuid}","/v2/projects/{uuid}"}, produces="application/json") @ApiResponseObject public de.digitalcollections.model.api.identifiable.entity.Project update(@PathVariable UUID uuid, @RequestBody de.digitalcollections.model.api.identifiable.entity.Project project, org.springframework.validation.BindingResult errors) throws IdentifiableServiceException- Throws:
IdentifiableServiceException
-
-