/** * Initializes the login message object for this dialog.<p> * * The {@link CmsRfsFileViewer} instance is obtained from the * <code>{@link org.opencms.workplace.CmsWorkplaceManager}</code>. */ protected void initLogfileViewBean() { // clone to get a modifiable (not frozen) instance. m_logView = (CmsRfsFileViewer)OpenCms.getWorkplaceManager().getFileViewSettings().clone(); }
/** * Returns the file that will be downloaded upon clicking the download button * generated in this form by <code>{@link #dialogButtonsOkCancel()}</code>.<p> * * @return the file that will be downloaded upon clicking the download button * generated in this form by <code>{@link #dialogButtonsOkCancel()}</code> * * @throws CmsRuntimeException if access to the chosen file to download fails */ protected File getDownloadFile() throws CmsRuntimeException { if (m_downloadFile == null) { // no clone needed: we just read here. CmsRfsFileViewer fileView = OpenCms.getWorkplaceManager().getFileViewSettings(); m_downloadFile = new File(fileView.getFilePath()); try { // 2nd check: it is impossible to set an invalid path to that class. m_downloadFile = m_downloadFile.getCanonicalFile(); } catch (IOException ioex) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_FILE_ACCESS_0), ioex); } } return m_downloadFile; }
/** * Returns the file that will be downloaded upon clicking the download button * generated in this form by <code>{@link #dialogButtonsOkCancel()}</code>.<p> * * @return the file that will be downloaded upon clicking the download button * generated in this form by <code>{@link #dialogButtonsOkCancel()}</code> * * @throws CmsRuntimeException if access to the chosen file to download fails */ protected File getDownloadFile() throws CmsRuntimeException { if (m_downloadFile == null) { // no clone needed: we just read here. CmsRfsFileViewer fileView = OpenCms.getWorkplaceManager().getFileViewSettings(); m_downloadFile = new File(fileView.getFilePath()); try { // 2nd check: it is impossible to set an invalid path to that class. m_downloadFile = m_downloadFile.getCanonicalFile(); } catch (IOException ioex) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_FILE_ACCESS_0), ioex); } } return m_downloadFile; }
CmsRfsFileViewer viewSettings = m_workplaceManager.getFileViewSettings(); Element fileViewElement = workplaceElement.addElement(N_RFSFILEVIEWESETTINGS); String rootPath = viewSettings.getRootPath();
CmsRfsFileViewer viewSettings = m_workplaceManager.getFileViewSettings(); Element fileViewElement = workplaceElement.addElement(N_RFSFILEVIEWESETTINGS); String rootPath = viewSettings.getRootPath();