Class FileResourcesController

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.MessageSourceAware

    @Controller
    @SessionAttributes("fileresource")
    public class FileResourcesController
    extends de.digitalcollections.commons.springmvc.controller.AbstractController
    implements org.springframework.context.MessageSourceAware
    Controller for resource management pages.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String create​(@Valid de.digitalcollections.model.impl.identifiable.resource.FileResourceImpl fileResource, org.springframework.validation.BindingResult results, org.springframework.web.multipart.MultipartFile file, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)  
      java.lang.String create​(org.springframework.ui.Model model)  
      java.lang.String edit​(java.util.UUID pathUuid, @Valid de.digitalcollections.model.impl.identifiable.resource.FileResourceImpl fileResource, org.springframework.validation.BindingResult results, org.springframework.ui.Model model, org.springframework.web.bind.support.SessionStatus status, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)  
      java.lang.String edit​(java.util.UUID uuid, org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)  
      java.lang.String list​(org.springframework.ui.Model model, org.springframework.data.domain.Pageable pageable)  
      void setMessageSource​(org.springframework.context.MessageSource messageSource)  
      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 Detail

      • FileResourcesController

        public FileResourcesController()
    • Method Detail

      • setMessageSource

        @Autowired
        public void setMessageSource​(org.springframework.context.MessageSource messageSource)
        Specified by:
        setMessageSource in interface org.springframework.context.MessageSourceAware
      • list

        @GetMapping("/fileresources")
        public java.lang.String list​(org.springframework.ui.Model model,
                                     @PageableDefault(sort="label",size=25)
                                     org.springframework.data.domain.Pageable pageable)
      • create

        @GetMapping("/fileresources/new")
        public java.lang.String create​(org.springframework.ui.Model model)
      • create

        @PostMapping("/fileresources/new")
        public java.lang.String create​(@ModelAttribute @Valid
                                       @Valid de.digitalcollections.model.impl.identifiable.resource.FileResourceImpl fileResource,
                                       org.springframework.validation.BindingResult results,
                                       @RequestParam("file")
                                       org.springframework.web.multipart.MultipartFile file,
                                       org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
      • view

        @GetMapping("/fileresources/{uuid}")
        public java.lang.String view​(@PathVariable
                                     java.util.UUID uuid,
                                     org.springframework.ui.Model model)
      • edit

        @GetMapping("/fileresources/{uuid}/edit")
        public java.lang.String edit​(@PathVariable
                                     java.util.UUID uuid,
                                     org.springframework.ui.Model model,
                                     org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
      • edit

        @PostMapping("/fileresources/{pathUuid}/edit")
        public java.lang.String edit​(@PathVariable
                                     java.util.UUID pathUuid,
                                     @ModelAttribute @Valid
                                     @Valid de.digitalcollections.model.impl.identifiable.resource.FileResourceImpl fileResource,
                                     org.springframework.validation.BindingResult results,
                                     org.springframework.ui.Model model,
                                     org.springframework.web.bind.support.SessionStatus status,
                                     org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)