Class ProductCharacteristicsFieldTranslationHandler
java.lang.Object
com.broadleafcommerce.catalog.service.translation.ProductCharacteristicsFieldTranslationHandler
- All Implemented Interfaces:
com.broadleafcommerce.translation.service.TranslationFieldTransformerHandler,org.springframework.core.Ordered
public class ProductCharacteristicsFieldTranslationHandler
extends Object
implements com.broadleafcommerce.translation.service.TranslationFieldTransformerHandler
The default field transformation logic expects the embedded collection instances to be present on
the product instance at the time the translation persistence is engaged. However, we don't want
to incur the expense of hydrating characteristics in the translation flow just for this purpose.
And in any case, the path transformation is not necessary for ProductCharacteristic, as
it is not SubIdentifiable and we use the characteristic name in the translation path, not
the ID or the index. Thus, there is no use for the field transformation.
This component simply disables the field transformation logic on all the characteristics translations.
- Since:
- Catalog Services 2.3.0, ReleaseTrain 2.3.0
-
Field Summary
FieldsFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<P extends com.broadleafcommerce.translation.domain.Translation>
boolean<P extends com.broadleafcommerce.translation.domain.Translation>
voiddo nothing for product translation characteristicsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.translation.service.TranslationFieldTransformerHandler
getOrder
-
Field Details
-
CHARACTERISTICS_FIELD
- See Also:
-
-
Constructor Details
-
ProductCharacteristicsFieldTranslationHandler
public ProductCharacteristicsFieldTranslationHandler()
-
-
Method Details
-
handle
public <P extends com.broadleafcommerce.translation.domain.Translation> void handle(@NonNull String entityType, @NonNull Object entity, @NonNull P translation) do nothing for product translation characteristics- Specified by:
handlein interfacecom.broadleafcommerce.translation.service.TranslationFieldTransformerHandler
-
canHandle
public <P extends com.broadleafcommerce.translation.domain.Translation> boolean canHandle(@NonNull String entityType, @NonNull Object entity, @NonNull P translation) - Specified by:
canHandlein interfacecom.broadleafcommerce.translation.service.TranslationFieldTransformerHandler
-