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 BooleanintvoidhandleEvent(Event event) Handles the specified event.protected booleanisAnalyticsEnabledBasedOnLicense(Logger log, Boolean userSuppliedEnabled) protected booleanbooleanCheck whether analytics are enabled.protected static booleanisOssRemoteAnalyticsEnabled(AnalyticsConfigurationFactory analyticsConfigurationFactory) protected booleanisProRemoteAnalyticsEnabled(AnalyticsConfigurationFactory analyticsConfigurationFactory) static voidsendEvent(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:
getPriorityin interfaceAnalyticsListener
-
handleEvent
Description copied from interface:AnalyticsListenerHandles the specified event. Implementations of this method should define the logic for processing the event that is passed as a parameter.- Specified by:
handleEventin 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:
isEnabledin 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)
-