Class TargetGroupService
- java.lang.Object
-
- com.hybris.ymkt.personalization.services.TargetGroupService
-
public class TargetGroupService extends java.lang.Object
Service exposing target groups from API_MKT_TARGET_GROUP_SRV.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.util.UUID,java.lang.String>
guidIdCache
protected static int
MAX
protected static org.apache.olingo.odata2.api.ep.EntityProviderReadProperties
NO_READ_PROPERTIES
protected ODataService
oDataService
protected static java.lang.String
TARGET_GROUP_INTERACTION_CONTACTS_ENTITY_SET
protected static java.lang.String
TARGET_GROUP_UUID
protected static java.lang.String
TARGET_GROUPS_ENTITY_SET
-
Constructor Summary
Constructors Constructor Description TargetGroupService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addTargetGroupToCache(MKTTargetGroup tg)
protected MKTTargetGroup
createMKTTargetGroup(org.apache.olingo.odata2.api.ep.entry.ODataEntry entry)
java.util.List<java.lang.String>
getCustomerTargetGroupIds(java.util.List<java.util.UUID> guids)
Get all the Target Group objects containing more descriptive information from the GUIDs retrievedjava.util.List<MKTTargetGroup>
getCustomerTargetGroups(java.util.List<java.util.UUID> guids)
Get all the Target Group objects containing more descriptive information from the GUIDs retrievedprotected java.util.List<MKTTargetGroup>
getCustomerTargetGroups(java.util.List<java.util.UUID> guids, int max)
java.util.List<java.util.UUID>
getCustomerTargetGroupsGUIDs(java.lang.String contactId, java.lang.String contactOrigin)
Retrieves all the Target Group GUIDs from that specific interaction contact origin Idprotected static <T> java.util.List<java.util.List<T>>
partition(java.util.List<T> list, int size)
void
setODataService(ODataService oDataService)
-
-
-
Field Detail
-
MAX
protected static final int MAX
- See Also:
- Constant Field Values
-
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
-
oDataService
protected ODataService oDataService
-
-
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
ofString
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
ofMKTTargetGroup
- 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
ofMKTTargetGroup
- Throws:
java.io.IOException
- if any error occurs.
-
setODataService
public void setODataService(ODataService oDataService)
-
-