/** * Check to see if a resource is currently write locked.<p> * * @param req the servlet request we are processing * * @return true if the resource is locked otherwise false */ private boolean isLocked(HttpServletRequest req) { return isLocked(getRelativePath(req)); }
/** * Check to see if a resource is currently write locked.<p> * * @param req the servlet request we are processing * * @return true if the resource is locked otherwise false */ private boolean isLocked(HttpServletRequest req) { return isLocked(getRelativePath(req)); }
/** * Process a OPTIONS WebDAV request for the specified resource.<p> * * @param req the servlet request we are processing * @param resp the servlet response we are creating */ @Override protected void doOptions(HttpServletRequest req, HttpServletResponse resp) { resp.addHeader("DAV", "1,2"); StringBuffer methodsAllowed = determineMethodsAllowed(getRelativePath(req)); resp.addHeader(HEADER_ALLOW, methodsAllowed.toString()); resp.addHeader("MS-Author-Via", "DAV"); }
/** * Process a OPTIONS WebDAV request for the specified resource.<p> * * @param req the servlet request we are processing * @param resp the servlet response we are creating */ @Override protected void doOptions(HttpServletRequest req, HttpServletResponse resp) { resp.addHeader("DAV", "1,2"); StringBuffer methodsAllowed = determineMethodsAllowed(getRelativePath(req)); resp.addHeader(HEADER_ALLOW, methodsAllowed.toString()); resp.addHeader("MS-Author-Via", "DAV"); }
/** * Process a PROPPATCH WebDAV request for the specified resource.<p> * * Not implemented yet.<p> * * @param req the servlet request we are processing * @param resp the servlet response we are creating */ protected void doProppatch(HttpServletRequest req, HttpServletResponse resp) { // Check if Webdav is read only if (m_readOnly) { resp.setStatus(CmsWebdavStatus.SC_FORBIDDEN); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_WEBDAV_READ_ONLY_0)); } return; } // Check if resource is locked if (isLocked(req)) { resp.setStatus(CmsWebdavStatus.SC_LOCKED); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_ITEM_LOCKED_1, getRelativePath(req))); } return; } resp.setStatus(HttpServletResponse.SC_NOT_IMPLEMENTED); }
/** * Process a PROPPATCH WebDAV request for the specified resource.<p> * * Not implemented yet.<p> * * @param req the servlet request we are processing * @param resp the servlet response we are creating */ protected void doProppatch(HttpServletRequest req, HttpServletResponse resp) { // Check if Webdav is read only if (m_readOnly) { resp.setStatus(CmsWebdavStatus.SC_FORBIDDEN); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_WEBDAV_READ_ONLY_0)); } return; } // Check if resource is locked if (isLocked(req)) { resp.setStatus(CmsWebdavStatus.SC_LOCKED); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_ITEM_LOCKED_1, getRelativePath(req))); } return; } resp.setStatus(HttpServletResponse.SC_NOT_IMPLEMENTED); }
String relativePath = getRelativePath(req);
String relativePath = getRelativePath(req);
String path = getRelativePath(req); LOG.debug("[" + method + "] " + path);
String path = getRelativePath(req); LOG.debug("[" + method + "] " + path);
/** * Process a UNLOCK WebDAV request for the specified resource.<p> * * @param req the servlet request we are processing * @param resp the servlet response we are creating */ protected void doUnlock(HttpServletRequest req, HttpServletResponse resp) { String path = getRelativePath(req); // Check if Webdav is read only if (m_readOnly) { resp.setStatus(CmsWebdavStatus.SC_FORBIDDEN); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_WEBDAV_READ_ONLY_0)); } return; } // Check if resource is locked if (isLocked(req)) { resp.setStatus(CmsWebdavStatus.SC_LOCKED); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_ITEM_LOCKED_1, path)); } return; } if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_UNLOCK_ITEM_0)); } m_session.unlock(path); resp.setStatus(CmsWebdavStatus.SC_NO_CONTENT); }
/** * Process a UNLOCK WebDAV request for the specified resource.<p> * * @param req the servlet request we are processing * @param resp the servlet response we are creating */ protected void doUnlock(HttpServletRequest req, HttpServletResponse resp) { String path = getRelativePath(req); // Check if Webdav is read only if (m_readOnly) { resp.setStatus(CmsWebdavStatus.SC_FORBIDDEN); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_WEBDAV_READ_ONLY_0)); } return; } // Check if resource is locked if (isLocked(req)) { resp.setStatus(CmsWebdavStatus.SC_LOCKED); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_ITEM_LOCKED_1, path)); } return; } if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_UNLOCK_ITEM_0)); } m_session.unlock(path); resp.setStatus(CmsWebdavStatus.SC_NO_CONTENT); }
String path = getRelativePath(req);
String path = getRelativePath(req);
protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws IOException { String path = getRelativePath(req);
protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws IOException { String path = getRelativePath(req);
String src = getRelativePath(req);
String src = getRelativePath(req);
String src = getRelativePath(req);
String src = getRelativePath(req);