Class ItemUrlTransformingProcessor

java.lang.Object
org.craftercms.core.processors.impl.ItemUrlTransformingProcessor
All Implemented Interfaces:
ItemProcessor

public class ItemUrlTransformingProcessor extends Object implements ItemProcessor
ItemProcessor that takes the item url, transforms it by calling the transformation engine, and places the transformed url in the properties.
Author:
Alfonso Vásquez
  • Field Details

    • transformedUrlPropName

      protected String transformedUrlPropName
    • transformerName

      protected String transformerName
    • urlTransformationEngine

      protected UrlTransformationEngine urlTransformationEngine
  • Constructor Details

    • ItemUrlTransformingProcessor

      public ItemUrlTransformingProcessor()
  • Method Details

    • 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: ItemProcessor
      Processes an Item.
      Specified by:
      process in interface ItemProcessor
      Parameters:
      context - the current context
      cachingOptions - caching options in case you need access to items
      item - the item to process
      Returns:
      the modified item or a new item.
      Throws:
      ItemProcessingException - if an error occurred while processing the item
    • toString

      public String toString()
      Overrides:
      toString in class Object