001: // WEBDAV.java
002: // $Id: WEBDAV.java,v 1.6 2000/10/10 13:56:04 bmahe Exp $
003: // (c) COPYRIGHT MIT, INRIA and Keio, 2000.
004: // Please first read the full copyright statement in file COPYRIGHT.html
005: package org.w3c.www.webdav;
006:
007: import org.w3c.www.http.HTTP;
008:
009: /**
010: * @version $Revision: 1.6 $
011: * @author Benoît Mahé (bmahe@w3.org)
012: */
013: public interface WEBDAV {
014:
015: // namespaceURI
016: public final static String NAMESPACE_URI = "DAV:";
017: public final static String NAMESPACE_PREFIX = "D";
018:
019: public final static String ENCODING = "utf-8";
020:
021: // WEBDAV headers
022: public final static String DAV_HEADER = "DAV";
023: public final static String DEPTH_HEADER = "Depth";
024: public final static String DESTINATION_HEADER = "Destination";
025: public final static String IF_HEADER = "If";
026: public final static String LOCK_TOKEN_HEADER = "Lock-Token";
027: public final static String OVERWRITE_HEADER = "Overwrite";
028: public final static String STATUS_URI_HEADER = "Status-URI";
029: public final static String TIMEOUT_HEADER = "Timeout";
030:
031: // WEBDAV header values
032: public final static String CLASS_1_COMPLIANT = "1";
033: public final static String CLASS_2_COMPLIANT = "1,2";
034:
035: public final static int DEPTH_0 = 0;
036: public final static int DEPTH_1 = 1;
037: public final static int DEPTH_INFINITY = -1;
038:
039: // WEBDAV messages
040: public static final String dav_msg_100[] = { "Continue", // 100
041: "Switching Protocols", // 101
042: "Processing" // 102 (WEBDAV specific)
043: };
044:
045: public static final String dav_msg_200[] = { "OK", // 200
046: "Created", // 201
047: "Accepted", // 202
048: "Non-Authoritative information", // 203
049: "No Content", // 204
050: "Reset Content", // 205
051: "Partial Content", // 206
052: "Multi-Status" // 207 (WEBDAV specific)
053: };
054:
055: public static final String dav_msg_300[] = HTTP.msg_300;
056:
057: public static final String dav_msg_400[] = { "Bad Request", // 400
058: "Unauthorized", // 401
059: "Payment Required", // 402
060: "Forbidden", // 403
061: "Not Found", // 404
062: "Method Not Allowed", // 405
063: "Not Acceptable", // 406
064: "Proxy Authentication Required", // 407
065: "Request Timeout", // 408
066: "Conflict", // 409
067: "Gone", // 410
068: "Length Required", // 411
069: "Precondition Failed", // 412
070: "Request Entity Too Large", // 413
071: "Request-URI Too Long", // 414
072: "Unsupported Media Type", // 415
073: "Requested Range Not Satisfiable", // 416
074: "Expectation Failed", // 417
075: "", // no 418 def
076: "", // no 419 def
077: "", // no 420 def
078: "", // no 421 def
079: "Unprocessable Entity", // 422 (WEBDAV specific)
080: "Locked", // 423 (WEBDAV specific)
081: "Failed Dependency" // 424 (WEBDAV specific)
082: };
083:
084: public static final String dav_msg_500[] = {
085: "Internal Server Error", // 500
086: "Not Implemented", // 501
087: "Bad Gateway", // 502
088: "Service Unavailable", // 503
089: "Gateway Timeout", // 504
090: "HTTP Version Not Supported", // 505
091: "", // no 506 def
092: "Insufficient Storage", // 507 (WEBDAV specific)
093: "", // no 508 def
094: "", // no 509 def
095: "Not Extended" // 510
096: };
097:
098: // WEBDAV status code
099: public static final int PROCESSING = 102;
100:
101: public static final int MULTI_STATUS = 207;
102:
103: public static final int UNPROCESSABLE_ENTITY = 422;
104: public static final int LOCKED = 423;
105: public static final int FAILED_DEPENDENCY = 424;
106:
107: public static final int INSUFFICIENT_STORAGE = 507;
108:
109: }
|