Class AnonymousUserTranslator
- java.lang.Object
-
- de.hybris.platform.impex.jalo.translators.AbstractValueTranslator
-
- de.hybris.platform.impex.jalo.translators.SingleValueTranslator
-
- de.hybris.platform.ruleengineservices.impex.impl.AnonymousUserTranslator
-
public class AnonymousUserTranslator extends SingleValueTranslator
Translator used for promotion rules that rely on 'anonymous' user within their definition. Based on theRuleEngineServicesConstants.CUSTOMER_CONDITION_USE_PK_PROPERTYconfiguration flag performs conversion of 'anonymous' string value to the respective PK representation that matches that of the anonymous user in the system. INSERT_UPDATE PromotionSourceRule;code[unique=true];conditions[translator=de.hybris.platform.ruleengineservices.impex.impl.AnonymousUserTranslator]
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringUSER_SERVICE
-
Constructor Summary
Constructors Constructor Description AnonymousUserTranslator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectconvertToJalo(java.lang.String value, Item item)Converts a non-null and non-empty string into a jalo attribute value.protected java.lang.StringconvertToString(java.lang.Object object)Converts a non-null jalo attribute value into its string representation.protected UserServicegetUserService()voidinit(StandardColumnDescriptor descriptor)Called once per header creation to allow configuring this translator using column modifiers etc.protected booleanisUsePk()-
Methods inherited from class de.hybris.platform.impex.jalo.translators.SingleValueTranslator
exportValue, getEmptyValue, importValue, isEmpty
-
Methods inherited from class de.hybris.platform.impex.jalo.translators.AbstractValueTranslator
clearStatus, createTranslator, createTranslator, createTranslator, debug, error, getColumnDescriptor, getFlexibleSearch, info, isDebugEnabled, isInfoEnabled, setEmpty, setError, validate, warn, wasEmpty, wasUnresolved
-
-
-
-
Field Detail
-
USER_SERVICE
protected static final java.lang.String USER_SERVICE
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(StandardColumnDescriptor descriptor)
Description copied from class:AbstractValueTranslatorCalled once per header creation to allow configuring this translator using column modifiers etc.- Overrides:
initin classAbstractValueTranslator- Parameters:
descriptor- descriptor where the value to translate belongs to
-
convertToJalo
protected java.lang.Object convertToJalo(java.lang.String value, Item item)Description copied from class:SingleValueTranslatorConverts a non-null and non-empty string into a jalo attribute value.- Specified by:
convertToJaloin classSingleValueTranslator- Parameters:
value- string to translateitem- item instance the translated value will be set to as attribute- Returns:
- Object translated value
-
convertToString
protected java.lang.String convertToString(java.lang.Object object)
Description copied from class:SingleValueTranslatorConverts a non-null jalo attribute value into its string representation.- Specified by:
convertToStringin classSingleValueTranslator- Parameters:
object- value to translate- Returns:
- translated value
-
isUsePk
protected boolean isUsePk()
-
getUserService
protected UserService getUserService()
-
-