Package org.craftercms.core.url.impl
Class ShortToLongUrlTransformer
java.lang.Object
org.craftercms.core.url.impl.ShortToLongUrlTransformer
- All Implemented Interfaces:
UrlTransformer
- Direct Known Subclasses:
ContentBundleShortToLongUrlTransformer
Class description goes HERE
- Author:
- Sumer Jabri, Alfonso Vásquez
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
getLongName
(Context context, CachingOptions cachingOptions, String folderPath, String shortName) protected String
getLongUrl
(Context context, CachingOptions cachingOptions, String shortUrl, boolean useShortNameIfLongNameNotFound) void
setContainsShortNameRegex
(String containsShortNameRegex) void
setShortNameRegexGroup
(int shortNameRegexGroup) transformUrl
(Context context, CachingOptions cachingOptions, String url)
-
Constructor Details
-
ShortToLongUrlTransformer
public ShortToLongUrlTransformer()
-
-
Method Details
-
setContainsShortNameRegex
-
setShortNameRegexGroup
public void setShortNameRegexGroup(int shortNameRegexGroup) -
transformUrl
public String transformUrl(Context context, CachingOptions cachingOptions, String url) throws UrlTransformationException - Specified by:
transformUrl
in interfaceUrlTransformer
- Throws:
UrlTransformationException
-
getLongName
protected String getLongName(Context context, CachingOptions cachingOptions, String folderPath, String shortName) throws UrlTransformationException - Throws:
UrlTransformationException
-
getLongUrl
protected String getLongUrl(Context context, CachingOptions cachingOptions, String shortUrl, boolean useShortNameIfLongNameNotFound) throws UrlTransformationException - Throws:
UrlTransformationException
-