Class ToCurrentTargetedVersionItemProcessor

  • All Implemented Interfaces:
    org.craftercms.core.processors.ItemProcessor

    public class ToCurrentTargetedVersionItemProcessor
    extends Object
    implements org.craftercms.core.processors.ItemProcessor
    ItemProcessor that converts the item to the current targeted item (e.g. if the current target ID is en_US, then index.xml might be converted to index_en_US.xml, or to index_en.xml if it the former doesn't exist). WARNING: this processor will probably generate the same item for different URLs, so it's good to use the RejectDuplicatesItemFilter in conjunction with this processor.
    • Field Detail

      • toCurrentTargetedUrlTransformerName

        protected String toCurrentTargetedUrlTransformerName
      • urlTransformationEngine

        protected org.craftercms.core.url.UrlTransformationEngine urlTransformationEngine
      • storeService

        protected org.craftercms.core.service.ContentStoreService storeService
    • Constructor Detail

      • ToCurrentTargetedVersionItemProcessor

        public ToCurrentTargetedVersionItemProcessor()
    • Method Detail

      • setToCurrentTargetedUrlTransformerName

        public void setToCurrentTargetedUrlTransformerName​(String toCurrentTargetedUrlTransformerName)
      • setUrlTransformationEngine

        public void setUrlTransformationEngine​(org.craftercms.core.url.UrlTransformationEngine urlTransformationEngine)
      • setStoreService

        public void setStoreService​(org.craftercms.core.service.ContentStoreService storeService)
      • setTargetIdManager

        public void setTargetIdManager​(TargetIdManager targetIdManager)
      • process

        public org.craftercms.core.service.Item process​(org.craftercms.core.service.Context context,
                                                        org.craftercms.core.service.CachingOptions cachingOptions,
                                                        org.craftercms.core.service.Item item)
                                                 throws org.craftercms.core.exception.ItemProcessingException
        Specified by:
        process in interface org.craftercms.core.processors.ItemProcessor
        Throws:
        org.craftercms.core.exception.ItemProcessingException