Class UserSegmentationData


  • public class UserSegmentationData
    extends Object
    User segmentation data.
    Since:
    11.0.0
    Version:
    $Revision: 24476 $ $Date: 2021-04-28 11:28:23 -0300 (Wed, 28 Apr 2021) $
    • 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. Returns null 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
      • getBigDataFilter

        public Tuple2<ISearchQueryFilter,​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,
                                                               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. Returns true if the given context matches this filter or false otherwise.
        Parameters:
        flowContext - the flow context.
        Returns:
        true if the given context matches this filter or false 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 filter
        flowContext - the flow context.
        Returns:
        true if the given context matches this filter or false otherwise.
        Since:
        12.0.0
      • getServiceInstanceConfig

        public ServiceInstanceConfig getServiceInstanceConfig()
        Returns the serviceInstanceConfig.
        Returns:
        the serviceInstanceConfig
        Since:
        12.0.0