Class ItemUrlTransformingProcessor
- java.lang.Object
-
- org.craftercms.core.processors.impl.ItemUrlTransformingProcessor
-
- All Implemented Interfaces:
ItemProcessor
public class ItemUrlTransformingProcessor extends Object implements ItemProcessor
ItemProcessorthat takes the item url, transforms it by calling the transformation engine, and places the transformed url in the properties.- Author:
- Alfonso Vásquez
-
-
Field Summary
Fields Modifier and Type Field Description protected StringtransformedUrlPropNameprotected StringtransformerNameprotected UrlTransformationEngineurlTransformationEngine
-
Constructor Summary
Constructors Constructor Description ItemUrlTransformingProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Itemprocess(Context context, CachingOptions cachingOptions, Item item)Processes anItem.voidsetTransformedUrlPropName(String transformedUrlPropName)voidsetTransformerName(String transformerName)voidsetUrlTransformationEngine(UrlTransformationEngine urlTransformationEngine)StringtoString()
-
-
-
Field Detail
-
transformedUrlPropName
protected String transformedUrlPropName
-
transformerName
protected String transformerName
-
urlTransformationEngine
protected UrlTransformationEngine urlTransformationEngine
-
-
Method Detail
-
setTransformedUrlPropName
public void setTransformedUrlPropName(String transformedUrlPropName)
-
setTransformerName
public void setTransformerName(String transformerName)
-
setUrlTransformationEngine
public void setUrlTransformationEngine(UrlTransformationEngine urlTransformationEngine)
-
process
public Item process(Context context, CachingOptions cachingOptions, Item item) throws ItemProcessingException
Description copied from interface:ItemProcessorProcesses anItem.- Specified by:
processin interfaceItemProcessor- Parameters:
context- the current contextcachingOptions- caching options in case you need access to itemsitem- the item to process- Returns:
- the modified item or a new item.
- Throws:
ItemProcessingException- if an error occurred while processing the item
-
-