public class MonitorUtilInternal extends Object
Modifier and Type | Field and Description |
---|---|
static String |
MONITOR_FIELD
Big data monitor field identifier.
|
Constructor and Description |
---|
MonitorUtilInternal() |
Modifier and Type | Method and Description |
---|---|
static int |
getDayOfMonth(Date date)
Returns the day of month for a date.
|
static int |
getDayOfWeek(Date date)
Returns the day of week for a date.
|
static Document |
getDocument(IMonitorEvent event,
Deque<IMonitorValuesProvider> monitoringValues)
Returns the document for the given event with the given values or
null if some
required field is missing. |
static DocumentTypeField |
getDocumentTypeField(String fieldId)
Returns the repository document type by raw field identifier.
|
static String |
getDocumentTypeFieldId(String fieldId)
Returns the normalized full field identifier.
|
static String |
getDocumentTypeId(IMonitorEvent event)
Returns the big data document type identifier for the given event.
|
static int |
getMonth(Date date)
Returns the month for a date.
|
static ISearchQueryFilter |
getPrivacyFilter(ServiceInstanceConfig analyticsServiceInstance,
DocumentTypeField acceptedPurposetsTypeField)
Returns the privacy term part filter.
|
static int |
getQuarter(Date date)
Returns the quarter for a date.
|
static long |
getSecondsAfterMidnight(Date date)
Returns the amount of seconds after midnight for a date.
|
static int |
getYear(Date date)
Returns the year for a date.
|
static void |
refreshMonitorIndices()
Refreshes all monitor indices.
|
static void |
setUserInfoIfPresent(boolean isTrusted,
boolean affectTrusted,
MonitorUser monitorUser,
org.json.simple.JSONObject sourceFields)
Update monitor user fields if key field presents in JSON.
|
static void |
setUserInfoIfPresent(boolean isTrusted,
boolean affectTrusted,
MonitorUser monitorUser,
org.json.simple.JSONObject sourceFields,
org.json.simple.JSONObject customAttributes)
Update monitor user fields if key field presents in JSON.
|
public static final String MONITOR_FIELD
public static String getDocumentTypeFieldId(String fieldId)
fieldId
- the raw field identifier.public static DocumentTypeField getDocumentTypeField(String fieldId) throws PortalObjectNotFoundException
fieldId
- the raw field identifier.PortalObjectNotFoundException
public static String getDocumentTypeId(IMonitorEvent event)
event
- the event.public static Document getDocument(IMonitorEvent event, Deque<IMonitorValuesProvider> monitoringValues) throws Exception
null
if some
required field is missing.event
- the event.monitoringValues
- the values.null
if some
required field is missing.Exception
public static long getSecondsAfterMidnight(Date date)
date
- the date for getting seconds after midnight.public static int getDayOfWeek(Date date)
date
- the date for getting day of week.public static int getDayOfMonth(Date date)
date
- the date for getting day of month.public static int getMonth(Date date)
date
- the date for getting month from.public static int getQuarter(Date date)
date
- the date for getting quarter from.public static int getYear(Date date)
date
- the date for getting year from.public static void refreshMonitorIndices() throws PortalException
PortalException
public static void setUserInfoIfPresent(boolean isTrusted, boolean affectTrusted, MonitorUser monitorUser, org.json.simple.JSONObject sourceFields)
isTrusted
- whether the info is trusted or not.affectTrusted
- case info is untrusted, should erase trusted.monitorUser
- the monitor user that will be updated.sourceFields
- a JSON with source key and values.public static void setUserInfoIfPresent(boolean isTrusted, boolean affectTrusted, MonitorUser monitorUser, org.json.simple.JSONObject sourceFields, org.json.simple.JSONObject customAttributes)
isTrusted
- whether the info is trusted or not.affectTrusted
- case info is untrusted, should erase trusted.monitorUser
- the monitor user that will be updated.sourceFields
- a JSON with source key and values.customAttributes
- the custom attributes.public static ISearchQueryFilter getPrivacyFilter(ServiceInstanceConfig analyticsServiceInstance, DocumentTypeField acceptedPurposetsTypeField) throws PortalException
analyticsServiceInstance
- the service instance of analytics.acceptedPurposetsTypeField
- big data privacy term field .PortalException
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.