Class EventAnalyticsUtil
- java.lang.Object
-
- lumis.service.analytics.eventanalytics.EventAnalyticsUtil
-
public class EventAnalyticsUtil extends Object
Event analytics utils.- Since:
- 11.0.0
- Version:
- $Revision: 24476 $ $Date: 2021-04-28 11:28:23 -0300 (Wed, 28 Apr 2021) $
-
-
Constructor Summary
Constructors Constructor Description EventAnalyticsUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addStandardDashBoardsAndAllStandartReports(String... dashboardType)
Add standard dashboard by types passed in parameters in all service instances.static boolean
canInheritReport(String reportId, String requestServiceInstanceId)
Returns whether the service instance config can inherit the report.static void
createStandardReportsAndDashboards(String serviceInstanceId)
Creates the standard definitions for the given service instance.static Optional<CompositeDocumentTypeField>
getParentNestedField(DocumentTypeField field)
Returns an optional parent nested object of the given field.static EventAnalyticsReport
getReport(String reportId)
Returns the given report.static EventAnalyticsDashboard
getStandardDashboardByType(String dashboardType)
Returns the standard dashboard by its type.static boolean
isStandardDashboardType(String type)
Check is dashboard is standard by type.static boolean
isStandardReportId(String reportId)
Returns whether the given report identifier is a standard report identifier.static String
localize(String title)
Translates the given string.
-
-
-
Method Detail
-
getReport
public static EventAnalyticsReport getReport(String reportId) throws PortalException
Returns the given report.- Parameters:
reportId
- the report identifier.- Returns:
- the given report
- Throws:
PortalException
- Since:
- 11.2.0
-
getStandardDashboardByType
public static EventAnalyticsDashboard getStandardDashboardByType(String dashboardType) throws PortalException
Returns the standard dashboard by its type.- Parameters:
dashboardType
- the dashboard type.- Returns:
- the standard dashboard by its type.
- Throws:
PortalException
- Since:
- 11.2.0
-
localize
public static String localize(String title) throws PortalException
Translates the given string.- Parameters:
title
- the string to be translated.- Returns:
- the translated string.
- Throws:
PortalException
- Since:
- 11.2.0
-
isStandardReportId
public static boolean isStandardReportId(String reportId)
Returns whether the given report identifier is a standard report identifier.- Parameters:
reportId
- the report identifier.- Returns:
- whether the given report identifier is a standard report identifier.
- Since:
- 11.2.0
-
isStandardDashboardType
public static boolean isStandardDashboardType(String type)
Check is dashboard is standard by type.- Parameters:
type
- the dashboard.- Returns:
- true whether dashboard type is of standard dashboard.
- Since:
- 12.2.0
-
addStandardDashBoardsAndAllStandartReports
public static void addStandardDashBoardsAndAllStandartReports(String... dashboardType) throws Exception
Add standard dashboard by types passed in parameters in all service instances. This method also adds all standards reports that are missing in each service instance. WARNING, this is user inPostUpgradeTaskManager
in step 31.- Parameters:
dashboardType
- the dash boards type standards that be will add in all service instance.- Throws:
Exception
- Since:
- 12.2.0
-
createStandardReportsAndDashboards
public static void createStandardReportsAndDashboards(String serviceInstanceId) throws PortalException
Creates the standard definitions for the given service instance.- Parameters:
serviceInstanceId
- the service instance identifier.- Throws:
PortalException
- Since:
- 11.0.0
-
canInheritReport
public static boolean canInheritReport(String reportId, String requestServiceInstanceId) throws PortalException
Returns whether the service instance config can inherit the report.- Parameters:
reportId
- the report to perform the validation.requestServiceInstanceId
- the request service instance to validate the inheritance.- Returns:
- whether the service instance config can inherit the report.
- Throws:
PortalException
- Since:
- 14.0.0
-
getParentNestedField
public static Optional<CompositeDocumentTypeField> getParentNestedField(DocumentTypeField field)
Returns an optional parent nested object of the given field.- Parameters:
field
- the field- Returns:
- an optional parent nested object of the given field.
- Since:
- 14.0.0
-
-