/** * @see org.opencms.workplace.CmsWorkplace#initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest) */ @Override protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, HttpServletRequest request) { // fill the parameter values in the get/set methods fillParamValues(settings, request); if (getDialogRealUri().endsWith("editor.jsp")) { // check the required permissions to edit the resource only in the main frame if (!checkResourcePermissions(CmsPermissionSet.ACCESS_WRITE, false)) { // not write permissions in the folder, close editor try { actionClose(); } catch (Exception e) { // should usually never happen if (LOG.isInfoEnabled()) { LOG.info(e); } } } } } }
/** * Returns the editor title.<p> * * @return the editor title */ public String getParamEditorTitle() { if (CmsStringUtil.isEmpty(m_paramEditorTitle)) { return key(Messages.GUI_EDITOR_TITLE_PREFIX_0) + " " + getParamResource(); } return m_paramEditorTitle; }
/** * Deletes the temporary file and unlocks the edited resource when in direct edit mode.<p> * * This method is needed in the editor close help frame, which is called when the user presses * the "back" button or closes the browser window when editing a page.<p> * * @param forceUnlock if true, the resource will be unlocked anyway */ @Override public void actionClear(boolean forceUnlock) { // delete the temporary file deleteTempFile(); if (Boolean.valueOf(getParamDirectedit()).booleanValue() || forceUnlock) { // unlock the resource when in direct edit mode or force unlock is true try { getCms().unlockResource(getParamResource()); } catch (CmsException e) { // should usually never happen if (LOG.isInfoEnabled()) { LOG.info(e); } } } }
/** * Deletes the temporary file and unlocks the edited resource when in direct edit mode.<p> * * This method is needed in the editor close help frame, which is called when the user presses * the "back" button or closes the browser window when editing a page.<p> * * @param forceUnlock if true, the resource will be unlocked anyway */ @Override public void actionClear(boolean forceUnlock) { // delete the temporary file deleteTempFile(); if (Boolean.valueOf(getParamDirectedit()).booleanValue() || forceUnlock) { // unlock the resource when in direct edit mode or force unlock is true try { getCms().unlockResource(getParamResource()); } catch (CmsException e) { // should usually never happen if (LOG.isInfoEnabled()) { LOG.info(e); } } } }
/** * @see org.opencms.workplace.CmsWorkplace#initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest) */ @Override protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, HttpServletRequest request) { // fill the parameter values in the get/set methods fillParamValues(settings, request); if (getDialogRealUri().endsWith("editor.jsp")) { // check the required permissions to edit the resource only in the main frame if (!checkResourcePermissions(CmsPermissionSet.ACCESS_WRITE, false)) { // not write permissions in the folder, close editor try { actionClose(); } catch (Exception e) { // should usually never happen if (LOG.isInfoEnabled()) { LOG.info(e); } } } } } }
/** * Returns the editor title.<p> * * @return the editor title */ public String getParamEditorTitle() { if (CmsStringUtil.isEmpty(m_paramEditorTitle)) { return key(Messages.GUI_EDITOR_TITLE_PREFIX_0) + " " + getParamResource(); } return m_paramEditorTitle; }