Allows to configure customized link substitution behavior.
This handler is plugged into
which is the central method to calculate links for the use on web pages.
This method is also used by the
<cms:link /> tag.
Moreover, this handler is plugged into
which basically is the revered method that gets a VFS root path from a link.
For the implementation, you must implement the methods in this interface so that:
String path; // assume we have a valid VFS resource root path
CmsObject cms; // assume we have a valid OpenCms user context
CmsLinkManager lm = OpenCms.getLinkManager();
String link = lm.substituteLinkForRootPath(cms, path);
String rootPath = lm.getRootPath(cms, link);
link.equals(rootPath); // this must be true!
Using this handler, you can completely customize the behavior of the link substitution.
The default implementation of this interface is