Class ToCurrentTargetedVersionItemProcessor
java.lang.Object
org.craftercms.engine.navigation.impl.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 Summary
FieldsModifier and TypeFieldDescriptionprotected org.craftercms.core.service.ContentStoreService
protected TargetIdManager
protected String
protected org.craftercms.core.url.UrlTransformationEngine
-
Constructor Summary
ConstructorsConstructorDescriptionToCurrentTargetedVersionItemProcessor
(String toCurrentTargetedUrlTransformerName, org.craftercms.core.url.UrlTransformationEngine urlTransformationEngine, org.craftercms.core.service.ContentStoreService storeService, TargetIdManager targetIdManager) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.craftercms.core.processors.ItemProcessor
isExclusive
-
Field Details
-
toCurrentTargetedUrlTransformerName
-
urlTransformationEngine
protected org.craftercms.core.url.UrlTransformationEngine urlTransformationEngine -
storeService
protected org.craftercms.core.service.ContentStoreService storeService -
targetIdManager
-
-
Constructor Details
-
ToCurrentTargetedVersionItemProcessor
public ToCurrentTargetedVersionItemProcessor(String toCurrentTargetedUrlTransformerName, org.craftercms.core.url.UrlTransformationEngine urlTransformationEngine, org.craftercms.core.service.ContentStoreService storeService, TargetIdManager targetIdManager)
-
-
Method Details
-
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 interfaceorg.craftercms.core.processors.ItemProcessor
- Throws:
org.craftercms.core.exception.ItemProcessingException
-
toString
-