/** * 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); } } } }
List list = m_session.list(path); Iterator iter = list.iterator(); while (iter.hasNext()) {
List<I_CmsRepositoryItem> list = m_session.list(path); Iterator<I_CmsRepositoryItem> iter = list.iterator(); while (iter.hasNext()) {
List<I_CmsRepositoryItem> list = m_session.list(currentItem.getName()); Iterator<I_CmsRepositoryItem> iter = list.iterator(); while (iter.hasNext()) {
List list = m_session.list(currentItem.getName()); Iterator iter = list.iterator(); while (iter.hasNext()) {