Class WebDavHttpMethodPlugin
java.lang.Object
org.exoplatform.documents.webdav.plugin.WebDavHttpMethodPlugin
- Direct Known Subclasses:
CheckinWebDavHandler, CheckoutWebDavHandler, CopyWebDavHandler, DeleteWebDavHandler, GetWebDavHandler, HeadWebDavHandler, LockWebDavHandler, MkcolWebDavHandler, MoveWebDavHandler, OptionsWebDavHandler, OrderPatchWebDavHandler, PropFindWebDavHandler, PropPatchWebDavHandler, PutWebDavHandler, ReportWebDavHandler, SearchWebDavHandler, UncheckoutWebDavHandler, UnlockWebDavHandler, VersionControlWebDavHandler, WebDavErrorHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected org.exoplatform.documents.webdav.service.DocumentWebDavServicestatic final Stringstatic final Stringprotected static final org.exoplatform.services.log.Logstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckModified(jakarta.servlet.http.HttpServletRequest httpRequest, String resourcePath, String version) protected static StringdecodePathSegment(String segment) Decodes a raw URI path segment.protected StringgetBaseUrl(jakarta.servlet.http.HttpServletRequest httpRequest) protected StringgetDepth(jakarta.servlet.http.HttpServletRequest httpRequest) protected intgetDepthInt(jakarta.servlet.http.HttpServletRequest httpRequest) protected StringgetDestinationPath(jakarta.servlet.http.HttpServletRequest httpRequest) getLockTokens(jakarta.servlet.http.HttpServletRequest httpRequest) Creates the list of Lock tokens from Lock-Token and If headers.protected booleangetOverwriteParameter(jakarta.servlet.http.HttpServletRequest httpRequest) protected booleangetRemoveDestinationParameter(jakarta.servlet.http.HttpServletRequest httpRequest) final Map<String, Collection<org.exoplatform.documents.webdav.model.WebDavItemProperty>> getRequestedPropertyStats(org.exoplatform.documents.webdav.model.WebDavItem resource, Set<QName> requestPropertyNames) getRequestPropertyNames(org.exoplatform.documents.webdav.model.WebDavItemProperty body) protected StringgetRequestPropertyType(org.exoplatform.documents.webdav.model.WebDavItemProperty body) protected StringgetResourcePath(jakarta.servlet.http.HttpServletRequest httpRequest) protected URIgetResourceUri(jakarta.servlet.http.HttpServletRequest httpRequest) abstract voidhandle(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) Handles the WebDav Request switch designated methodprotected org.exoplatform.documents.webdav.model.WebDavItemPropertyparseRequestBodyAsWebDavItemProperty(jakarta.servlet.http.HttpServletRequest httpRequest) protected voidwriteResponse(jakarta.servlet.http.HttpServletResponse httpResponse, int httpCode, String content)
-
Field Details
-
CONTEXT_PATH
- See Also:
-
CONTEXT_PATH_ROOT
- See Also:
-
CONTEXT_PATH_SINGLE_DRIVE
- See Also:
-
CONTEXT_PATH_SINGLE_DRIVE_ROOT
- See Also:
-
OPAQUE_LOCK_TOKEN
- See Also:
-
INFINITY_DEPTH
- See Also:
-
IF_MODIFIED_SINCE_PATTERN
- See Also:
-
DEFAULT_XML_ENCODING
-
LOG
protected static final org.exoplatform.services.log.Log LOG -
documentWebDavService
@Autowired protected org.exoplatform.documents.webdav.service.DocumentWebDavService documentWebDavService
-
-
Constructor Details
-
WebDavHttpMethodPlugin
-
-
Method Details
-
handle
public abstract void handle(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) throws org.exoplatform.documents.webdav.model.WebDavException Handles the WebDav Request switch designated method- Parameters:
httpRequest-HttpServletRequesthttpResponse-HttpServletResponse- Throws:
org.exoplatform.documents.webdav.model.WebDavException- when an error happened while handling the operation
-
getLockTokens
-
getResourcePath
-
getResourceUri
-
decodePathSegment
Decodes a raw URI path segment. UnlikeURLDecoder.decode(String, java.nio.charset.Charset), which implementsapplication/x-www-form-urlencodedsemantics and wrongly turns a literal '+' into a space, this only unescapes percent-encoded sequences and leaves literal '+' untouched, since '+' has no special meaning in a URI path segment (RFC 3986). -
getBaseUrl
-
parseRequestBodyAsWebDavItemProperty
protected org.exoplatform.documents.webdav.model.WebDavItemProperty parseRequestBodyAsWebDavItemProperty(jakarta.servlet.http.HttpServletRequest httpRequest) -
getDepth
-
getDepthInt
protected int getDepthInt(jakarta.servlet.http.HttpServletRequest httpRequest) -
getDestinationPath
-
getOverwriteParameter
protected boolean getOverwriteParameter(jakarta.servlet.http.HttpServletRequest httpRequest) - Returns:
- false only when the request says "Overwrite: F"; an absent header means "T" (RFC 4918, section 10.6)
-
getRemoveDestinationParameter
protected boolean getRemoveDestinationParameter(jakarta.servlet.http.HttpServletRequest httpRequest) -
checkModified
-
writeResponse
protected void writeResponse(jakarta.servlet.http.HttpServletResponse httpResponse, int httpCode, String content) -
getRequestedPropertyStats
public final Map<String, Collection<org.exoplatform.documents.webdav.model.WebDavItemProperty>> getRequestedPropertyStats(org.exoplatform.documents.webdav.model.WebDavItem resource, Set<QName> requestPropertyNames) -
getRequestPropertyNames
-
getRequestPropertyType
protected String getRequestPropertyType(org.exoplatform.documents.webdav.model.WebDavItemProperty body)
-