Class TargetGroupService


  • public class TargetGroupService
    extends java.lang.Object
    Service exposing target groups from API_MKT_TARGET_GROUP_SRV.
    • Field Detail

      • 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 java.lang.String TARGET_GROUP_INTERACTION_CONTACTS_ENTITY_SET
        See Also:
        Constant Field Values
      • TARGET_GROUP_UUID

        protected static final java.lang.String TARGET_GROUP_UUID
        See Also:
        Constant Field Values
      • TARGET_GROUPS_ENTITY_SET

        protected static final java.lang.String TARGET_GROUPS_ENTITY_SET
        See Also:
        Constant Field Values
      • guidIdCache

        protected final java.util.Map<java.util.UUID,​java.lang.String> guidIdCache
    • Constructor Detail

      • TargetGroupService

        public TargetGroupService()
    • Method Detail

      • partition

        @Nonnull
        protected static <T> java.util.List<java.util.List<T>> partition​(java.util.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 java.util.List<java.lang.String> getCustomerTargetGroupIds​(java.util.List<java.util.UUID> guids)
                                                                   throws java.io.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:
        java.io.IOException - if any error occurs.
      • getCustomerTargetGroups

        @Nonnull
        public java.util.List<MKTTargetGroup> getCustomerTargetGroups​(java.util.List<java.util.UUID> guids)
                                                               throws java.io.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:
        java.io.IOException - if any error occurs.
      • getCustomerTargetGroups

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

        @Nonnull
        public java.util.List<java.util.UUID> getCustomerTargetGroupsGUIDs​(java.lang.String contactId,
                                                                           java.lang.String contactOrigin)
                                                                    throws java.io.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:
        java.io.IOException - if any error occurs.
      • setODataService

        public void setODataService​(ODataService oDataService)