Package org.craftercms.core.url.impl
Class LongToShortUrlTransformer
- java.lang.Object
-
- org.craftercms.core.url.impl.LongToShortUrlTransformer
-
- All Implemented Interfaces:
UrlTransformer
public class LongToShortUrlTransformer extends Object implements UrlTransformer
Class description goes HERE- Author:
- Sumer Jabri, Alfonso Vásquez
-
-
Field Summary
Fields Modifier and Type Field Description static String
URL_NUMBERED_NAME_REGEX
static int
URL_NUMBERED_NAME_REGEX_SHORT_NAME_GROUP
-
Constructor Summary
Constructors Constructor Description LongToShortUrlTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getShortUrl(String longUrl)
void
setContainsShortNameRegex(String containsShortNameRegex)
void
setShortNameRegexGroup(int shortNameRegexGroup)
String
transformUrl(Context context, CachingOptions cachingOptions, String url)
-
-
-
Field Detail
-
URL_NUMBERED_NAME_REGEX
public static final String URL_NUMBERED_NAME_REGEX
- See Also:
- Constant Field Values
-
URL_NUMBERED_NAME_REGEX_SHORT_NAME_GROUP
public static final int URL_NUMBERED_NAME_REGEX_SHORT_NAME_GROUP
- See Also:
- Constant Field Values
-
-
Method Detail
-
setContainsShortNameRegex
public void setContainsShortNameRegex(String containsShortNameRegex)
-
setShortNameRegexGroup
public void setShortNameRegexGroup(int shortNameRegexGroup)
-
transformUrl
public String transformUrl(Context context, CachingOptions cachingOptions, String url)
- Specified by:
transformUrl
in interfaceUrlTransformer
-
-