Class TranslationPostMapperMember
java.lang.Object
com.broadleafcommerce.translation.mapping.TranslationPostMapperMember
- All Implemented Interfaces:
com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
,com.broadleafcommerce.data.tracking.core.mapping.PostMapper
,com.broadleafcommerce.data.tracking.core.mapping.PostMapperMember
,org.springframework.core.Ordered
public class TranslationPostMapperMember
extends Object
implements com.broadleafcommerce.data.tracking.core.mapping.PostMapperMember
A post mapper member that attempts to update field values for the projections with any
translations that are found for the given locale and entities.
- Author:
- Chad Harchar (charchar), Jeff Fischer
-
Field Summary
Fields inherited from interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
ALL_MATCH
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorsConstructorDescriptionTranslationPostMapperMember
(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, ContextLocaleHelper contextLocaleHelper) -
Method Summary
Modifier and TypeMethodDescriptionprotected <P> void
applyTranslations
(List<P> projections, List<String> primaryKeys, Locale locale, List<Translation> languageTranslations) protected <P> void
setTranslatedValueOnField
(P targetEntity, Field field, Object translatedValue) void
setTranslationService
(TranslationEntityService<Translation> translationService) <P,
D> void transform
(List<P> projections, List<D> entities, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected <P> void
updateField
(P businessDomain, Translation translation) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.PostMapper
transform
Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.PostMapperMember
getOrder
-
Constructor Details
-
TranslationPostMapperMember
public TranslationPostMapperMember(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, ContextLocaleHelper contextLocaleHelper)
-
-
Method Details
-
getDataRoutePartition
- Specified by:
getDataRoutePartition
in interfacecom.broadleafcommerce.common.extension.data.DataRoutePartitionAware
-
setTranslationService
@Autowired @Lazy public void setTranslationService(TranslationEntityService<Translation> translationService) -
transform
public <P,D> void transform(List<P> projections, List<D> entities, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Specified by:
transform
in interfacecom.broadleafcommerce.data.tracking.core.mapping.PostMapper
-
applyTranslations
-
updateField
-
setTranslatedValueOnField
-