public class UserSegmentationManager extends Object implements IUserSegmentationManagerSPI
Modifier and Type | Field and Description |
---|---|
static String |
USER_JOINED_SEGMENTATION_EVENT_ID |
static String |
USER_LEFT_SEGMENTATION_EVENT_ID |
Constructor and Description |
---|
UserSegmentationManager() |
Modifier and Type | Method and Description |
---|---|
IUserSegmentation |
createSegmentationForJourneyStage(JourneyStage stage)
Creates a segmentation for the given journey stage.
|
void |
deleteSegmentations(Collection<String> ids,
String serviceInstanceId)
Delete the given segmentations.
|
void |
deleteSegmentationsByServiceInstanceId(String serviceInstanceId)
Deletes all segmentations of the given service instance.
|
List<IUserSegmentation> |
findByServiceInstanceAndLikeName(String name,
String serviceInstanceId)
Returns the segmentations of the given service instance that matches the given
name parameter. |
UserSegmentation |
getById(String id)
Returns the segmentation with the given identifier or
null if no segmentation exists with the given identifier. |
IUserSegmentation |
getByJourneyStage(String journeyStageId)
Returns the segmentation of a journey stage or
null if there's none. |
UserSegmentation |
getByNameAndServiceInstance(String name,
String serviceInstanceId)
Returns the segmentation of the given name and service instance.
|
List<IUserSegmentation> |
getByServiceInstance(String serviceInstanceId)
Returns the segmentations of the given service instance.
|
Collection<String> |
getMemberSegmentations(String monitorUserId)
Returns a collection of segmentations of the given user.
|
Collection<String> |
getMemberSegmentations(String monitorUserId,
boolean useSessionCache)
Returns a collection of segmentations of the given user.
|
Collection<String> |
getPortalMembers(String segmentationId)
Returns the segmentation members.
|
Collection<String> |
getPortalMemberSegmentations(String portalUserId,
boolean useSessionCache)
Returns a collection of segmentations of the given (portal) user.
|
Collection<IUserSegmentation> |
getSegmentationsThatNeedToHaveMembershipUpdated()
Returns a collection of user segmentations that must have the memberships updated.
|
IMonitorValuesProvider |
getUserSegmentationMonitorValuesProvider(IUserSegmentation segmentation)
Returns a
IMonitorValuesProvider that fills user segmentation information. |
boolean |
isMember(Collection<String> segmentationIds,
String monitorUserId)
Verifies if a user is a member of one of the specified segmentations.
The given user identifier refers to monitor user, not to the portal user. |
String |
saveSegmentation(String name,
String serviceInstanceId,
org.json.JSONObject segmentationFilter)
Save the given segmentation and returns the identifier of the segmentation added or updated.
|
IUserSegmentation |
updateSegmentation(String id,
String serviceInstanceId,
org.json.JSONObject filter)
Updates the given segmentation with the given filters.
|
void |
updateSegmentationMembership(IUserSegmentation segmentation)
Updates the given segmentation memberships cache.
|
void |
updateSegmentationMembership(IUserSegmentation segmentation,
String monitorUserId)
Updates the given segmentation membership cache for the given user.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPortalMemberSegmentations
public static final String USER_JOINED_SEGMENTATION_EVENT_ID
public static final String USER_LEFT_SEGMENTATION_EVENT_ID
public String saveSegmentation(String name, String serviceInstanceId, org.json.JSONObject segmentationFilter) throws PortalException
IUserSegmentationManagerSPI
saveSegmentation
in interface IUserSegmentationManagerSPI
name
- the segmentation name.serviceInstanceId
- the service instance identifier.segmentationFilter
- the segmentation filter.PortalException
public IUserSegmentation createSegmentationForJourneyStage(JourneyStage stage) throws PortalException
stage
- the journey stage.PortalException
public IUserSegmentation updateSegmentation(String id, String serviceInstanceId, org.json.JSONObject filter) throws PortalException
IUserSegmentationManagerSPI
updateSegmentation
in interface IUserSegmentationManagerSPI
id
- the segmentation identifier.serviceInstanceId
- the service instance identifier.filter
- the segmentation filter.PortalException
public void deleteSegmentations(Collection<String> ids, String serviceInstanceId) throws PortalException
IUserSegmentationManagerSPI
deleteSegmentations
in interface IUserSegmentationManagerSPI
ids
- the segmentation identifiers.serviceInstanceId
- the service instance identifier.PortalException
public void deleteSegmentationsByServiceInstanceId(String serviceInstanceId) throws PortalException
IUserSegmentationManagerSPI
deleteSegmentationsByServiceInstanceId
in interface IUserSegmentationManagerSPI
serviceInstanceId
- the service instance identifier.PortalException
public UserSegmentation getByNameAndServiceInstance(String name, String serviceInstanceId) throws PortalException
IUserSegmentationManager
getByNameAndServiceInstance
in interface IUserSegmentationManager
name
- the segmentation name.serviceInstanceId
- the service instance identifier.PortalObjectNotFoundException
- if no such segmentation could be found.PortalException
public List<IUserSegmentation> findByServiceInstanceAndLikeName(String name, String serviceInstanceId) throws PortalException
IUserSegmentationManagerSPI
name
parameter.findByServiceInstanceAndLikeName
in interface IUserSegmentationManagerSPI
name
- the segmentation name.serviceInstanceId
- the service instance identifier.name
parameter.PortalException
public UserSegmentation getById(String id) throws PortalException
IUserSegmentationManagerSPI
null
if no segmentation exists with the given identifier.getById
in interface IUserSegmentationManagerSPI
id
- the segmentation identifier.null
if no segmentation exists with the given identifier.PortalException
public List<IUserSegmentation> getByServiceInstance(String serviceInstanceId) throws PortalException
IUserSegmentationManagerSPI
getByServiceInstance
in interface IUserSegmentationManagerSPI
serviceInstanceId
- the service instance identifier.PortalException
public IUserSegmentation getByJourneyStage(String journeyStageId) throws PortalException
null
if there's none.journeyStageId
- the journey stage identifier.null
if there's none.PortalException
public boolean isMember(Collection<String> segmentationIds, String monitorUserId) throws PortalException
IUserSegmentationManagerSPI
isMember
in interface IUserSegmentationManagerSPI
segmentationIds
- the segmentation identifiers.monitorUserId
- the monitor user identifier.PortalException
public Collection<String> getPortalMembers(String segmentationId) throws PortalException
IUserSegmentationManagerSPI
getPortalMembers
in interface IUserSegmentationManagerSPI
segmentationId
- the segmentation identifier.PortalException
public Collection<String> getMemberSegmentations(String monitorUserId) throws PortalException
IUserSegmentationManagerSPI
getMemberSegmentations
in interface IUserSegmentationManagerSPI
monitorUserId
- the monitor user identifier.PortalException
public Collection<String> getMemberSegmentations(String monitorUserId, boolean useSessionCache) throws PortalException
IUserSegmentationManagerSPI
getMemberSegmentations
in interface IUserSegmentationManagerSPI
monitorUserId
- the monitor user identifier.useSessionCache
- indicates whether session cache should be used.PortalException
public Collection<String> getPortalMemberSegmentations(String portalUserId, boolean useSessionCache) throws PortalException
IUserSegmentationManagerSPI
getPortalMemberSegmentations
in interface IUserSegmentationManagerSPI
PortalException
public Collection<IUserSegmentation> getSegmentationsThatNeedToHaveMembershipUpdated() throws PortalException
IUserSegmentationManagerSPI
getSegmentationsThatNeedToHaveMembershipUpdated
in interface IUserSegmentationManagerSPI
PortalException
public void updateSegmentationMembership(IUserSegmentation segmentation) throws PortalException
IUserSegmentationManager
updateSegmentationMembership
in interface IUserSegmentationManager
segmentation
- the segmentation.PortalException
public void updateSegmentationMembership(IUserSegmentation segmentation, String monitorUserId) throws PortalException
IUserSegmentationManager
updateSegmentationMembership
in interface IUserSegmentationManager
segmentation
- the segmentation.monitorUserId
- the monitor user identifier.PortalException
public IMonitorValuesProvider getUserSegmentationMonitorValuesProvider(IUserSegmentation segmentation)
IUserSegmentationManagerSPI
IMonitorValuesProvider
that fills user segmentation information.getUserSegmentationMonitorValuesProvider
in interface IUserSegmentationManagerSPI
segmentation
- the user segmentation.IMonitorValuesProvider
that fills user segmentation information.LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.