Record Class AppAnalytics.Settings

java.lang.Object
java.lang.Record
com.iizix.jetty.AppAnalytics.Settings
Record Components:
measurementId - The GA4 Measurement ID, matching ModuleApp.GA_MEASUREMENT_ID_PATTERN.
consent - The consent choice: ModuleApp.GA_CONSENT_IIZI_ASKS, ModuleApp.GA_CONSENT_APP_ASKS or ModuleApp.GA_CONSENT_NONE.
name - The application's name for the consent prompt, in the language of the request where the application has one (ModuleApp.getName(lang), the source PWAManifest uses), or null for none: the client then names the appID.
Enclosing class:
AppAnalytics

public static record AppAnalytics.Settings(String measurementId, int consent, String name) extends Record
The per-application settings an IExternalBrowserPages implementation answers for IExternalBrowserPages.getAppAnalytics(String).
Author:
Christopher Mindus
  • Constructor Details

    • Settings

      public Settings(String measurementId, int consent)
      Settings without a name: the consent prompt names the appID.
      Parameters:
      measurementId - The GA4 Measurement ID.
      consent - The consent choice.
    • Settings

      public Settings(String measurementId, int consent, String name)
      Creates an instance of a Settings record class.
      Parameters:
      measurementId - the value for the measurementId record component
      consent - the value for the consent record component
      name - the value for the name record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • measurementId

      public String measurementId()
      Returns the value of the measurementId record component.
      Returns:
      the value of the measurementId record component
    • consent

      public int consent()
      Returns the value of the consent record component.
      Returns:
      the value of the consent record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component