|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.staticexport.CmsDefaultLinkSubstitutionHandler
org.opencms.staticexport.CmsAdvancedLinkSubstitutionHandler
public class CmsAdvancedLinkSubstitutionHandler
Advanced link substitution behavior.
You can define additional paths that are always used as external links, even if they point to the same configured site than the OpenCms itself.
for the method where this handler is used.
Constructor Summary | |
---|---|
CmsAdvancedLinkSubstitutionHandler()
|
Method Summary | |
---|---|
java.lang.String |
getRootPath(CmsObject cms,
java.lang.String targetUri,
java.lang.String basePath)
Returns the resource root path in the OpenCms VFS for the given target URI link, or null in
case the link points to an external site. |
Methods inherited from class org.opencms.staticexport.CmsDefaultLinkSubstitutionHandler |
---|
getLink |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmsAdvancedLinkSubstitutionHandler()
Method Detail |
---|
public java.lang.String getRootPath(CmsObject cms, java.lang.String targetUri, java.lang.String basePath)
I_CmsLinkSubstitutionHandler
null
in
case the link points to an external site.The default implementation applies the following transformations to the link:
/opencms/opencms
,
this prefix is removed from the result
basePath
as starting point.
http://www.mysite.de/
),
which points to a configured site in OpenCms, the server schema is replaced with
the root path of the site.
null
is returned.
CmsDefaultLinkSubstitutionHandler
, which can be fully customized using this handler interface.
getRootPath
in interface I_CmsLinkSubstitutionHandler
getRootPath
in class CmsDefaultLinkSubstitutionHandler
cms
- the current users OpenCms contexttargetUri
- the target URI linkbasePath
- path to use as base in case the target URI is relative (can be null
)
null
in
case the link points to an external siteI_CmsLinkSubstitutionHandler.getRootPath(org.opencms.file.CmsObject, java.lang.String, java.lang.String)
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |