Class FileResourcesMetadataController
java.lang.Object
de.digitalcollections.commons.springmvc.controller.AbstractController
de.digitalcollections.cudami.admin.controller.identifiable.resource.FileResourcesMetadataController
@Controller
public class FileResourcesMetadataController
extends de.digitalcollections.commons.springmvc.controller.AbstractController
Controller for resource management pages.
-
Constructor Summary
Constructors Constructor Description FileResourcesMetadataController(LanguageSortingHelper languageSortingHelper, CudamiClient cudamiClient)
-
Method Summary
Modifier and Type Method Description de.digitalcollections.model.api.identifiable.resource.FileResource
create()
java.lang.String
create(org.springframework.ui.Model model)
java.lang.String
edit(java.util.UUID uuid, java.util.Locale activeLanguage, org.springframework.ui.Model model)
de.digitalcollections.model.api.identifiable.resource.FileResource
get(java.util.UUID uuid)
java.lang.String
list(org.springframework.ui.Model model, org.springframework.data.domain.Pageable pageable)
protected java.lang.String
module()
org.springframework.http.ResponseEntity
save(de.digitalcollections.model.api.identifiable.resource.FileResource fileResource)
de.digitalcollections.model.api.paging.SearchPageResponse<de.digitalcollections.model.impl.identifiable.resource.FileResourceImpl>
searchFileResourcesByType(java.lang.String type, int pageNumber, int pageSize, java.lang.String sortField, de.digitalcollections.model.api.paging.enums.Direction sortDirection, java.lang.String searchTerm)
org.springframework.http.ResponseEntity
update(java.util.UUID uuid, de.digitalcollections.model.api.identifiable.resource.FileResource fileResource)
java.lang.String
view(java.util.UUID uuid, org.springframework.ui.Model model)
Methods inherited from class de.digitalcollections.commons.springmvc.controller.AbstractController
verifyBinding
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
FileResourcesMetadataController
@Autowired public FileResourcesMetadataController(LanguageSortingHelper languageSortingHelper, CudamiClient cudamiClient)
-
-
Method Details
-
module
@ModelAttribute("menu") protected java.lang.String module() -
create
@GetMapping("/fileresources/new") public java.lang.String create(org.springframework.ui.Model model) throws HttpException- Throws:
HttpException
-
create
@GetMapping("/api/fileresources/new") @ResponseBody public de.digitalcollections.model.api.identifiable.resource.FileResource create() -
edit
@GetMapping("/fileresources/{uuid}/edit") public java.lang.String edit(@PathVariable java.util.UUID uuid, @RequestParam(name="activeLanguage",required=false) java.util.Locale activeLanguage, org.springframework.ui.Model model) throws HttpException- Throws:
HttpException
-
get
@GetMapping("/api/fileresources/{uuid}") @ResponseBody public de.digitalcollections.model.api.identifiable.resource.FileResource get(@PathVariable java.util.UUID uuid) throws HttpException- Throws:
HttpException
-
list
@GetMapping("/fileresources") public java.lang.String list(org.springframework.ui.Model model, @PageableDefault(sort="filename",direction=ASC,size=25) org.springframework.data.domain.Pageable pageable) throws HttpException- Throws:
HttpException
-
save
@PostMapping("/api/fileresources/new") public org.springframework.http.ResponseEntity save(@RequestBody de.digitalcollections.model.api.identifiable.resource.FileResource fileResource) -
searchFileResourcesByType
@GetMapping("/api/fileresources/type/{type}") @ResponseBody public de.digitalcollections.model.api.paging.SearchPageResponse<de.digitalcollections.model.impl.identifiable.resource.FileResourceImpl> searchFileResourcesByType(@PathVariable java.lang.String type, @RequestParam(name="pageNumber",required=false,defaultValue="0") int pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="5") int pageSize, @RequestParam(name="sortField",required=false) java.lang.String sortField, @RequestParam(name="sortDirection",required=false) de.digitalcollections.model.api.paging.enums.Direction sortDirection, @RequestParam(name="searchTerm",required=false) java.lang.String searchTerm) throws HttpException- Throws:
HttpException
-
update
@PutMapping("/api/fileresources/{uuid}") public org.springframework.http.ResponseEntity update(@PathVariable java.util.UUID uuid, @RequestBody de.digitalcollections.model.api.identifiable.resource.FileResource fileResource) -
view
@GetMapping("/fileresources/{uuid}") public java.lang.String view(@PathVariable java.util.UUID uuid, org.springframework.ui.Model model) throws HttpException- Throws:
HttpException
-