/** * Returns the OpenCms workplace request context, e.g. "/opencms/workplace".<p> * * The OpenCms workplace context will always start with a "/" and never have a trailing "/". * The OpenCms context is identical to <code>getContexPath() + WORKPLACE_PATH</code>.<p> * * @return the OpenCms request context, e.g. "/opencms/workplace" * @see #getContextPath() * @see #WORKPLACE_PATH */ public String getWorkplaceContext() { return getContextPath() + WORKPLACE_PATH; }
/** * Returns the path to the skin resources.<p> * * @return the path to the skin resources */ public static String getSkinUri() { if (m_skinUri == null) { m_skinUri = OpenCms.getSystemInfo().getContextPath() + RFS_PATH_RESOURCES; } return m_skinUri; }
/** * Returns the path to the skin resources.<p> * * @return the path to the skin resources */ public static String getSkinUri() { if (m_skinUri == null) { m_skinUri = OpenCms.getSystemInfo().getContextPath() + RFS_PATH_RESOURCES; } return m_skinUri; }
/** * Returns the path to the workplace static resources.<p> * * Workplaces static resources are images, css files etc. * These are exported during the installation of OpenCms, * and are usually only read from this exported location to * avoid the overhaead of accessing the database later.<p> * * @return the path to the workplace static resources */ public String getResourceUri() { if (m_resourceUri == null) { m_resourceUri = OpenCms.getSystemInfo().getContextPath() + CmsWorkplace.RFS_PATH_RESOURCES; } return m_resourceUri; }
/** * Returns the path to the workplace static resources.<p> * * Workplaces static resources are images, css files etc. * These are exported during the installation of OpenCms, * and are usually only read from this exported location to * avoid the overhaead of accessing the database later.<p> * * @return the path to the workplace static resources */ public String getResourceUri() { if (m_resourceUri == null) { m_resourceUri = OpenCms.getSystemInfo().getContextPath() + CmsWorkplace.RFS_PATH_RESOURCES; } return m_resourceUri; }
/** * Gets the link to the (new) workplace.<p> * * @return the link to the workplace */ public static String getWorkplaceLink() { return CmsStringUtil.joinPaths("/", OpenCms.getSystemInfo().getContextPath(), "workplace"); }
/** * Gets the link to an image below the img-extra folder.<p> * * @param imagePath the image path below img-extra * * @return the complete image link */ public static String getImageLink(String imagePath) { return CmsStringUtil.joinPaths( OpenCms.getSystemInfo().getContextPath(), "VAADIN/themes/opencms/img-extra", imagePath); }
m_contextPath = OpenCms.getSystemInfo().getContextPath(); m_servletPath = OpenCms.getSystemInfo().getServletPath() + "/";
/** * @see org.opencms.gwt.CmsGwtActionElement#exportAll() */ @Override public String exportAll() throws Exception { StringBuffer sb = new StringBuffer(); sb.append(super.export(".vfsMode")); sb.append( exportDictionary( CmsSitemapData.DICT_NAME, I_CmsSitemapService.class.getMethod("prefetch", String.class), getSitemapData())); sb.append(exportModuleScriptTag(GWT_MODULE_NAME)); String vaadinBootstrap = CmsStringUtil.joinPaths( OpenCms.getSystemInfo().getContextPath(), "VAADIN/vaadinBootstrap.js"); sb.append(" <script type=\"text/javascript\"\n" + " src=\"" + vaadinBootstrap + "\"></script>"); sb.append( "<script type='text/javascript'> \n" + "function initVaadin() { " + CmsVaadinUtils.getBootstrapScript(getCmsObject(), "sitemap-ui", "workplace/sitemap/") + " } " + "</script>"); return sb.toString(); }
if (rfsPath.startsWith(OpenCms.getSystemInfo().getContextPath())) { rfsPath = rfsPath.substring(OpenCms.getSystemInfo().getContextPath().length());
String path = OpenCms.getStaticExportManager().getVfsPrefix(); int port = jsp.getRequest().getServerPort(); String webapp = scheme + "://" + host + ":" + port + OpenCms.getSystemInfo().getContextPath();
String path = OpenCms.getStaticExportManager().getVfsPrefix(); int port = jsp.getRequest().getServerPort(); String webapp = scheme + "://" + host + ":" + port + OpenCms.getSystemInfo().getContextPath();
/** * Substitutes the ${CONTEXT_NAME} and ${SERVLET_NAME} in a path with the real values.<p> * * @param path the path to substitute * @return path with real context values */ protected String insertContextStrings(String path) { // create a new macro resolver CmsMacroResolver resolver = CmsMacroResolver.newInstance(); // add special mappings for macros resolver.addMacro("CONTEXT_NAME", OpenCms.getSystemInfo().getContextPath()); resolver.addMacro("SERVLET_NAME", OpenCms.getSystemInfo().getServletPath()); // resolve the macros return resolver.resolveMacros(path); }
/** * Substitutes the ${CONTEXT_NAME} and ${SERVLET_NAME} in a path with the real values.<p> * * @param path the path to substitute * @return path with real context values */ protected String insertContextStrings(String path) { // create a new macro resolver CmsMacroResolver resolver = CmsMacroResolver.newInstance(); // add special mappings for macros resolver.addMacro("CONTEXT_NAME", OpenCms.getSystemInfo().getContextPath()); resolver.addMacro("SERVLET_NAME", OpenCms.getSystemInfo().getServletPath()); // resolve the macros return resolver.resolveMacros(path); }
String page = new String(pageBytes, "UTF-8"); CmsMacroResolver resolver = new CmsMacroResolver(); String context = OpenCms.getSystemInfo().getContextPath(); String vaadinDir = CmsStringUtil.joinPaths(context, "VAADIN/"); String vaadinVersion = Version.getFullVersion();
/** * Gets the path to use for the authorization cookie, optionally resolving any macros used.<p> * * @param resolveMacros if true, macros should be resolved * @return the authorization cookie path */ public String getCookiePath(boolean resolveMacros) { String result = m_cookiePath; if (resolveMacros) { CmsMacroResolver resolver = new CmsMacroResolver(); // add special mappings for macros resolver.addMacro("CONTEXT_NAME", OpenCms.getSystemInfo().getContextPath()); resolver.addMacro("SERVLET_NAME", OpenCms.getSystemInfo().getServletPath()); result = resolver.resolveMacros(result); } return result; }
String page = new String(pageBytes, "UTF-8"); CmsMacroResolver resolver = new CmsMacroResolver(); String context = OpenCms.getSystemInfo().getContextPath(); String vaadinDir = CmsStringUtil.joinPaths(context, "VAADIN/"); String vaadinVersion = Version.getFullVersion(); String autocomplete = params.isPrivatePc() ? "on" : "off"; String cmsLogo = OpenCms.getSystemInfo().getContextPath() + CmsWorkplace.RFS_PATH_RESOURCES + "commons/login_logo.png";
return OpenCms.getSystemInfo().getContextPath();
/** * Returns the Javascript code to use for initializing a Vaadin UI.<p> * * @param cms the CMS context * @param elementId the id of the DOM element in which to initialize the UI * @param servicePath the UI servlet path * @return the Javascript code to initialize Vaadin * * @throws Exception if something goes wrong */ public static String getBootstrapScript(CmsObject cms, String elementId, String servicePath) throws Exception { String script = BOOTSTRAP_SCRIPT; CmsMacroResolver resolver = new CmsMacroResolver(); String context = OpenCms.getSystemInfo().getContextPath(); String vaadinDir = CmsStringUtil.joinPaths(context, "VAADIN/"); String vaadinVersion = Version.getFullVersion(); String vaadinServlet = CmsStringUtil.joinPaths(context, servicePath); String vaadinBootstrap = CmsStringUtil.joinPaths(context, "VAADIN/vaadinBootstrap.js"); resolver.addMacro("vaadinDir", vaadinDir); resolver.addMacro("vaadinVersion", vaadinVersion); resolver.addMacro("elementId", elementId); resolver.addMacro("vaadinServlet", vaadinServlet); resolver.addMacro("vaadinBootstrap", vaadinBootstrap); script = resolver.resolveMacros(script); return script; }