Class DefaultProductIdReplacementCPQErrorMsgMappingCallback
- java.lang.Object
-
- de.hybris.platform.sap.sapproductconfigsomservices.messagemappingcallback.DefaultProductIdReplacementCPQErrorMsgMappingCallback
-
- All Implemented Interfaces:
MessageMappingCallbackProcessor
public class DefaultProductIdReplacementCPQErrorMsgMappingCallback extends java.lang.Object implements MessageMappingCallbackProcessor
This callback is registered in messages.xml. It replaces the product ID (product code of the hybris product model) with the language dependent product description.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSAP_PRODUCTID_REPLACEMENT_CALLBACK_IDReference to the spring bean declaration
-
Constructor Summary
Constructors Constructor Description DefaultProductIdReplacementCPQErrorMsgMappingCallback()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetId()Should return the id of the message mapping callback processor.protected java.util.LocalegetLocale()booleanprocess(BackendMessage message)Method is called during message replacement.protected voidsetLocale(java.util.Locale locale)voidsetProductService(ProductService productService)Sets product service
-
-
-
Field Detail
-
SAP_PRODUCTID_REPLACEMENT_CALLBACK_ID
public static final java.lang.String SAP_PRODUCTID_REPLACEMENT_CALLBACK_ID
Reference to the spring bean declaration- See Also:
- Constant Field Values
-
-
Method Detail
-
process
public boolean process(BackendMessage message)
Description copied from interface:MessageMappingCallbackProcessorMethod is called during message replacement. Implement this message if you want to change the message before it gets replaced. E.g.: Replace message arguments .
It's also possible to remove messages via returning false.- Specified by:
processin interfaceMessageMappingCallbackProcessor- Parameters:
message- Back end message to evaluate- Returns:
- Do we want to keep the message?
-
getLocale
protected java.util.Locale getLocale()
-
setLocale
protected void setLocale(java.util.Locale locale)
-
getId
public java.lang.String getId()
Description copied from interface:MessageMappingCallbackProcessorShould return the id of the message mapping callback processor. Returned string must be equals to the callbackId specified in a message rule (messages.xml) in order to get called- Specified by:
getIdin interfaceMessageMappingCallbackProcessor- Returns:
- ID of callback
-
setProductService
public void setProductService(ProductService productService)
Sets product service- Parameters:
productService- Standard productService
-
-