Class DescriptorLocaleExtractor
java.lang.Object
org.craftercms.search.locale.impl.DescriptorLocaleExtractor
- All Implemented Interfaces:
LocaleExtractor
Implementation of
LocaleExtractor for XML descriptors- Since:
- 4.0.0
- Author:
- joseross
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.craftercms.core.service.ContentStoreServiceThe content store serviceprotected StringThe XPath to extract the locale from the descriptor -
Constructor Summary
ConstructorsConstructorDescriptionDescriptorLocaleExtractor(org.craftercms.core.service.ContentStoreService contentStoreService, String localeXPath) -
Method Summary
-
Field Details
-
contentStoreService
protected org.craftercms.core.service.ContentStoreService contentStoreServiceThe content store service -
localeXPath
The XPath to extract the locale from the descriptor
-
-
Constructor Details
-
DescriptorLocaleExtractor
@ConstructorProperties({"contentStoreService","localeXPath"}) public DescriptorLocaleExtractor(org.craftercms.core.service.ContentStoreService contentStoreService, String localeXPath)
-
-
Method Details
-
extract
Description copied from interface:LocaleExtractorExtract the locale for the given file- Specified by:
extractin interfaceLocaleExtractor- Parameters:
context- the current contextpath- the path of the file- Returns:
- the locale
-