use of org.craftercms.core.url.UrlTransformer in project core by craftercms.
the class UrlTransformationEngineImpl method doTransformUrl.
@Override
protected String doTransformUrl(Context context, CachingOptions cachingOptions, String transformerName, String url) throws UrlTransformationException {
UrlTransformer transformer = transformers.get(transformerName);
if (transformer == null) {
throw new UrlTransformationException("Url transformer " + transformerName + " not found");
}
String result = transformer.transformUrl(context, cachingOptions, url);
if (StringUtils.isEmpty(result)) {
result = "/";
}
if (logger.isDebugEnabled()) {
logger.debug("Transformation in: " + url + ", Transformation out: " + result);
}
return result;
}
Aggregations