Package liquibase.analytics
Class LiquibaseAnalyticsListener
java.lang.Object
liquibase.analytics.LiquibaseAnalyticsListener
- All Implemented Interfaces:
AnalyticsListener
,Plugin
-
Field Summary
Fields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Boolean
int
void
handleEvent
(Event event) Handles the specified event.protected boolean
isAnalyticsEnabledBasedOnLicense
(Logger log, Boolean userSuppliedEnabled) protected boolean
boolean
Check whether analytics are enabled.protected static boolean
isOssRemoteAnalyticsEnabled
(AnalyticsConfigurationFactory analyticsConfigurationFactory) protected boolean
isProRemoteAnalyticsEnabled
(AnalyticsConfigurationFactory analyticsConfigurationFactory) static void
sendEvent
(Object requestBody, URL url, Logger logger, Level logLevel, String sendingLogMessage, String responseLogMessage, int connectTimeout, int readTimeout)
-
Constructor Details
-
LiquibaseAnalyticsListener
public LiquibaseAnalyticsListener()
-
-
Method Details
-
getPriority
public int getPriority()- Specified by:
getPriority
in interfaceAnalyticsListener
-
handleEvent
Description copied from interface:AnalyticsListener
Handles the specified event. Implementations of this method should define the logic for processing the event that is passed as a parameter.- Specified by:
handleEvent
in interfaceAnalyticsListener
- Parameters:
event
- the event to be handled.- Throws:
Exception
-
sendEvent
public static void sendEvent(Object requestBody, URL url, Logger logger, Level logLevel, String sendingLogMessage, String responseLogMessage, int connectTimeout, int readTimeout) throws Exception - Throws:
Exception
-
isEnabled
public boolean isEnabled()Check whether analytics are enabled. This method handles all the various ways that analytics can be enabled or disabled and should be the primary way to validate whether analytics are turned on. You should not use the argumentAnalyticsArgs.ENABLED
.- Specified by:
isEnabled
in interfaceAnalyticsListener
- Returns:
- true if analytics are enabled, false otherwise.
- Throws:
Exception
- if there was a problem determining the enabled status of analytics
-
didUserEnableAnalytics
-
isDevAnalyticsEnabled
-
isAnalyticsEnabledBasedOnLicense
-
isOssRemoteAnalyticsEnabled
protected static boolean isOssRemoteAnalyticsEnabled(AnalyticsConfigurationFactory analyticsConfigurationFactory) -
isProRemoteAnalyticsEnabled
protected boolean isProRemoteAnalyticsEnabled(AnalyticsConfigurationFactory analyticsConfigurationFactory)
-