Class UserSegmentationData
- java.lang.Object
-
- lumis.service.analytics.usersegmentation.control.UserSegmentationData
-
public class UserSegmentationData extends java.lang.Object
User segmentation data.- Since:
- 11.0.0
- Version:
- $Revision$ $Date$
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UserSegmentationData.CreateQueryResult
Result of create query.static interface
UserSegmentationData.ISegmentationFilter
Segmentation filter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UserSegmentationData
create(ServiceInstanceConfig serviceInstance, org.json.JSONObject jsonData)
Creates a new data, from the given service instance and JSON object.static UserSegmentationData
create(ServiceInstanceConfig serviceInstance, org.json.JSONObject jsonData, org.json.JSONObject dynamicFilter)
Creates a new data, from the given service instance and JSON object.boolean
evaluate(FlowContext flowContext)
Evaluates this filter against the given flow context.boolean
evaluate(UserSegmentationData.ISegmentationFilter filter, FlowContext flowContext, MonitorUser monUser)
Evaluates this filter against the given flow context.Tuple2<ISearchQueryFilter,java.lang.Boolean>
getBigDataFilter(ISearchQueryFilter... additionalFilters)
Returns the big data filter for search user segmentation.static ISearchQueryFilter
getEmptyBigDataFilter(ServiceInstanceConfig serviceInstanceConfig)
Returns the empty big data filter to bring all users with the default fields and in context.UserSegmentationData.ISegmentationFilter
getInternalFilter()
Returns the internal filter object.ServiceInstanceConfig
getServiceInstanceConfig()
Returns the serviceInstanceConfig.static ISearchQueryFilter
getTimeIntervalFilter(org.json.JSONObject valueJSON, java.lang.String bigDataFieldId, DocumentTypeField key, DocumentTypeField value, UserAttribute attr, DocumentTypeField attrServiceinstanceidField)
Method that creates the time interval filter.boolean
shouldUserSegmentationBeRecalculated(IMonitorEvent event, EventContext eventContext)
Returns whether the user segmentation should be recalculated.org.json.JSONObject
toJSON()
Returns the JSON object that represents these filters.
-
-
-
Method Detail
-
create
public static UserSegmentationData create(ServiceInstanceConfig serviceInstance, org.json.JSONObject jsonData) throws PortalException
Creates a new data, from the given service instance and JSON object. Returnsnull
if the created instance is a no-op filter.- Parameters:
serviceInstance
- the service instance.jsonData
- the JSON data.- Returns:
- a new data, from the given service instance and JSON object or
null
if the created instance is a no-op filter. - Throws:
PortalException
- Since:
- 11.0.0
-
create
public static UserSegmentationData create(ServiceInstanceConfig serviceInstance, org.json.JSONObject jsonData, org.json.JSONObject dynamicFilter) throws PortalException
Creates a new data, from the given service instance and JSON object. Returnsnull
if the created instance is a no-op filter.- Parameters:
serviceInstance
- the service instance.jsonData
- the JSON data.dynamicFilter
- the dynamic filter data.- Returns:
- a new data, from the given service instance and JSON object or
null
if the created instance is a no-op filter. - Throws:
PortalException
- Since:
- 14.1.0
-
getInternalFilter
public UserSegmentationData.ISegmentationFilter getInternalFilter()
Returns the internal filter object.- Returns:
- the internal filter object.
- Since:
- 12.3.0
-
getBigDataFilter
public Tuple2<ISearchQueryFilter,java.lang.Boolean> getBigDataFilter(ISearchQueryFilter... additionalFilters) throws PortalException
Returns the big data filter for search user segmentation.- Parameters:
additionalFilters
- the additional filters - it's doesn't bring from user segmentation data.- Returns:
- the big data filter for search user segmentation.
- Throws:
PortalException
- Since:
- 12.3.0
-
getEmptyBigDataFilter
public static ISearchQueryFilter getEmptyBigDataFilter(ServiceInstanceConfig serviceInstanceConfig) throws PortalException
Returns the empty big data filter to bring all users with the default fields and in context.- Returns:
- the empty big data filter to bring all users with the default fields and in context.
- Throws:
PortalException
- Since:
- 12.3.0
-
toJSON
public org.json.JSONObject toJSON()
Returns the JSON object that represents these filters.- Returns:
- the JSON object that represents these filters.
- Since:
- 11.0.0
-
getTimeIntervalFilter
public static ISearchQueryFilter getTimeIntervalFilter(org.json.JSONObject valueJSON, java.lang.String bigDataFieldId, DocumentTypeField key, DocumentTypeField value, UserAttribute attr, DocumentTypeField attrServiceinstanceidField)
Method that creates the time interval filter.- Parameters:
valueJSON
- the value.bigDataFieldId
- the big data field identifier.key
- the key field.value
- the value field.attrServiceinstanceidField
- the attribute service instance identifier field.- Returns:
- the time interval filter.
- Since:
- 14.0.0
-
evaluate
public boolean evaluate(FlowContext flowContext) throws PortalException
Evaluates this filter against the given flow context. Returnstrue
if the given context matches this filter orfalse
otherwise.- Parameters:
flowContext
- the flow context.- Returns:
true
if the given context matches this filter orfalse
otherwise.- Throws:
PortalException
- Since:
- 12.0.0
-
evaluate
public boolean evaluate(UserSegmentationData.ISegmentationFilter filter, FlowContext flowContext, MonitorUser monUser)
Evaluates this filter against the given flow context.- Parameters:
filter
- the filterflowContext
- the flow context.- Returns:
true
if the given context matches this filter orfalse
otherwise.- Since:
- 12.0.0
-
getServiceInstanceConfig
public ServiceInstanceConfig getServiceInstanceConfig()
Returns the serviceInstanceConfig.- Returns:
- the serviceInstanceConfig
- Since:
- 12.0.0
-
shouldUserSegmentationBeRecalculated
public boolean shouldUserSegmentationBeRecalculated(IMonitorEvent event, EventContext eventContext) throws PortalException
Returns whether the user segmentation should be recalculated.- Parameters:
event
- the eventeventContext
- the event context- Returns:
- whether the user segmentation should be recalculated.
- Throws:
PortalException
- Since:
- 17.0.0
-
-