/** * @see org.opencms.repository.I_CmsRepositorySession#delete(java.lang.String) */ public void delete(String path) throws CmsException { path = validatePath(path); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_DELETE_ITEM_1, path)); } CmsRepositoryLockInfo lock = getLock(path); // lock resource m_cms.lockResource(path); // delete resource m_cms.deleteResource(path, CmsResource.DELETE_PRESERVE_SIBLINGS); // if deleting items out of a xml page restore lock state after deleting try { if (lock == null) { m_cms.unlockResource(path); } } catch (CmsException ex) { // noop } }
/** * @see org.opencms.repository.I_CmsRepositorySession#delete(java.lang.String) */ public void delete(String path) throws CmsException { path = validatePath(path); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_DELETE_ITEM_1, path)); } CmsRepositoryLockInfo lock = getLock(path); // lock resource m_cms.lockResource(path); // delete resource m_cms.deleteResource(path, CmsResource.DELETE_PRESERVE_SIBLINGS); // if deleting items out of a xml page restore lock state after deleting try { if (lock == null) { m_cms.unlockResource(path); } } catch (CmsException ex) { // noop } }