Package io.jmix.webdavrest.controller
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 Summary
-
Constructor Summary
ConstructorDescriptionWebdavEndPointFilesController
(org.springframework.web.context.WebApplicationContext webApplicationContext) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void>
copyDocument
(jakarta.servlet.http.HttpServletRequest request, ResourceUri resourceUri, String destination, String overwrite, String depth) void
createDocumentCollection
(ResourceUri resourceUri, jakarta.servlet.http.HttpServletResponse response, InputStream requestBody) protected URI
extractRequestedResourcePath
(String pathWithinHandlerMapping, jakarta.servlet.http.HttpServletRequest request) Extracts requested resource URI (i.e.getResourceUri
(jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<LockInfoWithResourceUri>
lockResource
(ResourceUri resourceUri, String headerIf, LockRequestPredicate lockRequestPredicate) org.springframework.http.ResponseEntity<Void>
moveDocument
(jakarta.servlet.http.HttpServletRequest request, ResourceUri resourceUri, String destination, String overwrite, String depth) org.springframework.http.ResponseEntity<Void>
removeDocument
(ResourceUri resourceUri) org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>
retrieveDocument
(ResourceUri resourceUri, String ifNoneMatchHeader) org.springframework.http.ResponseEntity<PropFindMultipleResponseObject>
retrieveMetadata
(ResourceUri resourceUri, String depth, PropFindPropertiesList requestProperties) void
retrieveOptions
(ResourceUri resourceUri, jakarta.servlet.http.HttpServletResponse response) org.springframework.http.ResponseEntity<Void>
unlockResource
(ResourceUri resourceUri, String lockTokenHeader) org.springframework.http.ResponseEntity<PropPatchResponseObject>
updateMetadata
(ResourceUri resourceUri, PropPatchPropertiesList requestProperties) void
uploadOrUpdateDocument
(ResourceUri resourceUri, Boolean versioning, jakarta.servlet.http.HttpServletResponse response, InputStream requestBody) protected <T,
R> R withWebContextBean
(Class<T> beanClass, Function<? super T, ? extends R> applier)
-
Field Details
-
DEPTH
- See Also:
-
DESTINATION
- See Also:
-
OVERWRITE
- See Also:
-
LOCK_TOKEN
- See Also:
-
webApplicationContext
protected org.springframework.web.context.WebApplicationContext webApplicationContext
-
-
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
-