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
Modifier and TypeFieldDescriptionprotected org.craftercms.core.service.ContentStoreService
protected TargetIdManager
protected String
protected org.craftercms.core.url.UrlTransformationEngine
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.craftercms.core.service.Item
process
(org.craftercms.core.service.Context context, org.craftercms.core.service.CachingOptions cachingOptions, org.craftercms.core.service.Item item) void
setStoreService
(org.craftercms.core.service.ContentStoreService storeService) void
setTargetIdManager
(TargetIdManager targetIdManager) void
setToCurrentTargetedUrlTransformerName
(String toCurrentTargetedUrlTransformerName) void
setUrlTransformationEngine
(org.craftercms.core.url.UrlTransformationEngine urlTransformationEngine) toString()
-
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()
-
-
Method Details
-
setToCurrentTargetedUrlTransformerName
-
setUrlTransformationEngine
public void setUrlTransformationEngine(org.craftercms.core.url.UrlTransformationEngine urlTransformationEngine) -
setStoreService
public void setStoreService(org.craftercms.core.service.ContentStoreService storeService) -
setTargetIdManager
-
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
-