1 23 24 package org.apache.webdav.lib.methods; 25 26 import java.io.IOException ; 27 import java.io.InputStream ; 28 import org.apache.commons.httpclient.HttpConnection; 29 import org.apache.commons.httpclient.HttpException; 30 import org.apache.commons.httpclient.HttpState; 31 import org.apache.webdav.lib.util.WebdavStatus; 32 33 34 55 public class MkWorkspaceMethod 56 extends XMLResponseMethodBase { 57 58 59 61 62 65 public MkWorkspaceMethod() { 66 } 67 68 69 72 public MkWorkspaceMethod(String path) { 73 super(path); 74 } 75 76 77 79 80 public String getName() { 81 return "MKWORKSPACE"; 82 } 83 88 public void parseResponse(InputStream input, HttpState state, HttpConnection conn) 89 throws IOException , HttpException { 90 try 91 { 92 int code = getStatusLine().getStatusCode(); 93 if (code == WebdavStatus.SC_CONFLICT || 94 code == WebdavStatus.SC_FORBIDDEN ) { 95 parseXMLResponse(input); 96 } 97 } 98 catch (IOException e) { 99 } 101 } 102 103 104 } 105 | Popular Tags |