/** * Returns <code>true</code> if the given site matcher matches the current site.<p> * * @param cms the current OpenCms user context * @param matcher the site matcher to match the site with * * @return <code>true</code> if the matcher matches the current site */ public boolean isMatchingCurrentSite(CmsObject cms, CmsSiteMatcher matcher) { return m_siteMatcherSites.get(matcher) == getCurrentSite(cms); }
/** * Returns <code>true</code> if the given site matcher matches the current site.<p> * * @param cms the current OpenCms user context * @param matcher the site matcher to match the site with * * @return <code>true</code> if the matcher matches the current site */ public boolean isMatchingCurrentSite(CmsObject cms, CmsSiteMatcher matcher) { return m_siteMatcherSites.get(matcher) == getCurrentSite(cms); }
/** * Returns the current site for the provided OpenCms user context object.<p> * * In the unlikely case that no site matches with the provided OpenCms user context, * the default site is returned.<p> * * @param cms the OpenCms user context object to check for the site * * @return the current site for the provided OpenCms user context object * * @deprecated Use {@link OpenCms#getSiteManager()} to obtain the configured site manager instance, * then use the method with the same name and signature. */ public static CmsSite getCurrentSite(CmsObject cms) { return OpenCms.getSiteManager().getCurrentSite(cms); }
/** * Returns the URL of the page to be displayed on the imprint.<p> * * @return the URL of the page */ public String getUrl() { StringBuffer result = new StringBuffer(64); CmsSite site = OpenCms.getSiteManager().getCurrentSite(getCmsObject()); result.append(site.getUrl()); result.append(link(getRequestContext().getUri())); return result.toString(); }
permalink += ext; String serverPrefix = OpenCms.getSiteManager().getCurrentSite(cms).getServerPrefix(cms, resourceName); if (!permalink.startsWith(serverPrefix)) { permalink = serverPrefix + permalink;
CmsResource resource1 = resource; CmsSite site = OpenCms.getSiteManager().getCurrentSite(cms);
} else { preSelection = OpenCms.getSiteManager().getCurrentSite(getCms()).getSiteRoot();
permalink += ext; CmsSite currentSite = OpenCms.getSiteManager().getCurrentSite(cms); String serverPrefix = null; if (currentSite == OpenCms.getSiteManager().getDefaultSite()) {
} else { preSelection = OpenCms.getSiteManager().getCurrentSite(getCms()).getSiteRoot();
if (secure) { CmsSite site = OpenCms.getSiteManager().getCurrentSite(cms);
CmsSite currentSite = OpenCms.getSiteManager().getCurrentSite(cms); CmsSite targetSite = null; if (CmsStringUtil.isNotEmpty(siteRoot)) {
CmsSite currentSite = OpenCms.getSiteManager().getCurrentSite(cms); CmsSite targetSite = null; if (CmsStringUtil.isNotEmpty(siteRoot)) {
description, OpenCms.getLocaleManager().getDefaultLocale(cms, baseFolder).toString(), OpenCms.getSiteManager().getCurrentSite(cms).getUrl() + OpenCms.getLinkManager().substituteLinkForUnknownTarget(cms, basePath), title);
CmsSite site = OpenCms.getSiteManager().getCurrentSite(context.getCms()); m_noSecureServerLabel.setVisible(false); if ((site != null) && !site.hasSecureServer()) {