01: // DAVReply.java
02: // $Id: DAVReply.java,v 1.1 2000/10/11 13:20:08 bmahe Exp $
03: // (c) COPYRIGHT MIT, INRIA and Keio, 2000.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05: package org.w3c.www.protocol.webdav;
06:
07: import org.w3c.www.mime.MimeParser;
08:
09: import org.w3c.www.protocol.http.Reply;
10:
11: import org.w3c.www.http.HeaderValue;
12:
13: import org.w3c.www.webdav.WEBDAV;
14: import org.w3c.www.webdav.DAVStatusURIList;
15: import org.w3c.www.webdav.DAVStatusURI;
16:
17: /**
18: * @version $Revision: 1.1 $
19: * @author Benoît Mahé (bmahe@w3.org)
20: */
21: public class DAVReply extends Reply implements WEBDAV {
22:
23: static {
24: registerHeader(DAV_HEADER, "org.w3c.www.http.HttpString");
25: registerHeader(LOCK_TOKEN_HEADER, "org.w3c.www.http.HttpString");
26: registerHeader(STATUS_URI_HEADER,
27: "org.w3c.www.webdav.DAVStatusURIList");
28: }
29:
30: public String getLockToken() {
31: HeaderValue value = getHeaderValue(LOCK_TOKEN_HEADER);
32: return (value != null) ? (String) value.getValue() : null;
33: }
34:
35: public DAVStatusURI[] getStatusURI() {
36: HeaderValue value = getHeaderValue(STATUS_URI_HEADER);
37: return (value != null) ? (DAVStatusURI[]) value.getValue()
38: : null;
39: }
40:
41: public String getDAVHeader() {
42: HeaderValue value = getHeaderValue(DAV_HEADER);
43: return (value != null) ? (String) value.getValue() : null;
44: }
45:
46: protected DAVReply(short major, short minor, int status) {
47: super (major, minor, status);
48: }
49:
50: protected DAVReply(MimeParser parser) {
51: super(parser);
52: }
53:
54: }
|