/** * Returns the uri of the dialog which will be displayed.<p> * * @return the uri of the property dialog */ public String getSelectedEditorUri() { // get the handler class from the OpenCms runtime property I_CmsEditorHandler editorClass = OpenCms.getWorkplaceManager().getEditorHandler(); // the resourcenameparameter could be encoded, so decode it String resource = getParamResource(); resource = CmsEncoder.unescape(resource, CmsEncoder.ENCODING_UTF_8); if (editorClass == null) { // error getting the dialog class, return to file list return CmsWorkplace.FILE_EXPLORER_FILELIST; } // get the dialog URI from the class defined in the configuration String editorUri = null; try { editorUri = editorClass.getEditorUri(resource, getJsp()); if (editorUri == null) { // no valid editor was found, show the error dialog throw new CmsWorkplaceException(Messages.get().container(Messages.ERR_NO_EDITOR_FOUND_0)); } } catch (CmsException e) { showErrorDialog(getJsp(), e); } return editorUri; }
/** * Returns the uri of the dialog which will be displayed.<p> * * @return the uri of the property dialog */ public String getSelectedEditorUri() { // get the handler class from the OpenCms runtime property I_CmsEditorHandler editorClass = OpenCms.getWorkplaceManager().getEditorHandler(); // the resourcenameparameter could be encoded, so decode it String resource = getParamResource(); resource = CmsEncoder.unescape(resource, CmsEncoder.ENCODING_UTF_8); if (editorClass == null) { // error getting the dialog class, return to file list return CmsWorkplace.FILE_EXPLORER_FILELIST; } // get the dialog URI from the class defined in the configuration String editorUri = null; try { editorUri = editorClass.getEditorUri(resource, getJsp()); if (editorUri == null) { // no valid editor was found, show the error dialog throw new CmsWorkplaceException(Messages.get().container(Messages.ERR_NO_EDITOR_FOUND_0)); } } catch (CmsException e) { showErrorDialog(getJsp(), e); } return editorUri; }
/** * @see org.opencms.workplace.tools.I_CmsHtmlIconButton#isVisible() */ @Override public boolean isVisible() { if (getResourceName() != null) { try { // if resource type if editable if (OpenCms.getWorkplaceManager().getEditorHandler().getEditorUri( getResourceName(), getWp().getJsp()) != null) { // check lock state CmsLock lock = getResourceUtil().getLock(); if (lock.isNullLock() || lock.isOwnedBy((getWp().getCms().getRequestContext().getCurrentUser()))) { return isEnabled(); } } } catch (Throwable e) { // ignore } } return !isEnabled(); }
/** * @see org.opencms.workplace.tools.I_CmsHtmlIconButton#isVisible() */ @Override public boolean isVisible() { if (getResourceName() != null) { try { // if resource type if editable if (OpenCms.getWorkplaceManager().getEditorHandler().getEditorUri(getResourceName(), getWp().getJsp()) != null) { // check lock state CmsLock lock = getResourceUtil().getLock(); if (lock.isNullLock() || lock.isOwnedBy((getWp().getCms().getRequestContext().currentUser()))) { return isEnabled(); } } } catch (Throwable e) { // ignore } } return !isEnabled(); }
sessionCache.setTemplateBean(containerPage.getRootPath(), templateBean); long lastModified = containerPage.getDateLastModified(); String editorUri = OpenCms.getWorkplaceManager().getEditorHandler().getEditorUri( cms, "xmlcontent",