public class ContentBundleShortToLongUrlTransformer extends ShortToLongUrlTransformer
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).ContentBundleMergeStrategy| Constructor and Description |
|---|
ContentBundleShortToLongUrlTransformer() |
| Modifier and Type | Method and Description |
|---|---|
void |
setBaseDelimiter(String baseDelimiter) |
void |
setUrlParser(ContentBundleUrlParser urlParser) |
String |
transformUrl(Context context,
CachingOptions cachingOptions,
String url) |
getLongName, getLongUrl, setContainsShortNameRegex, setShortNameRegexGrouppublic ContentBundleShortToLongUrlTransformer()
public void setUrlParser(ContentBundleUrlParser urlParser)
public void setBaseDelimiter(String baseDelimiter)
public String transformUrl(Context context, CachingOptions cachingOptions, String url) throws UrlTransformationException
transformUrl in interface UrlTransformertransformUrl in class ShortToLongUrlTransformerUrlTransformationExceptionCopyright © 2018 CrafterCMS. All rights reserved.