Class LocaleItemFilter

  • All Implemented Interfaces:
    org.craftercms.core.service.ItemFilter

    public class LocaleItemFilter
    extends Object
    implements org.craftercms.core.service.ItemFilter
    Implementation of ItemFilter that checks if a given Item is compatible with the configured locales
    Since:
    4.0.0
    Author:
    joseross
    • Field Detail

      • localeCodeXPathQuery

        protected String localeCodeXPathQuery
      • contentStoreService

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

      • LocaleItemFilter

        @ConstructorProperties({"localeCodeSelector","contentStoreService"})
        public LocaleItemFilter​(String localeCodeSelector,
                                org.craftercms.core.service.ContentStoreService contentStoreService)
    • Method Detail

      • runBeforeProcessing

        public boolean runBeforeProcessing()
        Specified by:
        runBeforeProcessing in interface org.craftercms.core.service.ItemFilter
      • runAfterProcessing

        public boolean runAfterProcessing()
        Specified by:
        runAfterProcessing in interface org.craftercms.core.service.ItemFilter
      • accepts

        public boolean accepts​(org.craftercms.core.service.Item item,
                               List<org.craftercms.core.service.Item> acceptedItems,
                               List<org.craftercms.core.service.Item> rejectedItems,
                               boolean runningBeforeProcessing)
        Specified by:
        accepts in interface org.craftercms.core.service.ItemFilter