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_MATCHFields 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> voidapplyTranslations(List<P> projections, List<String> primaryKeys, Locale locale, List<Translation> languageTranslations) protected <P> voidsetTranslatedValueOnField(P targetEntity, Field field, Object translatedValue) voidsetTranslationService(TranslationEntityService<Translation> translationService) <P,D> void transform(List<P> projections, List<D> entities, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected <P> voidupdateField(P businessDomain, Translation translation) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.PostMapper
transformMethods 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:
getDataRoutePartitionin 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:
transformin interfacecom.broadleafcommerce.data.tracking.core.mapping.PostMapper
-
applyTranslations
-
updateField
-
setTranslatedValueOnField
-