Class FieldReportCSV
- java.lang.Object
-
- lumis.service.analytics.usersegmentation.rest.FieldReportCSV
-
- All Implemented Interfaces:
java.lang.Comparable<FieldReportCSV>
public class FieldReportCSV extends java.lang.Object implements java.lang.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 Summary
Constructors Constructor Description FieldReportCSV(java.lang.String requestFieldCode)
Constructor that receive a param field.FieldReportCSV(DocumentTypeField documentType)
Create a field by {link DocumentTypeField}FieldReportCSV(UserAttribute userAttribute)
Create a field by {link UserAttribute}
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(FieldReportCSV o)
java.lang.String
getDocumentValue(MonitorUserDocument doc)
Return the value in elasticsearch document that FieldReportCSV represents.java.lang.String
getLabel(ServiceConfig serviceConfig)
Whill return self label field localized by service resource stringjava.lang.String
getRequestFieldCode()
Return a code request for this field.void
validateAccess(java.lang.String serviceInstanceId)
Throws exception if the field is not allowed for given service instance.
-
-
-
Constructor Detail
-
FieldReportCSV
public FieldReportCSV(java.lang.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 java.lang.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 java.lang.String getDocumentValue(MonitorUserDocument doc)
Return the value in elasticsearch document that FieldReportCSV represents.- Parameters:
doc
-- Returns:
- Since:
- 11.1.0
-
getRequestFieldCode
public java.lang.String getRequestFieldCode()
Return a code request for this field.- Returns:
- the code request.
- Since:
- 11.1.0
-
compareTo
public int compareTo(FieldReportCSV o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<FieldReportCSV>
-
validateAccess
public void validateAccess(java.lang.String serviceInstanceId)
Throws exception if the field is not allowed for given service instance.- Parameters:
serviceInstanceId
- the service instance identifier.- Since:
- 14.0.0
-
-