Class WebdavEndPointFilesController

java.lang.Object
io.jmix.webdavrest.controller.WebdavEndPointFilesController

@RestController("webdav_WebdavEndPointFilesController") @RequestMapping("/webdav/files/**") public class WebdavEndPointFilesController extends Object
Controller for working with files as a catalogue structure.

Allows to create document collections, put files into collections, etc.

  • Field Details

  • Constructor Details

    • WebdavEndPointFilesController

      public WebdavEndPointFilesController(org.springframework.web.context.WebApplicationContext webApplicationContext)
  • Method Details

    • getResourceUri

      @ModelAttribute("resourceUri") public ResourceUri getResourceUri(jakarta.servlet.http.HttpServletRequest request)
    • createDocumentCollection

      @MkcolMapping public void createDocumentCollection(@ModelAttribute ResourceUri resourceUri, jakarta.servlet.http.HttpServletResponse response, InputStream requestBody) throws IOException
      Throws:
      IOException
    • uploadOrUpdateDocument

      @PutMapping public void uploadOrUpdateDocument(@ModelAttribute ResourceUri resourceUri, @RequestParam(required=false) Boolean versioning, jakarta.servlet.http.HttpServletResponse response, InputStream requestBody)
    • copyDocument

      @CopyMapping public org.springframework.http.ResponseEntity<Void> copyDocument(jakarta.servlet.http.HttpServletRequest request, @ModelAttribute ResourceUri resourceUri, @RequestHeader(name="Destination") String destination, @RequestHeader(name="Overwrite",required=false) String overwrite, @RequestHeader(name="Depth",required=false) String depth)
    • moveDocument

      @MoveMapping public org.springframework.http.ResponseEntity<Void> moveDocument(jakarta.servlet.http.HttpServletRequest request, @ModelAttribute ResourceUri resourceUri, @RequestHeader(name="Destination") String destination, @RequestHeader(name="Overwrite",required=false) String overwrite, @RequestHeader(name="Depth",required=false) String depth)
    • retrieveDocument

      @GetMapping public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> retrieveDocument(@ModelAttribute ResourceUri resourceUri, @RequestHeader(name="If-None-Match",required=false) String ifNoneMatchHeader)
    • retrieveOptions

      @OptionsMapping public void retrieveOptions(@ModelAttribute ResourceUri resourceUri, jakarta.servlet.http.HttpServletResponse response)
    • removeDocument

      @DeleteMapping public org.springframework.http.ResponseEntity<Void> removeDocument(@ModelAttribute ResourceUri resourceUri)
    • lockResource

      @LockMapping public org.springframework.http.ResponseEntity<LockInfoWithResourceUri> lockResource(@ModelAttribute ResourceUri resourceUri, @RequestHeader(name="If",required=false) String headerIf, @RequestBody(required=false) LockRequestPredicate lockRequestPredicate)
    • unlockResource

      @UnLockMapping public org.springframework.http.ResponseEntity<Void> unlockResource(@ModelAttribute ResourceUri resourceUri, @RequestHeader(name="Lock-Token") String lockTokenHeader)
    • retrieveMetadata

      @PropFindMapping public org.springframework.http.ResponseEntity<PropFindMultipleResponseObject> retrieveMetadata(@ModelAttribute ResourceUri resourceUri, @RequestHeader(name="Depth") String depth, @RequestBody(required=false) PropFindPropertiesList requestProperties)
    • updateMetadata

      @PropPatchMapping public org.springframework.http.ResponseEntity<PropPatchResponseObject> updateMetadata(@ModelAttribute ResourceUri resourceUri, @RequestBody(required=false) PropPatchPropertiesList requestProperties)
    • extractRequestedResourcePath

      protected URI extractRequestedResourcePath(String pathWithinHandlerMapping, jakarta.servlet.http.HttpServletRequest request)
      Extracts requested resource URI (i.e. from '/webdav/files/**' returns matched '**').

      Space characters are encoded as "%20". Resulting path does not have a trailing slash.

    • withWebContextBean

      protected <T, R> R withWebContextBean(Class<T> beanClass, Function<? super T,? extends R> applier)