Class TargetGroupService

java.lang.Object
com.hybris.ymkt.personalization.services.TargetGroupService

public class TargetGroupService extends Object
Service exposing target groups from API_MKT_TARGET_GROUP_SRV.
  • Field Details

    • MAX

      protected static final int MAX
      See Also:
    • NO_READ_PROPERTIES

      protected static final org.apache.olingo.odata2.api.ep.EntityProviderReadProperties NO_READ_PROPERTIES
    • TARGET_GROUP_INTERACTION_CONTACTS_ENTITY_SET

      protected static final String TARGET_GROUP_INTERACTION_CONTACTS_ENTITY_SET
      See Also:
    • TARGET_GROUP_UUID

      protected static final String TARGET_GROUP_UUID
      See Also:
    • TARGET_GROUPS_ENTITY_SET

      protected static final String TARGET_GROUPS_ENTITY_SET
      See Also:
    • guidIdCache

      protected final Map<UUID,String> guidIdCache
    • oDataService

      protected ODataService oDataService
  • Constructor Details

    • TargetGroupService

      public TargetGroupService()
  • Method Details

    • partition

      @Nonnull protected static <T> List<List<T>> partition(List<T> list, int size)
    • addTargetGroupToCache

      protected void addTargetGroupToCache(MKTTargetGroup tg)
    • createMKTTargetGroup

      protected MKTTargetGroup createMKTTargetGroup(org.apache.olingo.odata2.api.ep.entry.ODataEntry entry)
    • getCustomerTargetGroupIds

      @Nonnull public List<String> getCustomerTargetGroupIds(List<UUID> guids) throws IOException
      Get all the Target Group objects containing more descriptive information from the GUIDs retrieved
      Parameters:
      guids - Target Group GUIDs.
      Returns:
      List of String Target Group IDs.
      Throws:
      IOException - if any error occurs.
    • getCustomerTargetGroups

      @Nonnull public List<MKTTargetGroup> getCustomerTargetGroups(List<UUID> guids) throws IOException
      Get all the Target Group objects containing more descriptive information from the GUIDs retrieved
      Parameters:
      guids - Target Group GUIDs.
      Returns:
      List of MKTTargetGroup
      Throws:
      IOException - if any error occurs.
    • getCustomerTargetGroups

      @Nonnull protected List<MKTTargetGroup> getCustomerTargetGroups(List<UUID> guids, int max) throws IOException
      Throws:
      IOException
    • getCustomerTargetGroupsGUIDs

      @Nonnull public List<UUID> getCustomerTargetGroupsGUIDs(String contactId, String contactOrigin) throws IOException
      Retrieves all the Target Group GUIDs from that specific interaction contact origin Id
      Parameters:
      contactId - Contact Id value.
      contactOrigin - COOKIE_ID or SAP_HYBRIS_CONSUMER
      Returns:
      List of MKTTargetGroup
      Throws:
      IOException - if any error occurs.
    • setODataService

      public void setODataService(ODataService oDataService)