1 23 24 package org.apache.slide.webdav.method; 25 26 import java.io.IOException ; 27 28 import org.apache.slide.common.NamespaceAccessToken; 29 import org.apache.slide.webdav.WebdavException; 30 import org.apache.slide.webdav.WebdavServletConfig; 31 import org.apache.slide.webdav.util.WebdavStatus; 32 33 37 public class PostMethod extends PutMethod { 38 39 40 42 43 49 public PostMethod(NamespaceAccessToken token, WebdavServletConfig config) { 50 super(token, config); 51 } 52 53 54 protected void executeRequest() 55 throws WebdavException, IOException { 56 57 if (!isCollection(requestUri)) { 58 super.executeRequest(); 59 } 60 else { 61 int statusCode = WebdavStatus.SC_CONFLICT; 62 sendError( statusCode, getClass().getName()+".mustNotBeCollection" ); 63 throw new WebdavException( statusCode ); 64 } 65 66 } 67 68 } 69 | Popular Tags |