Package org.craftercms.core.url.impl
Class ContentBundleShortToLongUrlTransformer
java.lang.Object
org.craftercms.core.url.impl.ShortToLongUrlTransformer
org.craftercms.core.url.impl.ContentBundleShortToLongUrlTransformer
- All Implemented Interfaces:
UrlTransformer
This transformer is similar to
ShortToLongUrlTransformer
, but also looks in a content bundle for an
item name (long name) that can be mapped to the short name.
See ContentBundleMergeStrategy
for more information
about content bundles.
E.g., from the request /main/website/groups/sport/base_fr_nhl/sport_page_one.xml
it looks in folders
in the following order base_fr_nhl
, base_fr
and base
. Then suppose that
sport_page_one.xml
exists only in base
folder with name
013_sport_page_one.xml
. So the transformation result will be
/main/website/groups/007_sport/base_fr_nhl/013_sport_page_one.xml
(the original base is kept).- Author:
- Sumer Jabri, Alfonso Vásquez
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setBaseDelimiter
(String baseDelimiter) void
setUrlParser
(ContentBundleUrlParser urlParser) transformUrl
(Context context, CachingOptions cachingOptions, String url) Methods inherited from class org.craftercms.core.url.impl.ShortToLongUrlTransformer
getLongName, getLongUrl, setContainsShortNameRegex, setShortNameRegexGroup
-
Constructor Details
-
ContentBundleShortToLongUrlTransformer
public ContentBundleShortToLongUrlTransformer()
-
-
Method Details
-
setUrlParser
-
setBaseDelimiter
-
transformUrl
public String transformUrl(Context context, CachingOptions cachingOptions, String url) throws UrlTransformationException - Specified by:
transformUrl
in interfaceUrlTransformer
- Overrides:
transformUrl
in classShortToLongUrlTransformer
- Throws:
UrlTransformationException
-