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]
  • Field Details

  • Constructor Details

    • AnonymousUserTranslator

      public AnonymousUserTranslator()
  • Method Details

    • init

      public void init(StandardColumnDescriptor descriptor)
      Description copied from class: AbstractValueTranslator
      Called once per header creation to allow configuring this translator using column modifiers etc.
      Overrides:
      init in class AbstractValueTranslator
      Parameters:
      descriptor - descriptor where the value to translate belongs to
    • convertToJalo

      protected Object convertToJalo(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 String convertToString(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()