/** * Checks if the items in the path or in a subpath are locked.<p> * * @param req the servlet request we are processing * @param path the path to check the items for locks * @param errorList the error list where to put the found errors */ private void checkChildLocks(HttpServletRequest req, String path, Hashtable<String, Integer> errorList) { List<I_CmsRepositoryItem> list = null; try { list = m_session.list(path); } catch (CmsException e) { if (LOG.isErrorEnabled()) { LOG.error(Messages.get().getBundle().key(Messages.LOG_LIST_ITEMS_ERROR_1, path), e); } errorList.put(path, new Integer(CmsWebdavStatus.SC_INTERNAL_SERVER_ERROR)); return; } Iterator<I_CmsRepositoryItem> iter = list.iterator(); while (iter.hasNext()) { I_CmsRepositoryItem element = iter.next(); if (isLocked(element.getName())) { errorList.put(element.getName(), new Integer(CmsWebdavStatus.SC_LOCKED)); } else { if (element.isCollection()) { checkChildLocks(req, element.getName(), errorList); } } } }
/** * Checks if the items in the path or in a subpath are locked.<p> * * @param req the servlet request we are processing * @param path the path to check the items for locks * @param errorList the error list where to put the found errors */ private void checkChildLocks(HttpServletRequest req, String path, Hashtable errorList) { List list = null; try { list = m_session.list(path); } catch (CmsException e) { if (LOG.isErrorEnabled()) { LOG.error(Messages.get().getBundle().key(Messages.LOG_LIST_ITEMS_ERROR_1, path), e); } errorList.put(path, new Integer(CmsWebdavStatus.SC_INTERNAL_SERVER_ERROR)); return; } Iterator iter = list.iterator(); while (iter.hasNext()) { I_CmsRepositoryItem element = (I_CmsRepositoryItem)iter.next(); if (isLocked(element.getName())) { errorList.put(element.getName(), new Integer(CmsWebdavStatus.SC_LOCKED)); } else { if (element.isCollection()) { checkChildLocks(req, element.getName(), errorList); } } } }
String resourceName = childItem.getName(); if (resourceName.endsWith("/")) { resourceName = resourceName.substring(0, resourceName.length() - 1);
String resourceName = childItem.getName(); if (resourceName.endsWith("/")) { resourceName = resourceName.substring(0, resourceName.length() - 1);
List propertiesVector) { String path = item.getName(); Element responseElem = addElement(elem, TAG_RESPONSE); String contentType = getServletContext().getMimeType(item.getName()); if (contentType != null) { addElement(propElem, TAG_CONTENTTYPE).addText(contentType); String contentType = item.getMimeType(); if (contentType == null) { contentType = getServletContext().getMimeType(item.getName());
List<String> propertiesVector) { String path = item.getName(); Element responseElem = addElement(elem, TAG_RESPONSE); String contentType = getServletContext().getMimeType(item.getName()); if (contentType != null) { addElement(propElem, TAG_CONTENTTYPE).addText(contentType); String contentType = item.getMimeType(); if (contentType == null) { contentType = getServletContext().getMimeType(item.getName());