/** * Returns the perma link for the given resource.<p> * * Like * <code>http://site.enterprise.com:8080/permalink/4b65369f-1266-11db-8360-bf0f6fbae1f8.html</code>.<p> * * @param cms the cms context * @param resourceName the resource to generate the perma link for * * @return the perma link */ public String getPermalink(CmsObject cms, String resourceName) { return getPermalink(cms, resourceName, null); }
/** * Returns the html code to build the header box.<p> * * @return html code * * @throws CmsException if something goes wrong */ public String buildLockHeaderBox() throws CmsException { StringBuffer html = new StringBuffer(512); // include resource info html.append(dialogBlockStart(null)); html.append(key(org.opencms.workplace.commons.Messages.GUI_LABEL_TITLE_0)); html.append(": "); html.append(getJsp().property("Title", getParamResource(), "")); html.append("<br>\n"); html.append(key(org.opencms.workplace.commons.Messages.GUI_LABEL_STATE_0)); html.append(": "); html.append(getState()); html.append("<br>\n"); html.append(key(org.opencms.workplace.commons.Messages.GUI_LABEL_PERMALINK_0)); html.append(": "); html.append(OpenCms.getLinkManager().getPermalink(getCms(), getParamResource())); html.append(dialogBlockEnd()); return html.toString(); }
/** * Returns the html code to build the header box.<p> * * @return html code * * @throws CmsException if something goes wrong */ public String buildLockHeaderBox() throws CmsException { StringBuffer html = new StringBuffer(512); // include resource info html.append(dialogBlockStart(null)); html.append(key(org.opencms.workplace.commons.Messages.GUI_LABEL_TITLE_0)); html.append(": "); html.append(getJsp().property("Title", getParamResource(), "")); html.append("<br>\n"); html.append(key(org.opencms.workplace.commons.Messages.GUI_LABEL_STATE_0)); html.append(": "); html.append(getState()); html.append("<br>\n"); html.append(key(org.opencms.workplace.commons.Messages.GUI_LABEL_PERMALINK_0)); html.append(": "); html.append(OpenCms.getLinkManager().getPermalink(getCms(), getParamResource())); html.append(dialogBlockEnd()); return html.toString(); }
/** * Returns the html code to add directly before the list inside the form element.<p> * * @return the html code to add directly before the list inside the form element */ @Override protected String customHtmlBeforeList() { StringBuffer result = new StringBuffer(256); result.append(dialogBlockStart(null)); result.append(key(Messages.GUI_LABEL_TITLE_0)); result.append(": "); result.append(getJsp().property("Title", getParamResource(), "")); result.append("<br>"); result.append(key(Messages.GUI_LABEL_STATE_0)); result.append(": "); try { result.append(getState()); } catch (CmsException e) { // not so important ... just go on } result.append("<br>"); result.append(key(Messages.GUI_LABEL_PERMALINK_0)); result.append(": "); result.append(OpenCms.getLinkManager().getPermalink(getCms(), getParamResource())); result.append(dialogBlockEnd()); result.append(dialogSpacer()); return result.toString(); }
/** * Returns the html code to add directly before the list inside the form element.<p> * * @return the html code to add directly before the list inside the form element */ @Override protected String customHtmlBeforeList() { StringBuffer result = new StringBuffer(256); result.append(dialogBlockStart(null)); result.append(key(Messages.GUI_LABEL_TITLE_0)); result.append(": "); result.append(getJsp().property("Title", getParamResource(), "")); result.append("<br>"); result.append(key(Messages.GUI_LABEL_STATE_0)); result.append(": "); try { result.append(getState()); } catch (CmsException e) { // not so important ... just go on } result.append("<br>"); result.append(key(Messages.GUI_LABEL_PERMALINK_0)); result.append(": "); result.append(OpenCms.getLinkManager().getPermalink(getCms(), getParamResource())); result.append(dialogBlockEnd()); result.append(dialogSpacer()); return result.toString(); }
/** * Returns the perma link for the current page based on the URI and detail content id stored in the CmsObject passed as a parameter.<p< * * @param cms the CMS context to use to generate the permalink * * @return the permalink */ public String getPermalinkForCurrentPage(CmsObject cms) { return getPermalink(cms, cms.getRequestContext().getUri(), cms.getRequestContext().getDetailContentId()); }
additionalAttributes.put( Messages.get().getBundle(locale).key(Messages.GUI_STATUS_PERMALINK_0), OpenCms.getLinkManager().getPermalink(cms, cms.getSitePath(resource), detailContentId));