Class UserSegmentationData


  • public class UserSegmentationData
    extends java.lang.Object
    User segmentation data.
    Since:
    11.0.0
    Version:
    $Revision: 24904 $ $Date: 2022-03-30 10:55:41 -0300 (Wed, 30 Mar 2022) $
    • 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
      • 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. Returns null 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
      • 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. 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