Class TargetGroupService
- java.lang.Object
-
- com.hybris.ymkt.personalization.services.TargetGroupService
-
public class TargetGroupService extends java.lang.ObjectService 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>guidIdCacheprotected static intMAXprotected static org.apache.olingo.odata2.api.ep.EntityProviderReadPropertiesNO_READ_PROPERTIESprotected ODataServiceoDataServiceprotected static java.lang.StringTARGET_GROUP_INTERACTION_CONTACTS_ENTITY_SETprotected static java.lang.StringTARGET_GROUP_UUIDprotected static java.lang.StringTARGET_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 voidaddTargetGroupToCache(MKTTargetGroup tg)protected MKTTargetGroupcreateMKTTargetGroup(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)voidsetODataService(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.IOExceptionGet all the Target Group objects containing more descriptive information from the GUIDs retrieved- Parameters:
guids- Target Group GUIDs.- Returns:
ListofStringTarget 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:
ListofMKTTargetGroup- 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.IOExceptionRetrieves 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:
ListofMKTTargetGroup- Throws:
java.io.IOException- if any error occurs.
-
setODataService
public void setODataService(ODataService oDataService)
-
-