/** * Deletes a temporary file from the OpenCms VFS, needed when exiting an editor.<p> */ protected void deleteTempFile() { try { // switch to the temporary file project switchToTempProject(); // delete the temporary file getCms().deleteResource(getParamTempfile(), CmsResource.DELETE_PRESERVE_SIBLINGS); } catch (CmsException e) { // should usually never happen if (LOG.isInfoEnabled()) { LOG.info(e); } } finally { try { // switch back to the current project switchToCurrentProject(); } catch (CmsException e) { // should usually never happen if (LOG.isInfoEnabled()) { LOG.info(e); } } } }
/** * Deletes a temporary file from the OpenCms VFS, needed when exiting an editor.<p> */ protected void deleteTempFile() { try { // switch to the temporary file project switchToTempProject(); // delete the temporary file getCms().deleteResource(getParamTempfile(), CmsResource.DELETE_PRESERVE_SIBLINGS); } catch (CmsException e) { // should usually never happen if (LOG.isInfoEnabled()) { LOG.info(e); } } finally { try { // switch back to the current project switchToCurrentProject(); } catch (CmsException e) { // should usually never happen if (LOG.isInfoEnabled()) { LOG.info(e); } } } }
List<CmsProperty> properties; try { switchToTempProject(); tempFile = cms.readFile(getParamTempfile(), CmsResourceFilter.ALL); properties = cms.readPropertyObjects(getParamTempfile(), false); switchToTempProject();
List properties; try { switchToTempProject(); tempFile = cms.readFile(getParamTempfile(), CmsResourceFilter.ALL); properties = cms.readPropertyObjects(getParamTempfile(), false);