code: protected String getRootPathForSite(CmsObject cms, String path, String siteRoot, boolean isRootPath) {
  
          if (isRootPath || (siteRoot == null)) {
              return CmsStringUtil.joinPaths("/", path);
          } else {
              return cms.getRequestContext().addSiteRoot(siteRoot, path);
          }
      }
docs: Returns the root path for given site.<p>
  This method is required as a hook used in {@link CmsLocalePrefixLinkSubstitutionHandler}.<p>
  @param cms the cms context
  @param path the path
  @param siteRoot the site root, will be null in case of the root site
  @param isRootPath in case the path is already a root path
  
  @return the root path