public class UserSegmentationManager extends Object implements IUserSegmentationManagerSPI
Constructor and Description |
---|
UserSegmentationManager() |
Modifier and Type | Method and Description |
---|---|
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. |
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> |
getMembers(String segmentationId)
Returns the segmentation members.
|
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> |
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.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPortalMemberSegmentations
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 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 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> getMembers(String segmentationId) throws PortalException
IUserSegmentationManagerSPI
getMembers
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
LumisXP 11.2.0.190404 - Copyright © 2006–2019 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.