Package io.jmix.webdavrest.controller
Class WebdavEndPointTokenDocumentController
java.lang.Object
io.jmix.webdavrest.controller.WebdavEndPointTokenDocumentController
@Controller
@RequestMapping({"/webdav/{sessionToken}/document/{resourceId}/{resourceName:.+}","/webdav/{sessionToken}/document/{resourceId}/{resourceName:.+}/","/webdav/{sessionToken}/document/{resourceId}","/webdav/{sessionToken}/document/{resourceId}/"})
public class WebdavEndPointTokenDocumentController
extends Object
This controller is specific for cookie method of external document editor authentication.
It handles requests with session token, exclude it (it's required on security level only)
and proceeds with a pure resource URI the same way as the original
WebdavEndPointDocumentController
.-
Field Summary
Modifier and TypeFieldDescriptionprotected WebdavDocumentVersionsManagementService
protected org.springframework.web.context.WebApplicationContext
-
Constructor Summary
ConstructorDescriptionWebdavEndPointTokenDocumentController
(org.springframework.web.context.WebApplicationContext webApplicationContext, WebdavDocumentVersionsManagementService documentVersionsService) -
Method Summary
Modifier and TypeMethodDescriptiongetResourceName
(String resourceName) getResourceUri
(jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<LockInfoWithResourceUri>
lockResource
(ResourceUri resourceUri, UUID resourceId, String headerIf, LockRequestPredicate lockRequestPredicate) org.springframework.http.ResponseEntity<PropFindMultipleResponseObject>
retrieveMetadata
(ResourceUri resourceUri, UUID resourceId, ResourceName resourceName, PropFindPropertiesList requestProperties) void
retrieveOptions
(UUID resourceId, ResourceName resourceName, jakarta.servlet.http.HttpServletResponse response) org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>
retrieveResource
(UUID resourceId, String ifNoneMatchHeader, ResourceName resourceName) org.springframework.http.ResponseEntity<Void>
unlockResource
(UUID resourceId, String lockTokenHeader) void
updateResource
(UUID resourceId, String resourceName, InputStream requestBody, jakarta.servlet.http.HttpServletResponse response) protected <T,
R> R withWebContextBean
(Class<T> beanClass, Function<? super T, ? extends R> applier)
-
Field Details
-
webApplicationContext
protected org.springframework.web.context.WebApplicationContext webApplicationContext -
documentVersionsService
-
-
Constructor Details
-
WebdavEndPointTokenDocumentController
public WebdavEndPointTokenDocumentController(org.springframework.web.context.WebApplicationContext webApplicationContext, WebdavDocumentVersionsManagementService documentVersionsService)
-
-
Method Details
-
getResourceUri
@ModelAttribute("resourceUri") public ResourceUri getResourceUri(jakarta.servlet.http.HttpServletRequest request) -
getResourceName
@ModelAttribute("resourceName") public ResourceName getResourceName(@PathVariable(required=false) String resourceName) -
retrieveOptions
@OptionsMapping public void retrieveOptions(@PathVariable UUID resourceId, @ModelAttribute ResourceName resourceName, jakarta.servlet.http.HttpServletResponse response) -
retrieveMetadata
@PropFindMapping public org.springframework.http.ResponseEntity<PropFindMultipleResponseObject> retrieveMetadata(@ModelAttribute ResourceUri resourceUri, @PathVariable UUID resourceId, @ModelAttribute ResourceName resourceName, @RequestBody PropFindPropertiesList requestProperties) -
retrieveResource
@GetMapping public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> retrieveResource(@PathVariable UUID resourceId, @RequestHeader(name="If-None-Match",required=false) String ifNoneMatchHeader, @ModelAttribute ResourceName resourceName) -
lockResource
@LockMapping public org.springframework.http.ResponseEntity<LockInfoWithResourceUri> lockResource(@ModelAttribute ResourceUri resourceUri, @PathVariable UUID resourceId, @RequestHeader(name="If",required=false) String headerIf, @RequestBody(required=false) LockRequestPredicate lockRequestPredicate) -
unlockResource
@UnLockMapping public org.springframework.http.ResponseEntity<Void> unlockResource(@PathVariable UUID resourceId, @RequestHeader(name="Lock-Token") String lockTokenHeader) -
updateResource
@PutMapping public void updateResource(@PathVariable UUID resourceId, @PathVariable String resourceName, InputStream requestBody, jakarta.servlet.http.HttpServletResponse response) -
withWebContextBean
-