Class AnonymousUserTranslator


  • public class AnonymousUserTranslator
    extends SingleValueTranslator
    Translator used for promotion rules that rely on 'anonymous' user within their definition. Based on the RuleEngineServicesConstants.CUSTOMER_CONDITION_USE_PK_PROPERTY configuration 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]
    • Constructor Detail

      • AnonymousUserTranslator

        public AnonymousUserTranslator()
    • Method Detail

      • convertToJalo

        protected java.lang.Object convertToJalo​(java.lang.String value,
                                                 Item item)
        Description copied from class: SingleValueTranslator
        Converts a non-null and non-empty string into a jalo attribute value.
        Specified by:
        convertToJalo in class SingleValueTranslator
        Parameters:
        value - string to translate
        item - 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: SingleValueTranslator
        Converts a non-null jalo attribute value into its string representation.
        Specified by:
        convertToString in class SingleValueTranslator
        Parameters:
        object - value to translate
        Returns:
        translated value
      • isUsePk

        protected boolean isUsePk()
      • getUserService

        protected UserService getUserService()