Package org.craftercms.core.url.impl
Class ExtractRequestAttributesUrlTransformer
- java.lang.Object
-
- org.craftercms.core.url.impl.ExtractRequestAttributesUrlTransformer
-
- All Implemented Interfaces:
UrlTransformer
public class ExtractRequestAttributesUrlTransformer extends Object implements UrlTransformer
Extracts a request attribute from the URL, and finally removes it from the URL. E.g.: with a URI template like /site/website/{event}/details/index.xml and a url like /site/website/1/details/index.xml, the resulting url will be /site/website/details/index.xml, with request attribute event = 1.- Author:
- Praveen Elineni, Alfonso Vásquez
-
-
Constructor Summary
Constructors Constructor Description ExtractRequestAttributesUrlTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setUriTemplate(String uriTemplate)
String
transformUrl(Context context, CachingOptions cachingOptions, String url)
-
-
-
Method Detail
-
setUriTemplate
public void setUriTemplate(String uriTemplate)
-
transformUrl
public String transformUrl(Context context, CachingOptions cachingOptions, String url) throws UrlTransformationException
- Specified by:
transformUrl
in interfaceUrlTransformer
- Throws:
UrlTransformationException
-
-