Merged DEV_TEMPORARY to HEAD

18288: ENH-678: alfresco webdav does not pass litmus webdav test suite

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18320 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2010-01-27 12:56:18 +00:00
parent 3dfdf48af4
commit e2f0615f86
14 changed files with 1742 additions and 711 deletions

View File

@@ -60,7 +60,7 @@ public class WebDAV
public static final String DAV_NS = "D";
public static final String DAV_NS_PREFIX = DAV_NS + ":";
// PROPFIND depth
// PROPFIND, LOCK depth
public static final int DEPTH_0 = 0;
public static final int DEPTH_1 = 1;
@@ -83,6 +83,7 @@ public class WebDAV
public static final String SC_NOT_FOUND_DESC = "Not Found";
public static final String SC_FORBIDDEN_DESC = "Forbidden";
// HTTP methods
public static final String METHOD_PUT = "PUT";
@@ -124,6 +125,10 @@ public class WebDAV
public static final String HEADER_IF_DATE_FORMAT = "EEE, dd MMM yyyy HH:mm:ss zzz";
// If header keyword
public static final String HEADER_KEY_NOT = "Not";
// General string constants
public static final String ASTERISK = "*";
@@ -214,6 +219,7 @@ public class WebDAV
public static final String XML_NS_ERROR = DAV_NS_PREFIX + "error";
public static final String XML_NS_CANNOT_MODIFY_PROTECTED_PROPERTY = DAV_NS_PREFIX + "cannot-modify-protected-property";
public static final String XML_CONTENT_TYPE = "text/xml; charset=UTF-8";
// Alfresco specific properties
@@ -590,6 +596,30 @@ public class WebDAV
return tokens;
}
/**
* Returns string representation of the depth
*
* @param depth
* @return String
*/
public static final String getDepthName(int depth)
{
switch (depth)
{
case DEPTH_0:
return ZERO;
case DEPTH_1:
return ONE;
case DEPTH_INFINITY:
return INFINITY;
default:
throw new IllegalArgumentException("Unknown depth:" + depth);
}
}
/**
* Static initializer
*/