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
public class ShortToLongUrlTransformer extends Object implements UrlTransformer
Class description goes HERE- Author:
- Sumer Jabri, Alfonso Vásquez
-
-
Constructor Summary
Constructors Constructor Description ShortToLongUrlTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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)StringtransformUrl(Context context, CachingOptions cachingOptions, String url)
-
-
-
Method Detail
-
setContainsShortNameRegex
public void setContainsShortNameRegex(String containsShortNameRegex)
-
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
-
-