|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.webdav.methods.AbstractMethod
public abstract class AbstractMethod
Field Summary | |
---|---|
protected static int |
BUF_SIZE
size of the io-buffer |
protected static String |
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 String |
LAST_MODIFIED_DATE_FORMAT
Simple date format for the last modified date. |
protected static String |
LOCAL_DATE_FORMAT
|
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) |
protected static URLEncoder |
URL_ENCODER
Array containing the safe characters set. |
Constructor Summary | |
---|---|
AbstractMethod()
|
Method Summary | |
---|---|
static String |
creationDateFormat(Date date)
|
protected String |
getCleanPath(String path)
removes a / at the end of the path string, if present |
protected int |
getDepth(HttpServletRequest req)
reads the depth header from the request and returns it as a int |
protected DocumentBuilder |
getDocumentBuilder()
Return JAXP document builder instance. |
protected String |
getETag(StoredObject so)
Get the ETag associated with a file. |
static String |
getLocalDateFormat(Date date,
Locale loc)
|
protected String[] |
getLockIdFromIfHeader(HttpServletRequest req)
|
protected String |
getLockIdFromLockTokenHeader(HttpServletRequest req)
|
protected String |
getParentPath(String path)
creates the parent path from the given path by removing the last '/' and everything after that |
protected String |
getRelativePath(HttpServletRequest request)
Return the relative path associated with this servlet. |
protected boolean |
isUnlocked(ITransaction transaction,
HttpServletRequest req,
IResourceLocks resourceLocks,
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. |
static String |
lastModifiedDateFormat(Date date)
|
protected String |
rewriteUrl(String path)
URL rewriter. |
protected void |
sendReport(HttpServletRequest req,
HttpServletResponse resp,
Hashtable<String,Integer> errorList)
Send a multistatus element containing a complete error report to the client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.modeshape.webdav.IMethodExecutor |
---|
execute |
Field Detail |
---|
protected static URLEncoder URL_ENCODER
protected static final int INFINITY
protected static final String CREATION_DATE_FORMAT
protected static final String LAST_MODIFIED_DATE_FORMAT
protected static final String LOCAL_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
Constructor Detail |
---|
public AbstractMethod()
Method Detail |
---|
public static String lastModifiedDateFormat(Date date)
public static String creationDateFormat(Date date)
public static String getLocalDateFormat(Date date, Locale loc)
protected String getRelativePath(HttpServletRequest request)
request
- The servlet request we are processing
protected String getParentPath(String path)
path
- the path
protected String getCleanPath(String path)
path
- the path
protected DocumentBuilder getDocumentBuilder() throws ServletException
ServletException
protected int getDepth(HttpServletRequest req)
req
-
protected String rewriteUrl(String path)
path
- Path which has to be rewiten
protected String getETag(StoredObject so)
so
- StoredObject to get resourceLength, lastModified and a hashCode of StoredObject
protected String[] getLockIdFromIfHeader(HttpServletRequest req)
protected String getLockIdFromLockTokenHeader(HttpServletRequest req)
protected boolean isUnlocked(ITransaction transaction, HttpServletRequest req, IResourceLocks resourceLocks, String path) throws IOException, LockFailedException
transaction
- req
- Servlet requestresourceLocks
- path
- path to the resource
IOException
LockFailedException
protected void sendReport(HttpServletRequest req, HttpServletResponse resp, Hashtable<String,Integer> errorList) throws IOException
req
- Servlet requestresp
- Servlet responseerrorList
- List of error to be displayed
IOException
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |