/** * @see org.opencms.workplace.editors.I_CmsEditorActionHandler#getButtonUrl(CmsJspActionElement, java.lang.String) */ public String getButtonUrl(CmsJspActionElement jsp, String resourceName) { // get the button image String button = CmsWorkplace.VFS_PATH_RESOURCES + "buttons/publish.png"; if (!isButtonActive(jsp, resourceName)) { // show disabled button if not active button = CmsWorkplace.VFS_PATH_RESOURCES + "buttons/publish_in.png"; } return jsp.link(button); }
/** * @see org.opencms.workplace.editors.I_CmsEditorActionHandler#getButtonUrl(CmsJspActionElement, java.lang.String) */ public String getButtonUrl(CmsJspActionElement jsp, String resourceName) { // get the button image String button = CmsWorkplace.VFS_PATH_RESOURCES + "buttons/publish.png"; if (!isButtonActive(jsp, resourceName)) { // show disabled button if not active button = CmsWorkplace.VFS_PATH_RESOURCES + "buttons/publish_in.png"; } return jsp.link(button); }
/** * Returns the reload URI for the OpenCms workplace.<p> * * @return the reload URI for the OpenCms workplace */ public String getWorkplaceReloadUri() { return getJsp().link(CmsFrameset.JSP_WORKPLACE_URI); }
/** * Returns the reload URI for the OpenCms workplace.<p> * * @return the reload URI for the OpenCms workplace */ public String getWorkplaceReloadUri() { return getJsp().link(CmsFrameset.JSP_WORKPLACE_URI); }
/** * Returns the OpenCms link for the given tool path which requires no parameters.<p> * * @param jsp the jsp action element * @param toolPath the tool path * * @return the OpenCms link for the given tool path which requires parameters */ public static String linkForToolPath(CmsJspActionElement jsp, String toolPath) { StringBuffer result = new StringBuffer(); result.append(jsp.link(VIEW_JSPPAGE_LOCATION)); result.append('?'); result.append(CmsToolDialog.PARAM_PATH); result.append('='); result.append(CmsEncoder.encode(toolPath)); return result.toString(); }
/** * Returns the OpenCms link for the given tool path which requires no parameters.<p> * * @param jsp the jsp action element * @param toolPath the tool path * * @return the OpenCms link for the given tool path which requires parameters */ public static String linkForToolPath(CmsJspActionElement jsp, String toolPath) { StringBuffer result = new StringBuffer(); result.append(jsp.link(VIEW_JSPPAGE_LOCATION)); result.append('?'); result.append(CmsToolDialog.PARAM_PATH); result.append('='); result.append(CmsEncoder.encode(toolPath)); return result.toString(); }
/** * Builds the java script code to build the report.<p> * * @return html code with the java script to use ajax to create the report */ public String buildReportRequest() { StringBuffer html = new StringBuffer(512); html.append("<script type='text/javascript'><!--\n"); html.append("makeRequest('"); html.append(getJsp().link("/system/workplace/commons/report-deleted.jsp")); html.append("', '"); html.append(CmsDialog.PARAM_RESOURCE); html.append("="); html.append(getParamResource()); html.append("', 'doReportUpdate');\n"); html.append("// -->\n"); html.append("</script>\n"); return html.toString(); }
/** * Returns the html for the "publish queue" button.<p> * * @return the html for the "publish queue" button */ public String getPublishQueueButton() { int buttonStyle = getSettings().getUserSettings().getWorkplaceButtonStyle(); StringBuffer js = new StringBuffer(128); js.append("javascript:if (parent.body.admin_content && parent.body.admin_menu) {"); js.append("parent.body.location.href = '"); js.append(getJsp().link("/system/workplace/views/admin/admin-fs.jsp?root=admin&path=/publishqueue")); js.append("';"); js.append("} else {"); js.append("parent.body.explorer_body.explorer_files.location.href = '"); js.append(getJsp().link("/system/workplace/views/admin/admin-fs.jsp?root=explorer&path=/publishqueue&menu=no")); js.append("';"); js.append("};"); return button(js.toString(), null, "publish_queue.png", Messages.GUI_BUTTON_PUBLISHQUEUE_0, buttonStyle); }
/** * Returns the html for the "publish queue" button.<p> * * @return the html for the "publish queue" button */ public String getPublishQueueButton() { int buttonStyle = getSettings().getUserSettings().getWorkplaceButtonStyle(); StringBuffer js = new StringBuffer(128); js.append("javascript:if (parent.body.admin_content && parent.body.admin_menu) {"); js.append("parent.body.location.href = '"); js.append(getJsp().link("/system/workplace/views/admin/admin-fs.jsp?root=admin&path=/publishqueue")); js.append("';"); js.append("} else {"); js.append("parent.body.explorer_body.explorer_files.location.href = '"); js.append(getJsp().link("/system/workplace/views/admin/admin-fs.jsp?root=explorer&path=/publishqueue&menu=no")); js.append("';"); js.append("};"); return button(js.toString(), null, "publish_queue.png", Messages.GUI_BUTTON_PUBLISHQUEUE_0, buttonStyle); }
/** * Returns the explorer files frame content uri.<p> * * Used by the explorer_body_fs.jsp.<p> * * @return the explorer files frame content uri */ public String getExplorerFilesUri() { String body = "explorer_files.jsp?mode=explorerview"; if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_uri)) { body = m_uri; } return getJsp().link(body); }
/** * Returns the explorer files frame content uri.<p> * * Used by the explorer_body_fs.jsp.<p> * * @return the explorer files frame content uri */ public String getExplorerFilesUri() { String body = "explorer_files.jsp?mode=explorerview"; if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_uri)) { body = m_uri; } return getJsp().link(body); }
/** * Returns the explorer body frame content uri.<p> * * Used by the explorer_fs.jsp.<p> * * @return the explorer body frame content uri */ public String getExplorerBodyUri() { String body = "explorer_body_fs.jsp"; if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_uri)) { body += "?" + PARAMETER_URI + "=" + m_uri; } return getJsp().link(body); }
/** * Returns the explorer body frame content uri.<p> * * Used by the explorer_fs.jsp.<p> * * @return the explorer body frame content uri */ public String getExplorerBodyUri() { String body = CmsWorkplace.VFS_PATH_VIEWS + "explorer/explorer_body_fs.jsp"; if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_uri)) { body += "?" + PARAMETER_URI + "=" + m_uri; } return getJsp().link(body); }
/** * Performs the user agreement declined action, will be called by the JSP page.<p> * * @throws IOException if problems while redirecting occur */ public void actionDecline() throws IOException { getJsp().getRequest().getSession().invalidate(); getJsp().getResponse().sendRedirect(getJsp().link(getParamWpres())); }
/** * Returns the http URI of the current dialog, to be used * as value for the "action" attribute of a html form.<p> * * @return the http URI of the current dialog */ @Override public String getDialogUri() { if (!useNewStyle()) { return getJsp().link(VFS_PATH_COMMONS + "newresource_xmlcontent.jsp"); } else { return super.getDialogUri(); } }
/** * Returns the http URI of the current dialog, to be used * as value for the "action" attribute of a html form.<p> * * @return the http URI of the current dialog */ @Override public String getDialogUri() { if (!useNewStyle()) { return getJsp().link(VFS_PATH_COMMONS + "newresource_xmlcontent.jsp"); } else { return super.getDialogUri(); } }
/** * Performs the the user agreement accept action, will be called by the JSP page.<p> * * @throws IOException if problems while redirecting occur */ public void actionAccept() throws IOException { acceptAgreement(); // redirect to the originally requested resource getJsp().getResponse().sendRedirect(getJsp().link(getParamWpres())); }
/** * Returns the http URI of the current dialog, to be used * as value for the "action" attribute of a html form.<p> * * This URI is the real one.<p> * * @return the http URI of the current dialog */ public String getDialogRealUri() { return getJsp().link(getJsp().getRequestContext().getUri()); }
/** * Returns the http URI of the current dialog, to be used * as value for the "action" attribute of a html form.<p> * * This URI is the real one.<p> * * @return the http URI of the current dialog */ public String getDialogRealUri() { return getJsp().link(getJsp().getRequestContext().getUri()); }
/** * Forwards to the specified location in the OpenCms VFS.<p> * * @param location the location the response is redirected to * @param params the map of parameters to use for the forwarded request * * @throws IOException in case the forward fails * @throws ServletException in case the forward fails */ public void sendForward(String location, Map params) throws IOException, ServletException { setForwarded(true); // params must be arrays of String, ensure this is the case params = CmsRequestUtil.createParameterMap(params); CmsRequestUtil.forwardRequest(getJsp().link(location), params, getJsp().getRequest(), getJsp().getResponse()); }