Enum Class EnableGoogleAnalytics.SendMode

java.lang.Object
java.lang.Enum<EnableGoogleAnalytics.SendMode>
org.vaadin.googleanalytics.tracking.EnableGoogleAnalytics.SendMode
All Implemented Interfaces:
Serializable, Comparable<EnableGoogleAnalytics.SendMode>, Constable
Enclosing class:
EnableGoogleAnalytics

public static enum EnableGoogleAnalytics.SendMode extends Enum<EnableGoogleAnalytics.SendMode>
Send mode settings that can be configured through EnableGoogleAnalytics.sendMode().
  • Enum Constant Details

    • ALWAYS

      public static final EnableGoogleAnalytics.SendMode ALWAYS
      Always send tracked page views and events to Google Analytics.
    • PRODUCTION

      public static final EnableGoogleAnalytics.SendMode PRODUCTION
      Send tracked page views and events to Google Analytics only when Vaadin is run in production mode. This is the default setting.
    • NEVER

      public static final EnableGoogleAnalytics.SendMode NEVER
      Never send tracked page views and events to Google Analytics.
  • Method Details

    • values

      public static EnableGoogleAnalytics.SendMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static EnableGoogleAnalytics.SendMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • shouldSend

      public abstract boolean shouldSend(boolean productionMode)
      Checks whether sending should be enabled for the given production mode setting.
      Parameters:
      productionMode - the production mode setting
      Returns:
      whether sending should be enabled