public class UserSegmentationManager extends Object
Constructor and Description |
---|
UserSegmentationManager() |
Modifier and Type | Method and Description |
---|---|
static void |
clearSegmentationGroup(String groupId)
When a group is removed, it must be removed from the segmentation as well.
|
static void |
deleteSegmentations(Collection<String> ids,
String serviceInstanceId)
Delete the given segmentations.
|
static void |
deleteSegmentationsByServiceInstanceId(String serviceInstanceId)
Deletes all segmentations of the given service instance.
|
static List<UserSegmentation> |
findByServiceInstanceAndLikeName(String name,
String serviceInstanceId)
Returns the segmentations of the given service instance that matches the given
name parameter. |
static UserSegmentation |
getById(String id)
Returns the segmentation with the given identifier or
null if no segmentation exists with the given identifier. |
static List<UserSegmentation> |
getByServiceInstance(String serviceInstanceId)
Returns the segmentations of the given service instance.
|
static String |
saveSegmentation(String name,
String serviceInstanceId,
org.json.JSONObject segmentationFilter)
Save the given segmentation and returns the identifier of the segmentation added or updated.
|
static String |
saveSegmentation(String name,
String serviceInstanceId,
org.json.JSONObject segmentationFilter,
TimeUnit groupCacheExpirationUnit,
long groupCacheExpirationAmount)
Save the given segmentation and returns the identifier of the segmentation added or updated.
|
static UserSegmentation |
updateSegmentation(String id,
String serviceInstanceId,
org.json.JSONObject filter)
Updates the given segmentation with the given filters.
|
public static String saveSegmentation(String name, String serviceInstanceId, org.json.JSONObject segmentationFilter) throws PortalException
name
- the segmentation name.serviceInstanceId
- the service instance identifier.segmentationFilter
- the segmentation filter.PortalException
public static String saveSegmentation(String name, String serviceInstanceId, org.json.JSONObject segmentationFilter, TimeUnit groupCacheExpirationUnit, long groupCacheExpirationAmount) throws PortalException
name
- the segmentation name.serviceInstanceId
- the service instance identifier.segmentationFilter
- the segmentation filter.groupCacheExpirationUnit
- the attached group cache expiration unit. Must be one of TimeUnit.SECONDS
, TimeUnit.MINUTES
, TimeUnit.HOURS
or TimeUnit.DAYS
.groupCacheExpirationAmount
- the attached group cache expiration amount. Must be a positive number.PortalException
public static UserSegmentation updateSegmentation(String id, String serviceInstanceId, org.json.JSONObject filter) throws PortalException
id
- the segmentation identifier.serviceInstanceId
- the service instance identifier.filter
- the segmentation filter.PortalException
public static void deleteSegmentations(Collection<String> ids, String serviceInstanceId) throws PortalException
ids
- the segmentation identifiers.serviceInstanceId
- the service instance identifier.PortalException
public static void deleteSegmentationsByServiceInstanceId(String serviceInstanceId) throws PortalException
serviceInstanceId
- the service instance identifier.PortalException
public static void clearSegmentationGroup(String groupId)
groupId
- the group identifier.public static List<UserSegmentation> findByServiceInstanceAndLikeName(String name, String serviceInstanceId) throws PortalException
name
parameter.name
- the segmentation name.serviceInstanceId
- the service instance identifier.name
parameter.PortalException
public static UserSegmentation getById(String id)
null
if no segmentation exists with the given identifier.id
- the segmentation identifier.null
if no segmentation exists with the given identifier.public static List<UserSegmentation> getByServiceInstance(String serviceInstanceId) throws PortalException
serviceInstanceId
- the service instance identifier.PortalException
Lumisportal 11.1.0.181218 - Copyright © 2006–2018 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.