Class FieldReportCSV

  • All Implemented Interfaces:
    Comparable<FieldReportCSV>

    public class FieldReportCSV
    extends Object
    implements Comparable<FieldReportCSV>
    A class to represents a abstract elasticsearch field that will pass in request parameters for download CSV User Segmentation. We have two format cases: "_userAttribue_:" and "". Examples: "_userAttribue_:TEXT" and "lum_monitoruser.name.full.token".

    This class also knows how to get a data from a elasticsearch document - this class is like a reflection elasticsearch field.

    Since:
    11.1.0
    Version:
    $Revision: 24476 $ $Date: 2021-04-28 11:28:23 -0300 (Wed, 28 Apr 2021) $
    • Constructor Detail

      • FieldReportCSV

        public FieldReportCSV​(String requestFieldCode)
        Constructor that receive a param field.
        Parameters:
        requestFieldCode - can be "_userAttribue_:" or "". Examples: "_userAttribue_:TEXT" and "lum_monitoruser.name.full.token".
        Since:
        11.1.0
      • FieldReportCSV

        public FieldReportCSV​(DocumentTypeField documentType)
        Create a field by {link DocumentTypeField}
        Parameters:
        documentType - the source metainfo for field.
        Since:
        11.1.0
      • FieldReportCSV

        public FieldReportCSV​(UserAttribute userAttribute)
        Create a field by {link UserAttribute}
        Parameters:
        userAttribute - the source metainfo for field.
        Since:
        11.1.0
    • Method Detail

      • getLabel

        public String getLabel​(ServiceConfig serviceConfig)
                        throws PortalException
        Whill return self label field localized by service resource string
        Parameters:
        serviceConfig - source of resource string.
        Returns:
        localized self label.
        Throws:
        PortalException
        Since:
        11.1.0
      • getDocumentValue

        public String getDocumentValue​(MonitorUserDocument doc)
        Return the value in elasticsearch document that FieldReportCSV represents.
        Parameters:
        doc -
        Returns:
        Since:
        11.1.0
      • getRequestFieldCode

        public String getRequestFieldCode()
        Return a code request for this field.
        Returns:
        the code request.
        Since:
        11.1.0
      • validateAccess

        public void validateAccess​(String serviceInstanceId)
        Throws exception if the field is not allowed for given service instance.
        Parameters:
        serviceInstanceId - the service instance identifier.
        Since:
        14.0.0