001: /*
002: * Copyright (c) 2000, Jacob Smullyan.
003: *
004: * This is part of SkunkDAV, a WebDAV client. See http://skunkdav.sourceforge.net/
005: * for the latest version.
006: *
007: * SkunkDAV is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU General Public License as published
009: * by the Free Software Foundation; either version 2, or (at your option)
010: * any later version.
011: *
012: * SkunkDAV is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * General Public License for more details.
016: *
017: * You should have received a copy of the GNU General Public License
018: * along with SkunkDAV; see the file COPYING. If not, write to the Free
019: * Software Foundation, 59 Temple Place - Suite 330, Boston, MA
020: * 02111-1307, USA.
021: */
022:
023: package org.skunk.dav.client;
024:
025: /**
026: * various constants used throughout the dav client library.
027: *
028: * @author Jacob Smullyan
029: */
030: public interface DAVConstants {
031: String CRLF = "\r\n";
032:
033: //HTTP methods
034: String GET_METHOD = "GET";
035: String POST_METHOD = "POST";
036: String HEAD_METHOD = "HEAD";
037: String PUT_METHOD = "PUT";
038: String DELETE_METHOD = "DELETE";
039: String OPTIONS_METHOD = "OPTIONS";
040: String TRACE_METHOD = "TRACE";
041: //DAV extension methods
042: String MOVE_METHOD = "MOVE";
043: String MKCOL_METHOD = "MKCOL";
044: String PROPFIND_METHOD = "PROPFIND";
045: String PROPPATCH_METHOD = "PROPPATCH";
046: String COPY_METHOD = "COPY";
047: String LOCK_METHOD = "LOCK";
048: String UNLOCK_METHOD = "UNLOCK";
049:
050: //headers for requests
051: String OVERWRITE_HEADER = "Overwrite";
052: String DESTINATION_HEADER = "Destination";
053: String IF_HEADER = "If";
054: String LOCK_TOKEN_HEADER = "Lock-Token";
055: String DEPTH_HEADER = "Depth";
056: String TIMEOUT_HEADER = "Timeout";
057: String CONTENT_TYPE = "Content-Type";
058:
059: //headers for responses
060: String ALLOW_HEADER = "Allow";
061:
062: //xml elements
063: String ACTIVELOCK_ELEM = "activelock";
064: String DEPTH_ELEM = "depth";
065: String LOCKTOKEN_ELEM = "locktoken";
066: String TIMEOUT_ELEM = "timeout";
067: String COLLECTION_ELEM = "collection";
068: String HREF_ELEM = "href";
069: String LINK_ELEM = "link";
070: String DST_ELEM = "dst";
071: String SRC_ELEM = "src";
072: String LOCKENTRY_ELEM = "lockentry";
073: String LOCKINFO_ELEM = "lockinfo";
074: String LOCKSCOPE_ELEM = "lockscope";
075: String EXCLUSIVE_ELEM = "exclusive";
076: String SHARED_ELEM = "shared";
077: String LOCKTYPE_ELEM = "locktype";
078: String WRITE_ELEM = "write";
079: String MULTISTATUS_ELEM = "multistatus";
080: String RESPONSE_ELEM = "response";
081: String PROPSTAT_ELEM = "propstat";
082: String STATUS_ELEM = "status";
083: String RESPONSEDESCRIPTION_ELEM = "responsedescription";
084: String OWNER_ELEM = "owner";
085: String PROP_ELEM = "prop";
086: String PROPERTYBEHAVIOR_ELEM = "propertybehavior";
087: String KEEPALIVE_ELEM = "keepalive";
088: String OMIT_ELEM = "omit";
089: String PROPERTYUPDATE_ELEM = "propertyupdate";
090: String REMOVE_ELEM = "remove";
091: String SET_ELEM = "set";
092: String PROPFIND_ELEM = "propfind";
093: String ALLPROP_ELEM = "allprop";
094: String PROPNAME_ELEM = "propname";
095: //DAV properties (also XML elements)
096: String CREATIONDATE_PROP = "creationdate";
097: String DISPLAYNAME_PROP = "displayname";
098: String GETCONTENTLANGUAGE_PROP = "getcontentlanguage";
099: String GETCONTENTLENGTH_PROP = "getcontentlength";
100: String GETCONTENTTYPE_PROP = "getcontenttype";
101: String GETETAG_PROP = "getetag";
102: String GETLASTMODIFIED_PROP = "getlastmodified";
103: String LOCKDISCOVERY_PROP = "lockdiscovery";
104: String RESOURCETYPE_PROP = "resourcetype";
105: String SOURCE_PROP = "source";
106: String SUPPORTEDLOCK_PROP = "supportedlock";
107: //Apache's custom executable property
108: String EXECUTABLE_PROP = "executable";
109: //begin an xml document
110: String XML_BOILERPLATE = "<?xml version=\"1.0\" ?>";
111: String XML_NAMESPACE_ATTR = "xmlns";
112: String DAV_NAMESPACE = "DAV:";
113: String APACHE_DAV_NAMESPACE = "http://apache.org/dav/props/";
114: //The file separator used for a DAV virtual filesystem
115: String DAV_FILE_SEPARATOR = "/";
116: //protocols
117: String HTTP = "http";
118: String HTTPS = "https";
119: }
120:
121: /* $Log: DAVConstants.java,v $
122: /* Revision 1.13 2001/01/05 08:01:12 smulloni
123: /* changes to the connection gui for the Explorer; added depth configurability to
124: /* propfind in the jpython test script; added an experimental "allprop" system
125: /* property which affects the propfind query type
126: /*
127: /* Revision 1.12 2000/12/19 22:06:15 smulloni
128: /* adding documentation.
129: /*
130: /* Revision 1.11 2000/12/18 21:04:56 smulloni
131: /* changes to support SSL.
132: /*
133: /* Revision 1.10 2000/12/03 23:53:25 smulloni
134: /* added license and copyright preamble to java files.
135: /*
136: /* Revision 1.9 2000/11/09 23:34:50 smullyan
137: /* log added to every Java file, with the help of python. Lock stealing
138: /* implemented, and treatment of locks made more robust.
139: /* */
|