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 StringgetLongName(Context context, CachingOptions cachingOptions, String folderPath, String shortName) protected StringgetLongUrl(Context context, CachingOptions cachingOptions, String shortUrl, boolean useShortNameIfLongNameNotFound) voidsetContainsShortNameRegex(String containsShortNameRegex) voidsetShortNameRegexGroup(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:
transformUrlin 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
-