Package org.opencms.staticexport
Class CmsLocalePrefixLinkSubstitutionHandler
java.lang.Object
org.opencms.staticexport.CmsDefaultLinkSubstitutionHandler
org.opencms.staticexport.CmsLocalePrefixLinkSubstitutionHandler
- All Implemented Interfaces:
I_CmsLinkSubstitutionHandler
Link substitution handler required to render single tree localized sites.
-
Field Summary
Fields inherited from class org.opencms.staticexport.CmsDefaultLinkSubstitutionHandler
ATTR_IS_IMAGE_LINK, DONT_USE_CURRENT_SITE_FOR_WORKPLACE_REQUESTS, OVERRIDE_SITEROOT_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddVfsPrefix
(CmsObject cms, String vfsName, CmsSite targetSite, String parameters) Adds the VFS prefix to the VFS name and potentially adjusts request parametersprotected String
generateCacheKey
(CmsObject cms, String sourceSiteRoot, String targetSiteRoot, String detailPagePart, String absoluteLink) Generates the cache key for Online links.protected String
getRootPathForSite
(CmsObject cms, String path, String siteRoot, boolean isRootPath) Returns the root path for given site.protected String
prepareExportParameters
(CmsObject cms, String vfsName, String parameters) Prepares the request parameters for the given resource.Methods inherited from class org.opencms.staticexport.CmsDefaultLinkSubstitutionHandler
getLink, getLink, getRootPath, getSimpleRootPath, isDetailPageLinkSecure, isSecureLink
-
Constructor Details
-
CmsLocalePrefixLinkSubstitutionHandler
-
-
Method Details
-
addVfsPrefix
protected CmsPair<String,String> addVfsPrefix(CmsObject cms, String vfsName, CmsSite targetSite, String parameters) Description copied from class:CmsDefaultLinkSubstitutionHandler
Adds the VFS prefix to the VFS name and potentially adjusts request parametersThis method is required as a hook used in
CmsLocalePrefixLinkSubstitutionHandler
.- Overrides:
addVfsPrefix
in classCmsDefaultLinkSubstitutionHandler
- Parameters:
cms
- the cms contextvfsName
- the VFS nametargetSite
- the target siteparameters
- the request parameters- Returns:
- the path and the (adjusted) request parameters.
- See Also:
-
generateCacheKey
protected String generateCacheKey(CmsObject cms, String sourceSiteRoot, String targetSiteRoot, String detailPagePart, String absoluteLink) Description copied from class:CmsDefaultLinkSubstitutionHandler
Generates the cache key for Online links.- Overrides:
generateCacheKey
in classCmsDefaultLinkSubstitutionHandler
- Parameters:
cms
- the current CmsObjectsourceSiteRoot
- the source site root (where the content linked to is located)targetSiteRoot
- the target site rootdetailPagePart
- the detail page partabsoluteLink
- the absolute (site-relative) link to the resource- Returns:
- the cache key
- See Also:
-
getRootPathForSite
protected String getRootPathForSite(CmsObject cms, String path, String siteRoot, boolean isRootPath) Description copied from class:CmsDefaultLinkSubstitutionHandler
Returns the root path for given site.This method is required as a hook used in
CmsLocalePrefixLinkSubstitutionHandler
.- Overrides:
getRootPathForSite
in classCmsDefaultLinkSubstitutionHandler
- Parameters:
cms
- the cms contextpath
- the pathsiteRoot
- the site root, will be null in case of the root siteisRootPath
- in case the path is already a root path- Returns:
- the root path
- See Also:
-
prepareExportParameters
Description copied from class:CmsDefaultLinkSubstitutionHandler
Prepares the request parameters for the given resource.This method is required as a hook used in
CmsLocalePrefixLinkSubstitutionHandler
.- Overrides:
prepareExportParameters
in classCmsDefaultLinkSubstitutionHandler
- Parameters:
cms
- the cms contextvfsName
- the vfs nameparameters
- the parameters to prepare- Returns:
- the root path
- See Also:
-