Package org.opencms.xml
Class CmsLinkFinisher
java.lang.Object
org.opencms.xml.CmsLinkFinisher
Does final postprocessing on a link by cutting off specific path suffixes (e.g. index.html).
-
Constructor Summary
ConstructorsConstructorDescriptionCmsLinkFinisher
(boolean enabled, Collection<String> defaultFileNames, String exclude) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptiontransformLink
(String link, boolean full) Transforms the link into a finished format.
-
Constructor Details
-
CmsLinkFinisher
Creates a new instance.- Parameters:
enabled
- true if it should be enableddefaultFileNames
- the default file names to removeexclude
- regex to prevent certain links from being finished if they match
-
-
Method Details
-
transformLink
Transforms the link into a finished format.- Parameters:
link
- the linkfull
- in full mode, remove all configured suffixes, otherwise just remove trailing slashes- Returns:
-