01: /*
02: * Copyright (c) 2000, Jacob Smullyan.
03: *
04: * This is part of SkunkDAV, a WebDAV client. See http://skunkdav.sourceforge.net/
05: * for the latest version.
06: *
07: * SkunkDAV is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License as published
09: * by the Free Software Foundation; either version 2, or (at your option)
10: * any later version.
11: *
12: * SkunkDAV is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public License
18: * along with SkunkDAV; see the file COPYING. If not, write to the Free
19: * Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20: * 02111-1307, USA.
21: */
22:
23: package org.skunk.dav.client;
24:
25: /**
26: * Object wrapper for the various DAV methods.
27: */
28: public class DAVMethodName {
29: private String methodName;
30: private boolean isExtension;
31:
32: public static final DAVMethodName GET = new DAVMethodName(
33: DAVConstants.GET_METHOD, false);
34: public static final DAVMethodName POST = new DAVMethodName(
35: DAVConstants.POST_METHOD, false);
36: public static final DAVMethodName HEAD = new DAVMethodName(
37: DAVConstants.HEAD_METHOD, false);
38: public static final DAVMethodName PUT = new DAVMethodName(
39: DAVConstants.PUT_METHOD, false);
40: public static final DAVMethodName DELETE = new DAVMethodName(
41: DAVConstants.DELETE_METHOD, false);
42: public static final DAVMethodName OPTIONS = new DAVMethodName(
43: DAVConstants.OPTIONS_METHOD, false);
44: public static final DAVMethodName TRACE = new DAVMethodName(
45: DAVConstants.TRACE_METHOD, false);
46: //DAV extension methods
47: public static final DAVMethodName MOVE = new DAVMethodName(
48: DAVConstants.MOVE_METHOD, true);
49: public static final DAVMethodName MKCOL = new DAVMethodName(
50: DAVConstants.MKCOL_METHOD, true);
51: public static final DAVMethodName PROPFIND = new DAVMethodName(
52: DAVConstants.PROPFIND_METHOD, true);
53: public static final DAVMethodName PROPPATCH = new DAVMethodName(
54: DAVConstants.PROPPATCH_METHOD, true);
55: public static final DAVMethodName COPY = new DAVMethodName(
56: DAVConstants.COPY_METHOD, true);
57: public static final DAVMethodName LOCK = new DAVMethodName(
58: DAVConstants.LOCK_METHOD, true);
59: public static final DAVMethodName UNLOCK = new DAVMethodName(
60: DAVConstants.UNLOCK_METHOD, true);
61:
62: private DAVMethodName(String methodName, boolean isExtension) {
63: this .methodName = methodName;
64: }
65:
66: public String toString() {
67: return methodName;
68: }
69:
70: public boolean isExtensionMethod() {
71: return isExtension;
72: }
73: }
74:
75: /* $Log: DAVMethodName.java,v $
76: /* Revision 1.6 2000/12/19 22:06:15 smulloni
77: /* adding documentation.
78: /*
79: /* Revision 1.5 2000/12/03 23:53:25 smulloni
80: /* added license and copyright preamble to java files.
81: /*
82: /* Revision 1.4 2000/11/09 23:34:51 smullyan
83: /* log added to every Java file, with the help of python. Lock stealing
84: /* implemented, and treatment of locks made more robust.
85: /* */
|