public abstract class WebDavMethod extends Object
Modifier and Type | Field and Description |
---|---|
protected static int |
BUF_SIZE
size of the io-buffer
|
protected static ThreadLocal<SimpleDateFormat> |
CREATION_DATE_FORMAT
Simple date format for the creation date ISO 8601 representation
(partial).
|
protected static int |
DEFAULT_TIMEOUT
Default lock timeout value.
|
protected static int |
INFINITY
Default depth is infite.
|
protected static ThreadLocal<SimpleDateFormat> |
LAST_MODIFIED_DATE_FORMAT
Simple date format for the last modified date.
|
protected static int |
MAX_TIMEOUT
Maximum lock timeout.
|
protected static int |
TEMP_TIMEOUT
Timeout for temporary locks
|
protected static boolean |
TEMPORARY
Boolean value to temporary lock resources (for method locks)
|
Constructor and Description |
---|
WebDavMethod() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkLocks(RequestContext requestContext,
WebDavStore store,
String path)
Checks if locks on resources at the given path exists and if so checks
the If-Header to make sure the If-Header corresponds to the locked
resource.
|
protected String |
determineMethodsAllowed(Resource so)
Determines the methods normally allowed for the resource.
|
protected String |
encodeURL(javax.servlet.http.HttpServletResponse resp,
String path)
URL rewriter.
|
abstract void |
execute(RequestContext requestContext)
To be implemented by concrete method.
|
protected String |
getCleanPath(String path)
removes a / at the end of the path string, if present
|
String |
getDefaultMethodsAllowed() |
protected int |
getDepth(RequestContext requestContext)
Reads the depth header from the request and returns it as a int.
|
protected DocumentBuilder |
getDocumentBuilder()
Return JAXP document builder instance.
|
protected String |
getETag(Resource so)
Get the ETag associated with a resource.
|
String |
getFolderMethodsAllowed() |
protected String |
getHRef(javax.servlet.http.HttpServletRequest req,
String suffix,
boolean isCollection) |
protected String[] |
getLockIdFromIfHeader(RequestContext requestContext) |
protected String |
getLockIdFromLockTokenHeader(RequestContext requestContext)
Get lock token.
|
protected String |
getNullResourceMethodsAllowed() |
protected String |
getParentPath(String path)
creates the parent path from the given path by removing the last '/' and
everything after that
|
protected String |
getRelativePath(RequestContext requestContext)
Return the relative path associated with this servlet.
|
protected String |
getRelativePath(RequestContext requestContext,
String absolutePath) |
protected String |
getResourceMethodsAllowed() |
protected String |
getVersion() |
protected void |
sendReport(RequestContext requestContext,
Hashtable<String,Integer> errorList)
Send a multistatus element containing a complete error report to the
client.
|
protected static final int INFINITY
protected static final ThreadLocal<SimpleDateFormat> CREATION_DATE_FORMAT
protected static final ThreadLocal<SimpleDateFormat> LAST_MODIFIED_DATE_FORMAT
protected static int BUF_SIZE
protected static final int DEFAULT_TIMEOUT
protected static final int MAX_TIMEOUT
protected static final boolean TEMPORARY
protected static final int TEMP_TIMEOUT
public abstract void execute(RequestContext requestContext) throws IOException, LockFailedException
requestContext
- req
- resp
- IOException
LockFailedException
protected String getRelativePath(RequestContext requestContext)
request
- The servlet request we are processingprotected String getRelativePath(RequestContext requestContext, String absolutePath)
protected String getParentPath(String path)
path
- the pathprotected String getCleanPath(String path)
path
- the pathprotected DocumentBuilder getDocumentBuilder() throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
protected int getDepth(RequestContext requestContext)
req
- protected String encodeURL(javax.servlet.http.HttpServletResponse resp, String path)
path
- Path which has to be rewrittenprotected String getHRef(javax.servlet.http.HttpServletRequest req, String suffix, boolean isCollection)
protected String getETag(Resource so)
so
- StoredObject to get resourceLength, lastModified and a hashCode of
StoredObjectprotected String getVersion()
protected String[] getLockIdFromIfHeader(RequestContext requestContext)
protected String getLockIdFromLockTokenHeader(RequestContext requestContext)
requestContext
- protected boolean checkLocks(RequestContext requestContext, WebDavStore store, String path) throws IOException, LockFailedException
req
- Servlet requestresp
- Servlet responsestore
- path
- path to the resourceIOException
LockFailedException
protected void sendReport(RequestContext requestContext, Hashtable<String,Integer> errorList) throws IOException
req
- Servlet requestresp
- Servlet responseerrorList
- List of error to be displayedIOException
protected String getNullResourceMethodsAllowed()
protected String getResourceMethodsAllowed()
public String getFolderMethodsAllowed()
public String getDefaultMethodsAllowed()
This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.