/** * Returns the link for the given workplace resource. * * This should only be used for resources under /system or /shared.<p< * * @param cms the current OpenCms user context * @param resourceName the resource to generate the online link for * @param forceSecure forces the secure server prefix * * @return the link for the given resource */ public String getWorkplaceLink(CmsObject cms, String resourceName, boolean forceSecure) { String result = substituteLinkForUnknownTarget(cms, resourceName, forceSecure); return appendServerPrefix(cms, result, resourceName, true); }
/** * Returns the link for the given resource in the current project, with full server prefix.<p> * * Like <code>http://site.enterprise.com:8080/index.html</code>.<p> * * In case the resource name is a full root path, the site from the root path will be used. * Otherwise the resource is assumed to be in the current site set be the OpenCms user context.<p> * * @param cms the current OpenCms user context * @param resourceName the resource to generate the online link for * @param forceSecure forces the secure server prefix * * @return the link for the given resource in the current project, with full server prefix * * @see #getOnlineLink(CmsObject, String) */ public String getServerLink(CmsObject cms, String resourceName, boolean forceSecure) { String result = substituteLinkForUnknownTarget(cms, resourceName, forceSecure); return appendServerPrefix(cms, result, resourceName, false); }
/** * Returns the link for the given resource in the current project, with full server prefix.<p> * * Like <code>http://site.enterprise.com:8080/index.html</code>.<p> * * In case the resource name is a full root path, the site from the root path will be used. * Otherwise the resource is assumed to be in the current site set be the OpenCms user context.<p> * * @param cms the current OpenCms user context * @param resourceName the resource to generate the online link for * * @return the link for the given resource in the current project, with full server prefix * * @see #getOnlineLink(CmsObject, String) */ public String getServerLink(CmsObject cms, String resourceName) { String result = substituteLinkForUnknownTarget(cms, resourceName); return appendServerPrefix(cms, result); }
cms.getRequestContext().setCurrentProject(cms.readProject(CmsProject.ONLINE_PROJECT_ID)); result = substituteLinkForUnknownTarget(cms, resourceName, forceSecure); result = appendServerPrefix(cms, result, resourceName, false); } finally { cms.getRequestContext().setCurrentProject(currentProject);
cms.getRequestContext().setCurrentProject(cms.readProject(CmsProject.ONLINE_PROJECT_ID)); result = substituteLinkForUnknownTarget(cms, resourceName); result = appendServerPrefix(cms, result); } finally { cms.getRequestContext().setCurrentProject(currentProject);
cms.getRequestContext().setCurrentProject(cms.readProject(CmsProject.ONLINE_PROJECT_ID)); result = substituteLinkForUnknownTarget(cms, resourceName, targetDetailPage, forceSecure); result = appendServerPrefix(cms, result, resourceName, false); } finally { cms.getRequestContext().setCurrentProject(currentProject);