From 73fe85dacf921c6f41b6fffa4316b9186302bb01 Mon Sep 17 00:00:00 2001 From: Matus Tomlein Date: Wed, 1 Feb 2023 17:05:15 +0100 Subject: [PATCH 1/4] Refactor event interface and rename contexts to entities (close #573) PR #576 --- .../internal/tracker/StateManagerTest.kt | 11 ++++--- .../tracker/integration/EventSendingTest.kt | 26 +++++++-------- .../DeepLinkState.kt | 2 +- .../DeepLinkStateMachine.kt | 2 +- .../LifecycleState.kt | 2 +- .../LifecycleStateMachine.kt | 2 +- .../core/statemachine/State.kt | 3 ++ .../{tracker => statemachine}/StateFuture.kt | 2 +- .../core/statemachine/StateMachineEvent.kt | 32 ++++++++++++++++++ .../StateMachineInterface.kt | 2 +- .../{tracker => statemachine}/StateManager.kt | 7 ++-- .../{tracker => statemachine}/TrackerState.kt | 2 +- .../TrackerStateSnapshot.kt | 2 +- .../core/tracker/ScreenState.kt | 1 + .../core/tracker/ScreenStateMachine.kt | 2 ++ .../snowplowanalytics/core/tracker/State.kt | 3 -- .../snowplowanalytics/core/tracker/Tracker.kt | 19 ++++++----- .../core/tracker/TrackerEvent.kt | 12 ++++--- .../core/tracker/TrackerWebViewInterface.kt | 2 +- .../snowplow/event/AbstractEvent.kt | 15 +++++++-- .../snowplowanalytics/snowplow/event/Event.kt | 8 ++++- .../snowplow/tracker/InspectableEvent.kt | 33 ++++++++++++++++--- .../snowplow/tracker/SessionState.kt | 2 +- 23 files changed, 136 insertions(+), 56 deletions(-) rename snowplow-tracker/src/main/java/com/snowplowanalytics/core/{tracker => statemachine}/DeepLinkState.kt (94%) rename snowplow-tracker/src/main/java/com/snowplowanalytics/core/{tracker => statemachine}/DeepLinkStateMachine.kt (98%) rename snowplow-tracker/src/main/java/com/snowplowanalytics/core/{tracker => statemachine}/LifecycleState.kt (60%) rename snowplow-tracker/src/main/java/com/snowplowanalytics/core/{tracker => statemachine}/LifecycleStateMachine.kt (97%) create mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/State.kt rename snowplow-tracker/src/main/java/com/snowplowanalytics/core/{tracker => statemachine}/StateFuture.kt (96%) create mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineEvent.kt rename snowplow-tracker/src/main/java/com/snowplowanalytics/core/{tracker => statemachine}/StateMachineInterface.kt (92%) rename snowplow-tracker/src/main/java/com/snowplowanalytics/core/{tracker => statemachine}/StateManager.kt (96%) rename snowplow-tracker/src/main/java/com/snowplowanalytics/core/{tracker => statemachine}/TrackerState.kt (95%) rename snowplow-tracker/src/main/java/com/snowplowanalytics/core/{tracker => statemachine}/TrackerStateSnapshot.kt (64%) delete mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/State.kt diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt index ee16b15b5..90c7ed3ab 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt @@ -3,6 +3,9 @@ package com.snowplowanalytics.snowplow.internal.tracker import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.platform.app.InstrumentationRegistry import com.snowplowanalytics.core.emitter.Emitter +import com.snowplowanalytics.core.statemachine.State +import com.snowplowanalytics.core.statemachine.StateMachineInterface +import com.snowplowanalytics.core.statemachine.StateManager import com.snowplowanalytics.core.tracker.* import com.snowplowanalytics.snowplow.event.* import com.snowplowanalytics.snowplow.payload.SelfDescribingJson @@ -39,7 +42,7 @@ class StateManagerTest { var mockState = trackerState.getState("identifier") as MockState? Assert.assertEquals(1, mockState!!.value.toLong()) - var e: InspectableEvent = TrackerEvent(eventInc, trackerState) + var e = TrackerEvent(eventInc, trackerState) var entities = stateManager.entitiesForProcessedEvent(e) var data = entities[0].map["data"] as Map? Assert.assertEquals(1, data!!["value"]!!.toInt().toLong()) @@ -93,7 +96,7 @@ class StateManagerTest { val trackerState = stateManager.trackerStateForProcessedEvent(eventInc) val state = trackerState.getState("identifier") Assert.assertNull(state) - val e: InspectableEvent = TrackerEvent(eventInc, trackerState) + val e = TrackerEvent(eventInc, trackerState) val entities = stateManager.entitiesForProcessedEvent(e) Assert.assertEquals(0, entities.size.toLong()) } @@ -338,7 +341,7 @@ class StateManagerTest { } }) val trackerState = stateManager.trackerStateForProcessedEvent(eventInc) - val e: InspectableEvent = TrackerEvent(eventInc, trackerState) + val e = TrackerEvent(eventInc, trackerState) val entities = stateManager.entitiesForProcessedEvent(e) Assert.assertEquals(2, entities.size.toLong()) } @@ -355,7 +358,7 @@ class StateManagerTest { } }) val trackerState = stateManager.trackerStateForProcessedEvent(eventInc) - val e: InspectableEvent = TrackerEvent(eventInc, trackerState) + val e = TrackerEvent(eventInc, trackerState) val entities = stateManager.entitiesForProcessedEvent(e) Assert.assertEquals(1, entities.size.toLong()) } diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt index ee3f7de55..ba9d5eaa6 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt @@ -281,14 +281,14 @@ class EventSendingTest { } @Throws(JSONException::class) - fun getSessionData(contexts: JSONArray): JSONObject? { - for (i in 0 until contexts.length()) { + fun getSessionData(entities: JSONArray): JSONObject? { + for (i in 0 until entities.length()) { val sessionSchema = "iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2" - val context = contexts[i] as JSONObject - val schema = context["schema"] as String + val entity = entities[i] as JSONObject + val schema = entity["schema"] as String if (schema == sessionSchema) { - return context["data"] as JSONObject + return entity["data"] as JSONObject } } return null @@ -460,7 +460,7 @@ class EventSendingTest { fun trackPageView(tracker: Tracker) { tracker.track(PageView("pageUrl").pageTitle("pageTitle").referrer("pageReferrer")) tracker.track( - PageView("pageUrl").pageTitle("pageTitle").referrer("pageReferrer").contexts( + PageView("pageUrl").pageTitle("pageTitle").referrer("pageReferrer").entities( customContext ) ) @@ -472,7 +472,7 @@ class EventSendingTest { ) tracker.track( Structured("category", "action").label("label").property("property").value(0.00) - .contexts( + .entities( customContext ) ) @@ -480,13 +480,13 @@ class EventSendingTest { private fun trackScreenView(tracker: Tracker) { tracker.track(ScreenView("screenName")) - tracker.track(ScreenView("screenName").contexts(customContext)) + tracker.track(ScreenView("screenName").entities(customContext)) } private fun trackTimings(tracker: Tracker) { tracker.track(Timing("category", "variable", 1).label("label")) tracker.track( - Timing("category", "variable", 1).label("label").contexts( + Timing("category", "variable", 1).label("label").entities( customContext ) ) @@ -501,7 +501,7 @@ class EventSendingTest { ) tracker.track(SelfDescribing(test)) tracker.track( - SelfDescribing(test).contexts( + SelfDescribing(test).entities( customContext ) ) @@ -519,7 +519,7 @@ class EventSendingTest { tracker.track( EcommerceTransaction("order-1", 42.50, items).affiliation("affiliation").taxValue(2.50) .shipping(5.00).city("Sydney").state("NSW").country("Australia").currency("AUD") - .contexts( + .entities( customContext ) ) @@ -543,7 +543,7 @@ class EventSendingTest { ) tracker.track( ConsentGranted("gexpiry", "gid", "dversion").documentDescription("gdesc") - .documentName("dname").documents(documents).contexts( + .documentName("dname").documents(documents).entities( customContext ) ) @@ -567,7 +567,7 @@ class EventSendingTest { ) tracker.track( ConsentWithdrawn(false, "gid", "dversion").documentDescription("gdesc") - .documentName("dname").documents(documents).contexts( + .documentName("dname").documents(documents).entities( customContext ) ) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/DeepLinkState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkState.kt similarity index 94% rename from snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/DeepLinkState.kt rename to snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkState.kt index ee0ccbf2d..05d245696 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/DeepLinkState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkState.kt @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.snowplowanalytics.core.tracker +package com.snowplowanalytics.core.statemachine class DeepLinkState(val url: String, val referrer: String?) : State { var readyForOutput = false diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/DeepLinkStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt similarity index 98% rename from snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/DeepLinkStateMachine.kt rename to snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt index 238121c0c..6638a7d9e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/DeepLinkStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt @@ -10,7 +10,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ -package com.snowplowanalytics.core.tracker +package com.snowplowanalytics.core.statemachine import com.snowplowanalytics.core.constants.TrackerConstants import com.snowplowanalytics.snowplow.entity.DeepLink diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/LifecycleState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleState.kt similarity index 60% rename from snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/LifecycleState.kt rename to snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleState.kt index 7a2fcee7b..15c5abb3e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/LifecycleState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleState.kt @@ -1,3 +1,3 @@ -package com.snowplowanalytics.core.tracker +package com.snowplowanalytics.core.statemachine class LifecycleState(val isForeground: Boolean, val index: Int?) : State diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/LifecycleStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt similarity index 97% rename from snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/LifecycleStateMachine.kt rename to snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt index 4fb8c8392..1f3eb892a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/LifecycleStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt @@ -1,4 +1,4 @@ -package com.snowplowanalytics.core.tracker +package com.snowplowanalytics.core.statemachine import com.snowplowanalytics.snowplow.entity.LifecycleEntity import com.snowplowanalytics.snowplow.event.Background diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/State.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/State.kt new file mode 100644 index 000000000..1a488b01f --- /dev/null +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/State.kt @@ -0,0 +1,3 @@ +package com.snowplowanalytics.core.statemachine + +interface State diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/StateFuture.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateFuture.kt similarity index 96% rename from snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/StateFuture.kt rename to snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateFuture.kt index 84d071f4b..7b20f2203 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/StateFuture.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateFuture.kt @@ -1,4 +1,4 @@ -package com.snowplowanalytics.core.tracker +package com.snowplowanalytics.core.statemachine import com.snowplowanalytics.snowplow.event.Event diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineEvent.kt new file mode 100644 index 000000000..960adc416 --- /dev/null +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineEvent.kt @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.core.statemachine + +import com.snowplowanalytics.snowplow.tracker.InspectableEvent + +/** + * The inspectable properties of the event used to generate context entities. + */ +interface StateMachineEvent : InspectableEvent { + /** + * The tracker state at the time the event was sent. + */ + val state: TrackerStateSnapshot + + /** + * Add payload values to the event. + * @param payload Map of values to add to the event payload + * @return Whether or not the values have been successfully added to the event payload + */ + fun addPayloadValues(payload: Map): Boolean +} diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/StateMachineInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt similarity index 92% rename from snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/StateMachineInterface.kt rename to snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt index 80f220eed..702de5a5c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/StateMachineInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt @@ -1,4 +1,4 @@ -package com.snowplowanalytics.core.tracker +package com.snowplowanalytics.core.statemachine import com.snowplowanalytics.snowplow.event.Event import com.snowplowanalytics.snowplow.payload.SelfDescribingJson diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/StateManager.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt similarity index 96% rename from snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/StateManager.kt rename to snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt index caca279b0..622e3b340 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/StateManager.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt @@ -1,9 +1,8 @@ -package com.snowplowanalytics.core.tracker +package com.snowplowanalytics.core.statemachine import com.snowplowanalytics.snowplow.event.AbstractSelfDescribing import com.snowplowanalytics.snowplow.event.Event import com.snowplowanalytics.snowplow.payload.SelfDescribingJson -import com.snowplowanalytics.snowplow.tracker.InspectableEvent import java.util.* class StateManager { @@ -107,7 +106,7 @@ class StateManager { } @Synchronized - fun entitiesForProcessedEvent(event: InspectableEvent): List { + fun entitiesForProcessedEvent(event: StateMachineEvent): List { val result: MutableList = LinkedList() val stateMachines: MutableList = LinkedList() val stateMachinesForSchema: List? = @@ -133,7 +132,7 @@ class StateManager { } @Synchronized - fun addPayloadValuesToEvent(event: InspectableEvent): Boolean { + fun addPayloadValuesToEvent(event: StateMachineEvent): Boolean { var failures = 0 val stateMachines: MutableList = LinkedList() val stateMachinesForSchema: List? = diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerState.kt similarity index 95% rename from snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerState.kt rename to snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerState.kt index b74257c30..7d79ace85 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerState.kt @@ -1,4 +1,4 @@ -package com.snowplowanalytics.core.tracker +package com.snowplowanalytics.core.statemachine class TrackerState : TrackerStateSnapshot { private var trackerState = HashMap() diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerStateSnapshot.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerStateSnapshot.kt similarity index 64% rename from snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerStateSnapshot.kt rename to snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerStateSnapshot.kt index 959685e0b..3dbc7adf9 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerStateSnapshot.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerStateSnapshot.kt @@ -1,4 +1,4 @@ -package com.snowplowanalytics.core.tracker +package com.snowplowanalytics.core.statemachine interface TrackerStateSnapshot { fun getState(stateIdentifier: String): State? diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenState.kt index f7cfcd213..01aec7117 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenState.kt @@ -3,6 +3,7 @@ package com.snowplowanalytics.core.tracker import androidx.annotation.RestrictTo import com.snowplowanalytics.core.constants.Parameters import com.snowplowanalytics.core.constants.TrackerConstants +import com.snowplowanalytics.core.statemachine.State import com.snowplowanalytics.core.utils.Util.uUIDString import com.snowplowanalytics.snowplow.payload.SelfDescribingJson import com.snowplowanalytics.snowplow.payload.TrackerPayload diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt index a790ab8d0..415910bc9 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt @@ -2,6 +2,8 @@ package com.snowplowanalytics.core.tracker import com.snowplowanalytics.core.constants.Parameters import com.snowplowanalytics.core.constants.TrackerConstants +import com.snowplowanalytics.core.statemachine.State +import com.snowplowanalytics.core.statemachine.StateMachineInterface import com.snowplowanalytics.snowplow.event.Event import com.snowplowanalytics.snowplow.event.ScreenView import com.snowplowanalytics.snowplow.payload.SelfDescribingJson diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/State.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/State.kt deleted file mode 100644 index cc2eceebf..000000000 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/State.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.snowplowanalytics.core.tracker - -interface State diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt index 106f94c46..707d3a852 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt @@ -21,6 +21,7 @@ import com.snowplowanalytics.core.gdpr.Gdpr import com.snowplowanalytics.core.session.ProcessObserver.Companion.initialize import com.snowplowanalytics.core.session.Session import com.snowplowanalytics.core.session.Session.Companion.getInstance +import com.snowplowanalytics.core.statemachine.* import com.snowplowanalytics.core.tracker.Logger.d import com.snowplowanalytics.core.tracker.Logger.track import com.snowplowanalytics.core.tracker.Logger.updateLogLevel @@ -507,14 +508,14 @@ class Tracker(emitter: Emitter, val namespace: String, var appId: String, contex } else { addSelfDescribingPropertiesToPayload(payload, event) } - val contexts = event.contexts - addBasicContextsToContexts(contexts, event) - addGlobalContextsToContexts(contexts, event) - addStateMachineEntitiesToContexts(contexts, event) - wrapContextsToPayload(payload, contexts) + val entities = event.entities + addBasicContextsToContexts(entities, event) + addGlobalContextsToContexts(entities, event) + addStateMachineEntitiesToContexts(entities, event) + wrapContextsToPayload(payload, entities) if (!event.isPrimitive) { // TODO: To remove when Atomic table refactoring is finished - workaroundForCampaignAttributionEnrichment(payload, event, contexts) + workaroundForCampaignAttributionEnrichment(payload, event, entities) } return payload } @@ -613,7 +614,7 @@ class Tracker(emitter: Emitter, val namespace: String, var appId: String, contex } val sessionContextJson = sessionManager.getSessionContext(eventId, eventTimestamp, userAnonymisation) - sessionContextJson?.let { event.contexts.add(it) } + sessionContextJson?.let { event.entities.add(it) } } } @@ -638,7 +639,7 @@ class Tracker(emitter: Emitter, val namespace: String, var appId: String, contex private fun addGlobalContextsToContexts( contexts: MutableList, - event: InspectableEvent + event: StateMachineEvent ) { synchronized(globalContextGenerators) { for (generator in globalContextGenerators.values) { @@ -649,7 +650,7 @@ class Tracker(emitter: Emitter, val namespace: String, var appId: String, contex private fun addStateMachineEntitiesToContexts( contexts: MutableList, - event: InspectableEvent + event: StateMachineEvent ) { val stateManagerEntities = stateManager.entitiesForProcessedEvent(event) contexts.addAll(stateManagerEntities) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt index deffc5606..a3b36c85c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt @@ -12,31 +12,33 @@ */ package com.snowplowanalytics.core.tracker +import com.snowplowanalytics.core.statemachine.StateMachineEvent +import com.snowplowanalytics.core.statemachine.TrackerState +import com.snowplowanalytics.core.statemachine.TrackerStateSnapshot import com.snowplowanalytics.snowplow.event.AbstractPrimitive import com.snowplowanalytics.snowplow.event.AbstractSelfDescribing import com.snowplowanalytics.snowplow.event.Event import com.snowplowanalytics.snowplow.event.TrackerError import com.snowplowanalytics.snowplow.payload.SelfDescribingJson -import com.snowplowanalytics.snowplow.tracker.InspectableEvent import java.util.* class TrackerEvent @JvmOverloads constructor(event: Event, state: TrackerStateSnapshot? = null) : - InspectableEvent { + StateMachineEvent { override var schema: String? = null override var name: String? = null override lateinit var payload: MutableMap override lateinit var state: TrackerStateSnapshot - + override lateinit var entities: MutableList + var eventId: UUID = UUID.randomUUID() var timestamp: Long = System.currentTimeMillis() var trueTimestamp: Long? - var contexts: MutableList var isPrimitive = false var isService: Boolean init { - contexts = event.contexts.toMutableList() + entities = event.entities.toMutableList() trueTimestamp = event.trueTimestamp payload = HashMap(event.dataPayload) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerWebViewInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerWebViewInterface.kt index 403da19d0..8844ffdd9 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerWebViewInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerWebViewInterface.kt @@ -143,7 +143,7 @@ class TrackerWebViewInterface { if (context != null) { val contextEntities = parseContext(context) if (contextEntities.isNotEmpty()) { - event.contexts(contextEntities) + event.entities(contextEntities) } } if (trackers == null || trackers.isEmpty()) { diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt index bfbcf8ce0..74cd786e5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt @@ -35,11 +35,17 @@ abstract class AbstractEvent : Event { // Builder methods /** Adds a list of contexts. */ - fun contexts(contexts: List?): AbstractEvent { - contexts?.let { customContexts.addAll(contexts) } + fun entities(entities: List?): AbstractEvent { + entities?.let { customContexts.addAll(entities) } return this } + /** Adds a list of contexts. */ + @Deprecated("Please use `entities()`") + fun contexts(contexts: List?): AbstractEvent { + return entities(contexts) + } + /** Set the custom timestamp of the event. */ fun trueTimestamp(trueTimestamp: Long?): AbstractEvent { this.trueTimestamp = trueTimestamp @@ -51,9 +57,12 @@ abstract class AbstractEvent : Event { /** * @return the event custom context */ - override val contexts: List + override val entities: List get() = ArrayList(customContexts) + override val contexts: List + get() = entities + override fun beginProcessing(tracker: Tracker) {} override fun endProcessing(tracker: Tracker) {} } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Event.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Event.kt index bebe1972e..583264639 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Event.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Event.kt @@ -20,8 +20,14 @@ import com.snowplowanalytics.snowplow.payload.SelfDescribingJson */ interface Event { /** - * @return the event custom contexts + * @return the event custom context entities */ + val entities: List + + /** + * @return the event custom context entities + */ + @Deprecated("Please use `entities`") val contexts: List /** diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/InspectableEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/InspectableEvent.kt index e140f1ecd..48f47e9cf 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/InspectableEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/InspectableEvent.kt @@ -1,12 +1,37 @@ +/* + * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.tracker -import com.snowplowanalytics.core.tracker.TrackerStateSnapshot +import com.snowplowanalytics.snowplow.payload.SelfDescribingJson +/** + * The inspectable properties of the event used to generate context entities. + */ interface InspectableEvent { + /** + * The schema of the event + */ val schema: String? + /** + * The name of the event + */ val name: String? + /** + * The payload of the event + */ val payload: Map - val state: TrackerStateSnapshot - - fun addPayloadValues(payload: Map): Boolean + /** + * The list of context entities + */ + val entities: MutableList } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/SessionState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/SessionState.kt index 4ebf70f67..e4bc82aff 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/SessionState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/SessionState.kt @@ -13,7 +13,7 @@ package com.snowplowanalytics.snowplow.tracker import com.snowplowanalytics.core.constants.Parameters -import com.snowplowanalytics.core.tracker.State +import com.snowplowanalytics.core.statemachine.State class SessionState( val firstEventId: String, From 15d1fb438abeedf0497363c581316d1803e7251e Mon Sep 17 00:00:00 2001 From: Matus Tomlein Date: Thu, 2 Feb 2023 09:21:55 +0100 Subject: [PATCH 2/4] Add ability to provide custom tracker plugins to inspect and enrich tracked events (close #574) PR #577 --- .../globalcontexts/GlobalContextTest.kt | 8 +- .../internal/tracker/StateManagerTest.kt | 53 ++++- .../snowplow/internal/tracker/TrackerTest.kt | 14 +- .../snowplow/tracker/PluginsTest.kt | 205 ++++++++++++++++++ .../tracker/integration/EventSendingTest.kt | 21 +- .../core/gdpr/GdprControllerImpl.kt | 2 +- .../GlobalContextPluginConfiguration.kt | 29 +++ .../GlobalContextsControllerImpl.kt | 26 ++- .../core/statemachine/DeepLinkStateMachine.kt | 16 +- .../statemachine/LifecycleStateMachine.kt | 14 ++ .../core/statemachine/PluginStateMachine.kt | 61 ++++++ .../statemachine/StateMachineInterface.kt | 3 + .../core/statemachine/StateManager.kt | 85 +++++--- .../core/tracker/PluginsControllerImpl.kt | 34 +++ .../core/tracker/ScreenStateMachine.kt | 14 ++ .../core/tracker/ServiceProvider.kt | 66 +++--- .../core/tracker/ServiceProviderInterface.kt | 7 + .../snowplowanalytics/core/tracker/Tracker.kt | 177 +++++---------- .../core/tracker/TrackerControllerImpl.kt | 2 + .../core/tracker/TrackerEvent.kt | 47 ++++ .../GlobalContextsConfiguration.kt | 10 + .../configuration/PluginConfiguration.kt | 118 ++++++++++ .../snowplow/controller/PluginsController.kt | 35 +++ .../snowplow/controller/TrackerController.kt | 6 + 24 files changed, 834 insertions(+), 219 deletions(-) create mode 100644 snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/PluginsTest.kt create mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextPluginConfiguration.kt create mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt create mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PluginsControllerImpl.kt create mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PluginConfiguration.kt create mode 100644 snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/PluginsController.kt diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContextTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContextTest.kt index cbbe7f6c3..3a45e59ca 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContextTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContextTest.kt @@ -241,6 +241,12 @@ class GlobalContextTest { .base64encoding(false) .sessionContext(true) val gcConfig = GlobalContextsConfiguration(generators) - return createTracker(context, "aNamespace", networkConfig, trackerConfig, gcConfig) + return createTracker( + context, + "aNamespace" + Math.random().toString(), + networkConfig, + trackerConfig, + gcConfig + ) } } diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt index 90c7ed3ab..03bf2b4c1 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt @@ -6,6 +6,7 @@ import com.snowplowanalytics.core.emitter.Emitter import com.snowplowanalytics.core.statemachine.State import com.snowplowanalytics.core.statemachine.StateMachineInterface import com.snowplowanalytics.core.statemachine.StateManager +import com.snowplowanalytics.core.statemachine.TrackerState import com.snowplowanalytics.core.tracker.* import com.snowplowanalytics.snowplow.event.* import com.snowplowanalytics.snowplow.payload.SelfDescribingJson @@ -16,13 +17,14 @@ import org.junit.Assert import org.junit.Test import org.junit.runner.RunWith import java.util.* +import kotlin.collections.ArrayList @RunWith(AndroidJUnit4::class) class StateManagerTest { @Test fun testStateManager() { val stateManager = StateManager() - stateManager.addOrReplaceStateMachine(MockStateMachine(), "identifier") + stateManager.addOrReplaceStateMachine(MockStateMachine()) val eventInc = SelfDescribing("inc", object : HashMap() { init { put("value", 1) @@ -86,7 +88,7 @@ class StateManagerTest { @Test fun testAddRemoveStateMachine() { val stateManager = StateManager() - stateManager.addOrReplaceStateMachine(MockStateMachine(), "identifier") + stateManager.addOrReplaceStateMachine(MockStateMachine()) stateManager.removeStateMachine("identifier") val eventInc = SelfDescribing("inc", object : HashMap() { init { @@ -333,8 +335,8 @@ class StateManagerTest { @Throws(InterruptedException::class) fun testAllowsMultipleStateMachines() { val stateManager = StateManager() - stateManager.addOrReplaceStateMachine(MockStateMachine(), "identifier1") - stateManager.addOrReplaceStateMachine(MockStateMachine(), "identifier2") + stateManager.addOrReplaceStateMachine(MockStateMachine("identifier1")) + stateManager.addOrReplaceStateMachine(MockStateMachine("identifier2")) val eventInc = SelfDescribing("inc", object : HashMap() { init { put("value", 1) @@ -350,8 +352,8 @@ class StateManagerTest { @Throws(InterruptedException::class) fun testDoesntDuplicateStateFromStateMachinesWithSameId() { val stateManager = StateManager() - stateManager.addOrReplaceStateMachine(MockStateMachine(), "identifier") - stateManager.addOrReplaceStateMachine(MockStateMachine(), "identifier") + stateManager.addOrReplaceStateMachine(MockStateMachine()) + stateManager.addOrReplaceStateMachine(MockStateMachine()) val eventInc = SelfDescribing("inc", object : HashMap() { init { put("value", 1) @@ -366,7 +368,7 @@ class StateManagerTest { @Test fun testReplacingStateMachineDoesntResetTrackerState() { val stateManager = StateManager() - stateManager.addOrReplaceStateMachine(MockStateMachine(), "identifier") + stateManager.addOrReplaceStateMachine(MockStateMachine()) stateManager.trackerStateForProcessedEvent( SelfDescribing( "inc", @@ -377,7 +379,7 @@ class StateManagerTest { }) ) val state1 = stateManager.trackerState.getState("identifier") - stateManager.addOrReplaceStateMachine(MockStateMachine(), "identifier") + stateManager.addOrReplaceStateMachine(MockStateMachine()) val state2 = stateManager.trackerState.getState("identifier") Assert.assertNotNull(state1) Assert.assertSame(state1, state2) @@ -389,7 +391,7 @@ class StateManagerTest { class MockStateMachine2 : MockStateMachine() val stateManager = StateManager() - stateManager.addOrReplaceStateMachine(MockStateMachine1(), "identifier") + stateManager.addOrReplaceStateMachine(MockStateMachine1()) stateManager.trackerStateForProcessedEvent( SelfDescribing( "inc", @@ -400,15 +402,37 @@ class StateManagerTest { }) ) val state1 = stateManager.trackerState.getState("identifier") - stateManager.addOrReplaceStateMachine(MockStateMachine2(), "identifier") + stateManager.addOrReplaceStateMachine(MockStateMachine2()) val state2 = stateManager.trackerState.getState("identifier") Assert.assertNotNull(state1) Assert.assertNotSame(state1, state2) } + + @Test + fun testAfterTrackCallback() { + val stateManager = StateManager() + val stateMachine = MockStateMachine() + stateManager.addOrReplaceStateMachine(stateMachine) + + stateManager.afterTrack( + TrackerEvent( + Structured("cat", "act"), + TrackerState() + ) + ) + + Thread.sleep(100) + Assert.assertEquals(1, stateMachine.afterTrackEvents.size) + Assert.assertEquals("cat", stateMachine.afterTrackEvents.first().payload["se_ca"]) + } } // Mock classes internal class MockState(var value: Int) : State -internal open class MockStateMachine : StateMachineInterface { +internal open class MockStateMachine( + override val identifier: String = "identifier" +) : StateMachineInterface { + var afterTrackEvents: MutableList = ArrayList() + override val subscribedEventSchemasForTransitions: List get() = LinkedList(listOf("inc", "dec")) @@ -418,6 +442,9 @@ internal open class MockStateMachine : StateMachineInterface { override val subscribedEventSchemasForPayloadUpdating: List get() = LinkedList(listOf("event")) + override val subscribedEventSchemasForAfterTrackCallback: List + get() = Collections.singletonList("*") + override fun transition(event: Event, state: State?): State? { val e = event as SelfDescribing var currentState = state as MockState? @@ -454,4 +481,8 @@ internal open class MockStateMachine : StateMachineInterface { } } } + + override fun afterTrack(event: InspectableEvent) { + afterTrackEvents.add(event) + } } diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt index cef6abc9e..2cd6146a6 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt @@ -183,7 +183,7 @@ class TrackerTest { fun testTrackSelfDescribingEvent() { shutdown() - val namespace = "myNamespace" + val namespace = "trackSelfDescribingEvent" TestUtils.createSessionSharedPreferences(context, namespace) val mockWebServer = getMockServer(1) var emitter: Emitter? = null @@ -243,7 +243,7 @@ class TrackerTest { fun testTrackWithNoContext() { shutdown() - val namespace = "myNamespaceNoContext" + val namespace = "trackWithNoContext" TestUtils.createSessionSharedPreferences(context, namespace) val mockWebServer = getMockServer(1) @@ -308,7 +308,7 @@ class TrackerTest { fun testTrackWithoutDataCollection() { threadCount = 30 shutdown() - val namespace = "myNamespace" + val namespace = "trackWithoutDataCollection" TestUtils.createSessionSharedPreferences(context, namespace) val mockWebServer = getMockServer(1) val builder = { emitter: Emitter -> emitter.bufferOption = BufferOption.Single } @@ -340,7 +340,7 @@ class TrackerTest { fun testTrackWithSession() { threadCount = 30 shutdown() - val namespace = "myNamespace" + val namespace = "trackWithSession" TestUtils.createSessionSharedPreferences(context, namespace) val mockWebServer = getMockServer(1) val builder = { emitter: Emitter -> emitter.bufferOption = BufferOption.Single } @@ -369,7 +369,7 @@ class TrackerTest { @Test fun testTrackScreenView() { - val namespace = "myNamespace" + val namespace = "trackScreenView" TestUtils.createSessionSharedPreferences(context, namespace) val builder = { emitter: Emitter -> emitter.bufferOption = BufferOption.Single } val emitter = Emitter( @@ -412,7 +412,7 @@ class TrackerTest { @Test fun testTrackUncaughtException() { - val namespace = "myNamespace" + val namespace = "trackUncaughtException" TestUtils.createSessionSharedPreferences(context, namespace) Thread.setDefaultUncaughtExceptionHandler( TestExceptionHandler("Illegal State Exception has been thrown!") @@ -441,7 +441,7 @@ class TrackerTest { @Test fun testExceptionHandler() { - val namespace = "myNamespace" + val namespace = "exceptionHandler" TestUtils.createSessionSharedPreferences(context, namespace) val handler = TestExceptionHandler("Illegal State Exception has been thrown!") Thread.setDefaultUncaughtExceptionHandler(handler) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/PluginsTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/PluginsTest.kt new file mode 100644 index 000000000..c050862da --- /dev/null +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/PluginsTest.kt @@ -0,0 +1,205 @@ +/* + * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.snowplow.tracker + +import android.content.Context +import androidx.test.ext.junit.runners.AndroidJUnit4 +import androidx.test.platform.app.InstrumentationRegistry +import com.snowplowanalytics.snowplow.Snowplow +import com.snowplowanalytics.snowplow.Snowplow.removeAllTrackers +import com.snowplowanalytics.snowplow.configuration.Configuration +import com.snowplowanalytics.snowplow.configuration.NetworkConfiguration +import com.snowplowanalytics.snowplow.configuration.PluginConfiguration +import com.snowplowanalytics.snowplow.controller.TrackerController +import com.snowplowanalytics.snowplow.event.ScreenView +import com.snowplowanalytics.snowplow.event.SelfDescribing +import com.snowplowanalytics.snowplow.event.Structured +import com.snowplowanalytics.snowplow.network.HttpMethod +import com.snowplowanalytics.snowplow.payload.SelfDescribingJson +import org.junit.After +import org.junit.Assert +import org.junit.Test +import org.junit.runner.RunWith +import java.util.* + +@RunWith(AndroidJUnit4::class) +class PluginsTest { + + @After + fun tearDown() { + removeAllTrackers() + } + + // --- TESTS + @Test + fun addsEntitiesToEvent() { + val plugin = PluginConfiguration("plugin") + plugin.entities { Collections.singletonList( + SelfDescribingJson("schema", Collections.singletonMap("val", it.payload["se_ca"])) + ) } + + val testPlugin = PluginConfiguration("test") + var expectation = false + testPlugin.afterTrack { + expectation = it.entities.filter { + val data = it.map["data"] as Map<*, *>? + it.map["schema"] == "schema" && data?.get("val") == "cat" + }.isNotEmpty() + } + + val tracker = createTracker(listOf(plugin, testPlugin)) + tracker.track(Structured("cat", "act")) + + Thread.sleep(100) + Assert.assertTrue(expectation) + } + + @Test + fun addsEntitiesFromMultiplePlugins() { + val plugin1 = PluginConfiguration("plugin1") + plugin1.entities { listOf(SelfDescribingJson("schema1", emptyMap())) } + + val plugin2 = PluginConfiguration("plugin2") + plugin2.entities { listOf(SelfDescribingJson("schema2", emptyMap())) } + + val testPlugin = PluginConfiguration("test") + var expectation = false + testPlugin.afterTrack { + expectation = it.entities.filter { it.map["schema"] == "schema1" }.size == 1 && + it.entities.filter { it.map["schema"] == "schema2" }.size == 1 + } + + val tracker = createTracker(listOf(plugin1, plugin2, testPlugin)) + tracker.track(ScreenView("sv")) + + Thread.sleep(100) + Assert.assertTrue(expectation) + } + + @Test + fun addsEntitiesOnlyForEventsMatchingSchema() { + val plugin = PluginConfiguration("plugin") + plugin.entities(listOf("schema1")) { + listOf(SelfDescribingJson("xx", emptyMap())) + } + + var event1HasEntity: Boolean? = null + var event2HasEntity: Boolean? = null + + val testPlugin = PluginConfiguration("test") + testPlugin.afterTrack { + if (it.schema == "schema1") { + event1HasEntity = it.entities.filter { it.map["schema"] == "xx" }.isNotEmpty() + } + if (it.schema == "schema2") { + event2HasEntity = it.entities.filter { it.map["schema"] == "xx" }.isNotEmpty() + } + } + + val tracker = createTracker(listOf(plugin, testPlugin)) + tracker.track(SelfDescribing("schema1", emptyMap())) + tracker.track(SelfDescribing("schema2", emptyMap())) + + Thread.sleep(100) + Assert.assertTrue(event1HasEntity!!) + Assert.assertFalse(event2HasEntity!!) + } + + @Test + fun callsAfterTrackOnlyForEventsMatchingSchema() { + var event1Called = false + var event2Called = false + var event3Called = false + + val plugin = PluginConfiguration("plugin") + plugin.afterTrack(listOf("schema1")) { + if (it.schema == "schema1") { event1Called = true } + if (it.schema == "schema2") { event2Called = true } + if (it.schema == null) { event3Called = true } + } + + val tracker = createTracker(listOf(plugin)) + tracker.track(SelfDescribing("schema1", emptyMap())) + tracker.track(SelfDescribing("schema2", emptyMap())) + tracker.track(Structured("cat", "act")) + + Thread.sleep(100) + Assert.assertTrue(event1Called) + Assert.assertFalse(event2Called) + Assert.assertFalse(event3Called) + } + + @Test + fun callsAfterTrackOnlyForStructuredEvent() { + var selfDescribingCalled = false + var structuredCalled = false + + val plugin = PluginConfiguration("plugin") + plugin.afterTrack(listOf("se")) { + if (it.schema == "schema1") { selfDescribingCalled = true } + if (it.schema == null) { structuredCalled = true } + } + + val tracker = createTracker(listOf(plugin)) + tracker.track(SelfDescribing("schema1", emptyMap())) + tracker.track(Structured("cat", "act")) + + Thread.sleep(100) + Assert.assertTrue(structuredCalled) + Assert.assertFalse(selfDescribingCalled) + } + + @Test + fun addsPluginToTracker() { + val tracker = createTracker(emptyList()) + + val plugin = PluginConfiguration("plugin") + var expectation = false + plugin.afterTrack { expectation = true } + tracker.plugins.addPlugin(plugin) + + tracker.track(ScreenView("sv")) + + Thread.sleep(100) + Assert.assertTrue(expectation) + } + + @Test + fun removesPluginFromTracker() { + var pluginCalled = false + val plugin = PluginConfiguration("plugin") + plugin.afterTrack { pluginCalled = true } + + val tracker = createTracker(listOf(plugin)) + tracker.plugins.removePlugin("plugin") + + tracker.track(ScreenView("sv")) + + Thread.sleep(100) + Assert.assertFalse(pluginCalled) + } + + // --- PRIVATE + private val context: Context + get() = InstrumentationRegistry.getInstrumentation().targetContext + + private fun createTracker(configurations: List): TrackerController { + val networkConfig = NetworkConfiguration(MockNetworkConnection(HttpMethod.POST, 200)) + return Snowplow.createTracker( + context, + namespace = "ns" + Math.random().toString(), + network = networkConfig, + configurations = configurations.toTypedArray() + ) + } +} diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt index ba9d5eaa6..1f4a0ddfa 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt @@ -193,16 +193,17 @@ class EventSendingTest { } // Helpers - private fun getTracker(namespace: String?, uri: String?, method: HttpMethod?): Tracker { - createSessionSharedPreferences(InstrumentationRegistry.getInstrumentation().targetContext, namespace!!) + private fun getTracker(namespace: String, uri: String, method: HttpMethod): Tracker { + val ns = namespace + Math.random().toString() // add random number to ensure different namespace on each run + createSessionSharedPreferences(InstrumentationRegistry.getInstrumentation().targetContext, ns) val builder = { emitter: Emitter -> emitter.bufferOption = BufferOption.Single - emitter.httpMethod = method!! + emitter.httpMethod = method emitter.requestSecurity = Protocol.HTTP emitter.emitterTick = 0 emitter.emptyLimit = 0 } - val emitter = Emitter(InstrumentationRegistry.getInstrumentation().targetContext, uri!!, builder) + val emitter = Emitter(InstrumentationRegistry.getInstrumentation().targetContext, uri, builder) val subject = Subject(InstrumentationRegistry.getInstrumentation().targetContext, null) if (tracker != null) tracker!!.close() @@ -217,7 +218,7 @@ class EventSendingTest { } tracker = Tracker( emitter, - namespace, + ns, "myAppId", InstrumentationRegistry.getInstrumentation().targetContext, trackerBuilder @@ -227,10 +228,8 @@ class EventSendingTest { } @SuppressLint("DefaultLocale") - fun getMockServerURI(mockServer: MockWebServer?): String? { - return if (mockServer != null) { - String.format("%s:%d", mockServer.hostName, mockServer.port) - } else null + fun getMockServerURI(mockServer: MockWebServer): String { + return String.format("%s:%d", mockServer.hostName, mockServer.port) } @Throws(Exception::class) @@ -304,7 +303,7 @@ class EventSendingTest { val query = JSONObject(getQueryMap(request.path!!.substring(3))) Assert.assertEquals("mob", query["p"]) Assert.assertEquals("myAppId", query["aid"]) - Assert.assertEquals("myNamespace", query["tna"]) + Assert.assertTrue(query.getString("tna").startsWith("myNamespace")) Assert.assertEquals(BuildConfig.TRACKER_LABEL, query["tv"]) Assert.assertEquals("English", query["lang"]) Assert.assertTrue(query.has("dtm")) @@ -339,7 +338,7 @@ class EventSendingTest { val json = data.getJSONObject(i) Assert.assertEquals("mob", json.getString("p")) Assert.assertEquals("myAppId", json.getString("aid")) - Assert.assertEquals("myNamespacePost", json.getString("tna")) + Assert.assertTrue(json.getString("tna").startsWith("myNamespacePost")) Assert.assertEquals(BuildConfig.TRACKER_LABEL, json.getString("tv")) Assert.assertEquals("English", json.getString("lang")) Assert.assertTrue(json.has("dtm")) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprControllerImpl.kt index 75f7cde17..ead7a27cd 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprControllerImpl.kt @@ -13,7 +13,7 @@ class GdprControllerImpl(serviceProvider: ServiceProviderInterface) : Controller private var gdpr: Gdpr? = null override val basisForProcessing: Basis? - get() = if (gdpr == null) { null } else gdpr!!.basisForProcessing + get() = gdpr?.basisForProcessing override val documentId: String? get() = if (gdpr == null) { null } else gdpr!!.documentId diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextPluginConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextPluginConfiguration.kt new file mode 100644 index 000000000..87a990739 --- /dev/null +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextPluginConfiguration.kt @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.core.globalcontexts + +import com.snowplowanalytics.snowplow.configuration.PluginAfterTrackConfiguration +import com.snowplowanalytics.snowplow.configuration.PluginConfigurationInterface +import com.snowplowanalytics.snowplow.configuration.PluginEntitiesConfiguration +import com.snowplowanalytics.snowplow.globalcontexts.GlobalContext + +class GlobalContextPluginConfiguration( + override val identifier: String, + val globalContext: GlobalContext +) : PluginConfigurationInterface { + + override val afterTrackConfiguration: PluginAfterTrackConfiguration? = null + + override val entitiesConfiguration: PluginEntitiesConfiguration + get() = PluginEntitiesConfiguration(closure = globalContext::generateContexts) +} diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsControllerImpl.kt index bb8d962bd..d9201640f 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsControllerImpl.kt @@ -10,17 +10,33 @@ import com.snowplowanalytics.snowplow.globalcontexts.GlobalContext @RestrictTo(RestrictTo.Scope.LIBRARY) class GlobalContextsControllerImpl(serviceProvider: ServiceProviderInterface) : Controller(serviceProvider), GlobalContextsController { - private val tracker: Tracker - get() = serviceProvider.getOrMakeTracker() override val tags: Set - get() = tracker.globalContextTags + get() { + return serviceProvider.pluginConfigurations.filter { + it is GlobalContextPluginConfiguration + } + .map { it.identifier } + .toSet() + } override fun add(tag: String, contextGenerator: GlobalContext): Boolean { - return tracker.addGlobalContext(contextGenerator, tag) + if (tags.contains(tag)) { + return false + } + val plugin = GlobalContextPluginConfiguration( + identifier = tag, + globalContext = contextGenerator + ) + serviceProvider.pluginsController.addPlugin(plugin) + return true } override fun remove(tag: String): GlobalContext? { - return tracker.removeGlobalContext(tag) + val configuration = serviceProvider.pluginConfigurations.firstOrNull { + it.identifier == tag && it is GlobalContextPluginConfiguration + } as GlobalContextPluginConfiguration? + serviceProvider.pluginsController.removePlugin(tag) + return configuration?.globalContext } } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt index 6638a7d9e..2564efe93 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt @@ -18,7 +18,7 @@ import com.snowplowanalytics.snowplow.event.DeepLinkReceived import com.snowplowanalytics.snowplow.event.Event import com.snowplowanalytics.snowplow.payload.SelfDescribingJson import com.snowplowanalytics.snowplow.tracker.InspectableEvent -import java.util.* +import kotlin.collections.ArrayList class DeepLinkStateMachine : StateMachineInterface { /* @@ -33,6 +33,9 @@ class DeepLinkStateMachine : StateMachineInterface { - ReadyForOutput */ + override val identifier: String + get() = ID + override val subscribedEventSchemasForTransitions: List get() = listOf(DeepLinkReceived.schema, TrackerConstants.SCHEMA_SCREEN_VIEW) @@ -42,6 +45,9 @@ class DeepLinkStateMachine : StateMachineInterface { override val subscribedEventSchemasForPayloadUpdating: List get() = ArrayList() + override val subscribedEventSchemasForAfterTrackCallback: List + get() = emptyList() + override fun transition(event: Event, state: State?): State? { // - Init (DL) DeepLinkReceived // - ReadyForOutput (DL) DeepLinkReceived @@ -78,4 +84,12 @@ class DeepLinkStateMachine : StateMachineInterface { override fun payloadValues(event: InspectableEvent, state: State?): Map? { return null } + + override fun afterTrack(event: InspectableEvent) { + } + + companion object { + val ID: String + get() = "DeepLinkContext" + } } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt index 1f3eb892a..5f38020a4 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt @@ -17,6 +17,9 @@ class LifecycleStateMachine : StateMachineInterface { Entity Generation: - Visible, NotVisible */ + + override val identifier: String + get() = ID override val subscribedEventSchemasForTransitions: List get() = listOf(Background.schema, Foreground.schema) @@ -27,6 +30,9 @@ class LifecycleStateMachine : StateMachineInterface { override val subscribedEventSchemasForPayloadUpdating: List get() = emptyList() + override val subscribedEventSchemasForAfterTrackCallback: List + get() = emptyList() + override fun transition(event: Event, currentState: State?): State? { if (event is Foreground) { return LifecycleState(true, event.foregroundIndex) @@ -47,4 +53,12 @@ class LifecycleStateMachine : StateMachineInterface { override fun payloadValues(event: InspectableEvent, state: State?): Map? { return null } + + override fun afterTrack(event: InspectableEvent) { + } + + companion object { + val ID: String + get() = "Lifecycle" + } } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt new file mode 100644 index 000000000..28141e66a --- /dev/null +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.core.statemachine + +import com.snowplowanalytics.snowplow.configuration.PluginAfterTrackConfiguration +import com.snowplowanalytics.snowplow.configuration.PluginEntitiesConfiguration +import com.snowplowanalytics.snowplow.event.Event +import com.snowplowanalytics.snowplow.payload.SelfDescribingJson +import com.snowplowanalytics.snowplow.tracker.InspectableEvent +import java.util.* + +class PluginStateMachine( + override val identifier: String, + val entitiesConfiguration: PluginEntitiesConfiguration?, + val afterTrackConfiguration: PluginAfterTrackConfiguration? +) : StateMachineInterface { + + override val subscribedEventSchemasForTransitions: List + get() = emptyList() + + override val subscribedEventSchemasForEntitiesGeneration: List + get() { + val config = entitiesConfiguration ?: return emptyList() + return config.schemas ?: Collections.singletonList("*") + } + + override val subscribedEventSchemasForPayloadUpdating: List + get() = emptyList() + + override val subscribedEventSchemasForAfterTrackCallback: List + get() { + val config = afterTrackConfiguration ?: return emptyList() + return config.schemas ?: Collections.singletonList("*") + } + + override fun transition(event: Event, state: State?): State? { + return null + } + + override fun entities(event: InspectableEvent, state: State?): List { + return entitiesConfiguration?.closure?.apply(event) ?: emptyList() + } + + override fun payloadValues(event: InspectableEvent, state: State?): Map? { + return null + } + + override fun afterTrack(event: InspectableEvent) { + afterTrackConfiguration?.closure?.accept(event) + } +} diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt index 702de5a5c..b6a2f23b8 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt @@ -5,10 +5,13 @@ import com.snowplowanalytics.snowplow.payload.SelfDescribingJson import com.snowplowanalytics.snowplow.tracker.InspectableEvent interface StateMachineInterface { + val identifier: String val subscribedEventSchemasForTransitions: List val subscribedEventSchemasForEntitiesGeneration: List val subscribedEventSchemasForPayloadUpdating: List + val subscribedEventSchemasForAfterTrackCallback: List fun transition(event: Event, state: State?): State? fun entities(event: InspectableEvent, state: State?): List? fun payloadValues(event: InspectableEvent, state: State?): Map? + fun afterTrack(event: InspectableEvent) } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt index 622e3b340..cd36d7c6e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt @@ -1,5 +1,7 @@ package com.snowplowanalytics.core.statemachine +import com.snowplowanalytics.core.emitter.Executor.execute +import com.snowplowanalytics.core.tracker.Tracker import com.snowplowanalytics.snowplow.event.AbstractSelfDescribing import com.snowplowanalytics.snowplow.event.Event import com.snowplowanalytics.snowplow.payload.SelfDescribingJson @@ -13,21 +15,22 @@ class StateManager { private val eventSchemaToEntitiesGenerator = HashMap>() private val eventSchemaToPayloadUpdater = HashMap>() - + private val eventSchemaToAfterTrackCallback = HashMap>() + val trackerState = TrackerState() @Synchronized - fun addOrReplaceStateMachine(stateMachine: StateMachineInterface, identifier: String) { - val previousStateMachine = identifierToStateMachine[identifier] + fun addOrReplaceStateMachine(stateMachine: StateMachineInterface) { + val previousStateMachine = identifierToStateMachine[stateMachine.identifier] if (previousStateMachine != null) { if (stateMachine.javaClass == previousStateMachine.javaClass) { return } - removeStateMachine(identifier) + removeStateMachine(stateMachine.identifier) } - identifierToStateMachine[identifier] = stateMachine - stateMachineToIdentifier[stateMachine] = identifier + identifierToStateMachine[stateMachine.identifier] = stateMachine + stateMachineToIdentifier[stateMachine] = stateMachine.identifier addToSchemaRegistry( eventSchemaToStateMachine, stateMachine.subscribedEventSchemasForTransitions, @@ -43,6 +46,11 @@ class StateManager { stateMachine.subscribedEventSchemasForPayloadUpdating, stateMachine ) + addToSchemaRegistry( + eventSchemaToAfterTrackCallback, + stateMachine.subscribedEventSchemasForAfterTrackCallback, + stateMachine + ) } @Synchronized @@ -66,6 +74,11 @@ class StateManager { stateMachine.subscribedEventSchemasForPayloadUpdating, stateMachine ) + removeFromSchemaRegistry( + eventSchemaToAfterTrackCallback, + stateMachine.subscribedEventSchemasForAfterTrackCallback, + stateMachine + ) return true } @@ -73,15 +86,9 @@ class StateManager { fun trackerStateForProcessedEvent(event: Event): TrackerStateSnapshot { if (event is AbstractSelfDescribing) { val stateMachines: MutableList = LinkedList() - val stateMachinesForSchema: List? = - eventSchemaToStateMachine[event.schema] - if (stateMachinesForSchema != null) { - stateMachines.addAll(stateMachinesForSchema) - } - val stateMachinesGeneral: List? = eventSchemaToStateMachine["*"] - if (stateMachinesGeneral != null) { - stateMachines.addAll(stateMachinesGeneral) - } + eventSchemaToStateMachine[event.schema]?.let { stateMachines.addAll(it) } + eventSchemaToStateMachine["*"]?.let { stateMachines.addAll(it) } + for (stateMachine in stateMachines) { val stateIdentifier = stateMachineToIdentifier[stateMachine] val previousStateFuture = stateIdentifier?.let { trackerState.getStateFuture(it) } @@ -107,17 +114,13 @@ class StateManager { @Synchronized fun entitiesForProcessedEvent(event: StateMachineEvent): List { + val schema = event.schema ?: event.name + val result: MutableList = LinkedList() val stateMachines: MutableList = LinkedList() - val stateMachinesForSchema: List? = - eventSchemaToEntitiesGenerator[event.schema] - if (stateMachinesForSchema != null) { - stateMachines.addAll(stateMachinesForSchema) - } - val stateMachinesGeneral: List? = eventSchemaToEntitiesGenerator["*"] - if (stateMachinesGeneral != null) { - stateMachines.addAll(stateMachinesGeneral) - } + eventSchemaToEntitiesGenerator[schema]?.let { stateMachines.addAll(it) } + eventSchemaToEntitiesGenerator["*"]?.let { stateMachines.addAll(it) } + for (stateMachine in stateMachines) { val stateIdentifier = stateMachineToIdentifier[stateMachine] if (stateIdentifier != null) { @@ -135,15 +138,9 @@ class StateManager { fun addPayloadValuesToEvent(event: StateMachineEvent): Boolean { var failures = 0 val stateMachines: MutableList = LinkedList() - val stateMachinesForSchema: List? = - eventSchemaToPayloadUpdater[event.schema] - if (stateMachinesForSchema != null) { - stateMachines.addAll(stateMachinesForSchema) - } - val stateMachinesGeneral: List? = eventSchemaToPayloadUpdater["*"] - if (stateMachinesGeneral != null) { - stateMachines.addAll(stateMachinesGeneral) - } + eventSchemaToPayloadUpdater[event.schema]?.let { stateMachines.addAll(it) } + eventSchemaToPayloadUpdater["*"]?.let { stateMachines.addAll(it) } + for (stateMachine in stateMachines) { val stateIdentifier = stateMachineToIdentifier[stateMachine] if (stateIdentifier != null) { @@ -157,6 +154,23 @@ class StateManager { return failures == 0 } + @Synchronized + fun afterTrack(event: StateMachineEvent) { + val schema = event.schema ?: event.name + + val stateMachines: MutableList = LinkedList() + eventSchemaToAfterTrackCallback[schema]?.let { stateMachines.addAll(it) } + eventSchemaToAfterTrackCallback["*"]?.let { stateMachines.addAll(it) } + + if (stateMachines.isNotEmpty()) { + execute(TAG) { + for (stateMachine in stateMachines) { + stateMachine.afterTrack(event) + } + } + } + } + // Private methods private fun addToSchemaRegistry( schemaRegistry: MutableMap>, @@ -183,4 +197,9 @@ class StateManager { list?.remove(stateMachine) } } + + + companion object { + private val TAG = StateManager::class.java.simpleName + } } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PluginsControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PluginsControllerImpl.kt new file mode 100644 index 000000000..8ae80d8c0 --- /dev/null +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PluginsControllerImpl.kt @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.core.tracker + +import com.snowplowanalytics.core.Controller +import com.snowplowanalytics.snowplow.configuration.PluginConfigurationInterface +import com.snowplowanalytics.snowplow.controller.PluginsController + +class PluginsControllerImpl + (serviceProvider: ServiceProvider) : Controller(serviceProvider), PluginsController { + + override val identifiers: List + get() { + return serviceProvider.pluginConfigurations.map { it.identifier } + } + + override fun addPlugin(plugin: PluginConfigurationInterface) { + serviceProvider.addPlugin(plugin) + } + + override fun removePlugin(identifier: String) { + serviceProvider.removePlugin(identifier) + } +} diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt index 415910bc9..662ef847a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt @@ -19,6 +19,9 @@ class ScreenStateMachine : StateMachineInterface { Entity Generation: - Screen */ + + override val identifier: String + get() = ID override val subscribedEventSchemasForTransitions: List get() = listOf(TrackerConstants.SCHEMA_SCREEN_VIEW) @@ -29,6 +32,9 @@ class ScreenStateMachine : StateMachineInterface { override val subscribedEventSchemasForPayloadUpdating: List get() = listOf(TrackerConstants.SCHEMA_SCREEN_VIEW) + override val subscribedEventSchemasForAfterTrackCallback: List + get() = emptyList() + override fun transition(event: Event, state: State?): State? { val screenView = event as? ScreenView val screenState: ScreenState? = if (state != null) { @@ -79,4 +85,12 @@ class ScreenStateMachine : StateMachineInterface { } return null } + + override fun afterTrack(event: InspectableEvent) { + } + + companion object { + val ID: String + get() = "ScreenContext" + } } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt index 47b6bd4e0..eedc6a14c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt @@ -36,15 +36,13 @@ class ServiceProvider( private var subjectController: SubjectControllerImpl? = null private var sessionController: SessionControllerImpl? = null private var gdprController: GdprControllerImpl? = null - private var globalContextsController: GlobalContextsControllerImpl? = null + override val pluginsController: PluginsControllerImpl by lazy { + PluginsControllerImpl(this) + } // Original configurations - private val trackerConfiguration: TrackerConfiguration - private val emitterConfiguration: EmitterConfiguration? = null - private val subjectConfiguration: SubjectConfiguration? = null - private val sessionConfiguration: SessionConfiguration? = null - private val gdprConfiguration: GdprConfiguration? = null - private var globalContextsConfiguration: GlobalContextsConfiguration? = null + override var pluginConfigurations: MutableList = ArrayList() + private set // Configuration updates override lateinit var trackerConfigurationUpdate: TrackerConfigurationUpdate @@ -69,7 +67,6 @@ class ServiceProvider( // Process configurations networkConfigurationUpdate.sourceConfig = networkConfiguration - trackerConfiguration = TrackerConfiguration(appId) processConfigurations(configurations) if (trackerConfigurationUpdate.sourceConfig == null) { @@ -99,31 +96,29 @@ class ServiceProvider( for (configuration in configurations) { if (configuration is NetworkConfiguration) { networkConfigurationUpdate.sourceConfig = configuration - continue } - if (configuration is TrackerConfiguration) { + else if (configuration is TrackerConfiguration) { trackerConfigurationUpdate.sourceConfig = configuration - continue } - if (configuration is SubjectConfiguration) { + else if (configuration is SubjectConfiguration) { subjectConfigurationUpdate.sourceConfig = configuration - continue } - if (configuration is SessionConfiguration) { + else if (configuration is SessionConfiguration) { sessionConfigurationUpdate.sourceConfig = configuration - continue } - if (configuration is EmitterConfiguration) { + else if (configuration is EmitterConfiguration) { emitterConfigurationUpdate.sourceConfig = configuration - continue } - if (configuration is GdprConfiguration) { + else if (configuration is GdprConfiguration) { gdprConfigurationUpdate.sourceConfig = configuration - continue } - if (configuration is GlobalContextsConfiguration) { - globalContextsConfiguration = configuration - continue + else if (configuration is GlobalContextsConfiguration) { + for (plugin in configuration.toPluginConfigurations()) { + pluginConfigurations.add(plugin) + } + } + else if (configuration is PluginConfigurationInterface) { + pluginConfigurations.add(configuration) } } } @@ -144,7 +139,6 @@ class ServiceProvider( sessionController = null emitterController = null gdprController = null - globalContextsController = null subjectController = null networkController = null } @@ -198,7 +192,7 @@ class ServiceProvider( } override fun getOrMakeGlobalContextsController(): GlobalContextsControllerImpl { - return globalContextsController ?: makeGlobalContextsController().also { globalContextsController = it } + return GlobalContextsControllerImpl(this) } override fun getOrMakeSubjectController(): SubjectControllerImpl { @@ -282,11 +276,14 @@ class ServiceProvider( tracker.backgroundTimeout = sessionConfig.backgroundTimeout.convert(TimeUnit.SECONDS) tracker.foregroundTimeout = sessionConfig.foregroundTimeout.convert(TimeUnit.SECONDS) + + for (plugin in pluginConfigurations) { + tracker.addOrReplaceStateMachine(plugin.toStateMachine()) + } } val tracker = Tracker(emitter, namespace, trackerConfig.appId, context, builder) - globalContextsConfiguration?.let { tracker.setGlobalContextGenerators(it.contextGenerators) } if (trackerConfigurationUpdate.isPaused) { tracker.pauseEventTracking() } @@ -329,10 +326,6 @@ class ServiceProvider( return controller } - private fun makeGlobalContextsController(): GlobalContextsControllerImpl { - return GlobalContextsControllerImpl(this) - } - private fun makeSubjectController(): SubjectControllerImpl { return SubjectControllerImpl(this) } @@ -340,4 +333,19 @@ class ServiceProvider( private fun makeNetworkController(): NetworkControllerImpl { return NetworkControllerImpl(this) } + + // Plugins + + override fun addPlugin(plugin: PluginConfigurationInterface) { + removePlugin(plugin.identifier) + pluginConfigurations.add(plugin) + tracker?.addOrReplaceStateMachine(plugin.toStateMachine()) + } + + override fun removePlugin(identifier: String) { + pluginConfigurations.removeAll { + it.identifier == identifier + } + tracker?.removeStateMachine(identifier) + } } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProviderInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProviderInterface.kt index a02b49a66..cfcb2affc 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProviderInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProviderInterface.kt @@ -6,6 +6,7 @@ import com.snowplowanalytics.core.gdpr.GdprControllerImpl import com.snowplowanalytics.core.globalcontexts.GlobalContextsControllerImpl import com.snowplowanalytics.core.session.SessionConfigurationUpdate import com.snowplowanalytics.core.session.SessionControllerImpl +import com.snowplowanalytics.snowplow.configuration.PluginConfigurationInterface interface ServiceProviderInterface { val namespace: String @@ -24,6 +25,7 @@ interface ServiceProviderInterface { fun getOrMakeGlobalContextsController(): GlobalContextsControllerImpl fun getOrMakeSubjectController(): SubjectControllerImpl fun getOrMakeSessionController(): SessionControllerImpl + val pluginsController: PluginsControllerImpl // Configuration Updates val trackerConfigurationUpdate: TrackerConfigurationUpdate @@ -32,4 +34,9 @@ interface ServiceProviderInterface { val emitterConfigurationUpdate: EmitterConfigurationUpdate val sessionConfigurationUpdate: SessionConfigurationUpdate val gdprConfigurationUpdate: GdprConfigurationUpdate + + // Plugins + val pluginConfigurations: List + fun addPlugin(plugin: PluginConfigurationInterface) + fun removePlugin(identifier: String) } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt index 707d3a852..20f9d9482 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt @@ -33,9 +33,7 @@ import com.snowplowanalytics.core.utils.Util.getApplicationContext import com.snowplowanalytics.core.utils.Util.getGeoLocationContext import com.snowplowanalytics.snowplow.entity.DeepLink import com.snowplowanalytics.snowplow.event.* -import com.snowplowanalytics.snowplow.globalcontexts.GlobalContext import com.snowplowanalytics.snowplow.payload.Payload -import com.snowplowanalytics.snowplow.payload.SelfDescribingJson import com.snowplowanalytics.snowplow.payload.TrackerPayload import com.snowplowanalytics.snowplow.tracker.* import com.snowplowanalytics.snowplow.util.Basis @@ -269,9 +267,9 @@ class Tracker(emitter: Emitter, val namespace: String, var appId: String, contex set(deepLinkContext) { field = deepLinkContext if (deepLinkContext) { - stateManager.addOrReplaceStateMachine(DeepLinkStateMachine(), "DeepLinkContext") + addOrReplaceStateMachine(DeepLinkStateMachine()) } else { - stateManager.removeStateMachine("DeepLinkContext") + removeStateMachine(DeepLinkStateMachine.ID) } } @@ -280,9 +278,9 @@ class Tracker(emitter: Emitter, val namespace: String, var appId: String, contex set(screenContext) { field = screenContext if (screenContext) { - stateManager.addOrReplaceStateMachine(ScreenStateMachine(), "ScreenContext") + addOrReplaceStateMachine(ScreenStateMachine()) } else { - stateManager.removeStateMachine("ScreenContext") + removeStateMachine(ScreenStateMachine.ID) } } @@ -296,9 +294,6 @@ class Tracker(emitter: Emitter, val namespace: String, var appId: String, contex } } - private val globalContextGenerators = - Collections.synchronizedMap(HashMap()) - private val receiveLifecycleNotification: FunctionalObserver = object : FunctionalObserver() { override fun apply(data: Map) { val session = session @@ -442,7 +437,7 @@ class Tracker(emitter: Emitter, val namespace: String, var appId: String, contex if (lifecycleAutotracking) { initialize(context) // Initialize LifecycleStateMachine for lifecycle entities - stateManager.addOrReplaceStateMachine(LifecycleStateMachine(), "Lifecycle") + addOrReplaceStateMachine(LifecycleStateMachine()) } } @@ -481,74 +476,69 @@ class Tracker(emitter: Emitter, val namespace: String, var appId: String, contex } val reportsOnDiagnostic = event !is TrackerError execute(reportsOnDiagnostic, TAG) { - transformEvent(trackerEvent) val payload = payloadWithEvent(trackerEvent) v(TAG, "Adding new payload to event storage: %s", payload) emitter.add(payload) event.endProcessing(this) + stateManager.afterTrack(trackerEvent) } return trackerEvent.eventId } - private fun transformEvent(event: TrackerEvent) { - // Application_install event needs the timestamp to the real installation event. - if (event.schema != null && event.schema == TrackerConstants.SCHEMA_APPLICATION_INSTALL) { - event.trueTimestamp?.let { event.timestamp = it } - event.trueTimestamp = null - } - // Payload can be optionally updated with values based on internal state - stateManager.addPayloadValuesToEvent(event) - } - private fun payloadWithEvent(event: TrackerEvent): Payload { val payload = TrackerPayload() + + // Payload properties + setApplicationInstallEventTimestamp(event) addBasicPropertiesToPayload(payload, event) - if (event.isPrimitive) { - addPrimitivePropertiesToPayload(payload, event) - } else { - addSelfDescribingPropertiesToPayload(payload, event) - } - val entities = event.entities - addBasicContextsToContexts(entities, event) - addGlobalContextsToContexts(entities, event) - addStateMachineEntitiesToContexts(entities, event) - wrapContextsToPayload(payload, entities) + addStateMachinePayloadValues(event) + event.wrapPropertiesToPayload(payload, base64Encoded=base64Encoded) + + // Context entities + addBasicContexts(event) + addStateMachineEntities(event) + event.wrapEntitiesToPayload(payload, base64Encoded=base64Encoded) + + // Workaround for campaign attribution if (!event.isPrimitive) { // TODO: To remove when Atomic table refactoring is finished - workaroundForCampaignAttributionEnrichment(payload, event, entities) + workaroundForCampaignAttributionEnrichment(payload, event) } return payload } + private fun setApplicationInstallEventTimestamp(event: TrackerEvent) { + // Application_install event needs the timestamp to the real installation event. + if (event.schema != null && event.schema == TrackerConstants.SCHEMA_APPLICATION_INSTALL) { + event.trueTimestamp?.let { event.timestamp = it } + event.trueTimestamp = null + } + } + + private fun addStateMachinePayloadValues(event: TrackerEvent) { + // Payload can be optionally updated with values based on internal state + stateManager.addPayloadValuesToEvent(event) + } + private fun addBasicPropertiesToPayload(payload: Payload, event: TrackerEvent) { + // Event ID payload.add(Parameters.EID, event.eventId.toString()) + // Timestamps payload.add(Parameters.DEVICE_TIMESTAMP, event.timestamp.toString()) event.trueTimestamp?.let { payload.add(Parameters.TRUE_TIMESTAMP, it.toString()) } + // Tracker info (version, namespace, app ID) payload.add(Parameters.APPID, appId) payload.add(Parameters.NAMESPACE, namespace) payload.add(Parameters.TRACKER_VERSION, trackerVersion) + // Subject subject?.let { payload.addMap(HashMap(it.getSubject(userAnonymisation))) } + // Platform payload.add(Parameters.PLATFORM, platform.value) - } - - private fun addPrimitivePropertiesToPayload(payload: Payload, event: TrackerEvent) { - payload.add(Parameters.EVENT, event.name) - payload.addMap(event.payload) - } - - private fun addSelfDescribingPropertiesToPayload(payload: Payload, event: TrackerEvent) { - payload.add(Parameters.EVENT, TrackerConstants.EVENT_UNSTRUCTURED) - event.schema?.let { - val data = SelfDescribingJson(it, event.payload) - val unstructuredEventPayload = HashMap() - unstructuredEventPayload[Parameters.SCHEMA] = TrackerConstants.SCHEMA_UNSTRUCT_EVENT - unstructuredEventPayload[Parameters.DATA] = data.map - payload.addMap( - unstructuredEventPayload, - base64Encoded, - Parameters.UNSTRUCTURED_ENCODED, - Parameters.UNSTRUCTURED - ) + // Event name + if (event.isPrimitive) { + payload.add(Parameters.EVENT, event.name) + } else { + payload.add(Parameters.EVENT, TrackerConstants.EVENT_UNSTRUCTURED) } } @@ -561,18 +551,14 @@ class Tracker(emitter: Emitter, val namespace: String, var appId: String, contex This is a hack that should be removed once the atomic event table is dismissed and all the events will be SelfDescribing. */ - private fun workaroundForCampaignAttributionEnrichment( - payload: Payload, - event: TrackerEvent, - contexts: List - ) { + private fun workaroundForCampaignAttributionEnrichment(payload: Payload, event: TrackerEvent) { var url: String? = null var referrer: String? = null if (event.schema == DeepLinkReceived.schema) { url = event.payload[DeepLinkReceived.PARAM_URL] as? String? referrer = event.payload[DeepLinkReceived.PARAM_REFERRER] as? String? } else if (event.schema == TrackerConstants.SCHEMA_SCREEN_VIEW) { - for (entity in contexts) { + for (entity in event.entities) { if (entity is DeepLink) { url = entity.url referrer = entity.referrer @@ -618,60 +604,27 @@ class Tracker(emitter: Emitter, val namespace: String, var appId: String, contex } } - private fun addBasicContextsToContexts( - contexts: MutableList, - event: TrackerEvent - ) { + private fun addBasicContexts(event: TrackerEvent) { if (applicationContext) { - getApplicationContext(context)?.let { contexts.add(it) } + getApplicationContext(context)?.let { event.addContextEntity(it) } } if (platformContextEnabled) { - platformContextManager.getMobileContext(userAnonymisation)?.let { contexts.add(it) } + platformContextManager.getMobileContext(userAnonymisation)?.let { event.addContextEntity(it) } } if (event.isService) { return } if (geoLocationContext) { - getGeoLocationContext(context)?.let { contexts.add(it) } - } - gdprContext?.let { contexts.add(it.context) } - } - - private fun addGlobalContextsToContexts( - contexts: MutableList, - event: StateMachineEvent - ) { - synchronized(globalContextGenerators) { - for (generator in globalContextGenerators.values) { - contexts.addAll(generator.generateContexts(event)) - } + getGeoLocationContext(context)?.let { event.addContextEntity(it) } } + gdprContext?.let { event.addContextEntity(it.context) } } - private fun addStateMachineEntitiesToContexts( - contexts: MutableList, - event: StateMachineEvent - ) { + private fun addStateMachineEntities(event: TrackerEvent) { val stateManagerEntities = stateManager.entitiesForProcessedEvent(event) - contexts.addAll(stateManagerEntities) - } - - private fun wrapContextsToPayload(payload: Payload, contexts: List) { - if (contexts.isEmpty()) { - return - } - - val data: MutableList> = LinkedList() - for (context in contexts) { - data.add(context.map) + for (entity in stateManagerEntities) { + event.addContextEntity(entity) } - val finalContext = SelfDescribingJson(TrackerConstants.SCHEMA_CONTEXTS, data) - payload.addMap( - finalContext.map, - base64Encoded, - Parameters.CONTEXT_ENCODED, - Parameters.CONTEXT - ) } // --- Controls @@ -753,32 +706,16 @@ class Tracker(emitter: Emitter, val namespace: String, var appId: String, contex gdprContext = null } - // --- Global contexts - - fun setGlobalContextGenerators(globalContexts: Map) { - synchronized(globalContextGenerators) { - globalContextGenerators.clear() - globalContextGenerators.putAll(globalContexts) - } - } + // --- State machines - fun addGlobalContext(generator: GlobalContext, tag: String): Boolean { - synchronized(globalContextGenerators) { - if (globalContextGenerators.containsKey(tag)) { - return false - } - globalContextGenerators[tag] = generator - return true - } + fun addOrReplaceStateMachine(stateMachine: StateMachineInterface) { + stateManager.addOrReplaceStateMachine(stateMachine) } - fun removeGlobalContext(tag: String): GlobalContext? { - synchronized(globalContextGenerators) { return globalContextGenerators.remove(tag) } + fun removeStateMachine(identifier: String) { + stateManager.removeStateMachine(identifier) } - val globalContextTags: Set - get() = globalContextGenerators.keys - companion object { private val TAG = Tracker::class.java.simpleName } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt index a9ccb2f2a..4aee555e7 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt @@ -32,6 +32,8 @@ class TrackerControllerImpl // Constructors val sessionController = sessionController return if (sessionController.isEnabled) sessionController else null } + override val plugins: PluginsController + get() = serviceProvider.pluginsController // Control methods override fun pause() { diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt index a3b36c85c..675c049a6 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt @@ -12,6 +12,8 @@ */ package com.snowplowanalytics.core.tracker +import com.snowplowanalytics.core.constants.Parameters +import com.snowplowanalytics.core.constants.TrackerConstants import com.snowplowanalytics.core.statemachine.StateMachineEvent import com.snowplowanalytics.core.statemachine.TrackerState import com.snowplowanalytics.core.statemachine.TrackerStateSnapshot @@ -19,6 +21,7 @@ import com.snowplowanalytics.snowplow.event.AbstractPrimitive import com.snowplowanalytics.snowplow.event.AbstractSelfDescribing import com.snowplowanalytics.snowplow.event.Event import com.snowplowanalytics.snowplow.event.TrackerError +import com.snowplowanalytics.snowplow.payload.Payload import com.snowplowanalytics.snowplow.payload.SelfDescribingJson import java.util.* @@ -69,4 +72,48 @@ class TrackerEvent @JvmOverloads constructor(event: Event, state: TrackerStateSn } return result } + + fun addContextEntity(entity: SelfDescribingJson) { + entities.add(entity) + } + + fun wrapEntitiesToPayload(payload: Payload, base64Encoded: Boolean) { + if (entities.isEmpty()) { + return + } + + val data: MutableList> = LinkedList() + for (entity in entities) { + data.add(entity.map) + } + val finalContext = SelfDescribingJson(TrackerConstants.SCHEMA_CONTEXTS, data) + payload.addMap( + finalContext.map, + base64Encoded, + Parameters.CONTEXT_ENCODED, + Parameters.CONTEXT + ) + } + + fun wrapPropertiesToPayload(toPayload: Payload, base64Encoded: Boolean) { + if (isPrimitive) { + toPayload.addMap(payload) + } else { + wrapSelfDescribingToPayload(toPayload, base64Encoded) + } + } + + private fun wrapSelfDescribingToPayload(toPayload: Payload, base64Encoded: Boolean) { + val schema = schema ?: return + val data = SelfDescribingJson(schema, payload) + val unstructuredEventPayload = HashMap() + unstructuredEventPayload[Parameters.SCHEMA] = TrackerConstants.SCHEMA_UNSTRUCT_EVENT + unstructuredEventPayload[Parameters.DATA] = data.map + toPayload.addMap( + unstructuredEventPayload, + base64Encoded, + Parameters.UNSTRUCTURED_ENCODED, + Parameters.UNSTRUCTURED + ) + } } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GlobalContextsConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GlobalContextsConfiguration.kt index 09f67825a..b5c1c8b9f 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GlobalContextsConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GlobalContextsConfiguration.kt @@ -1,5 +1,6 @@ package com.snowplowanalytics.snowplow.configuration +import com.snowplowanalytics.core.globalcontexts.GlobalContextPluginConfiguration import com.snowplowanalytics.core.globalcontexts.GlobalContextsConfigurationInterface import com.snowplowanalytics.snowplow.globalcontexts.GlobalContext @@ -57,4 +58,13 @@ class GlobalContextsConfiguration(contextGenerators: MutableMap { + return contextGenerators.map { + GlobalContextPluginConfiguration( + identifier = it.key, + globalContext = it.value + ) + } + } } diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PluginConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PluginConfiguration.kt new file mode 100644 index 000000000..a59ec4520 --- /dev/null +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PluginConfiguration.kt @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.snowplow.configuration + +import com.snowplowanalytics.core.statemachine.PluginStateMachine +import com.snowplowanalytics.snowplow.payload.SelfDescribingJson +import com.snowplowanalytics.snowplow.tracker.InspectableEvent +import java.util.function.Consumer +import java.util.function.Function + +/** + * Provides a block closure to be called after events are tracked. + * Optionally, you can specify the event schemas for which the block should be called. + * + * @property schemas Optional list of event schemas to call the block for. If null, the block is called for all events. + * @property closure Block to call after events are tracked. + */ +class PluginAfterTrackConfiguration( + val schemas: List? = null, + val closure: Consumer +) + +/** + * Provides a block closure that returns a list of context entities and is called when events are tracked. + * Optionally, you can specify the event schemas for which the block should be called. + * + * @property schemas Optional list of event schemas to call the block for. If null, the block is called for all events. + * @property closure Block that produces entities, called when events are tracked. + */ +class PluginEntitiesConfiguration( + val schemas: List? = null, + val closure: Function> +) + +/** + * Interface for tracker plugin definition. + * Specifies configurations for the closures called when and after events are tracked. + * + * @property identifier Unique identifier of the plugin within the tracker. + * @property entitiesConfiguration Closure configuration that is called when events are tracked to generate context entities to enrich the events. + * @property afterTrackConfiguration Closure configuration that is called after events are tracked. + */ +interface PluginConfigurationInterface { + val identifier: String + val entitiesConfiguration: PluginEntitiesConfiguration? + val afterTrackConfiguration: PluginAfterTrackConfiguration? +} + +internal fun PluginConfigurationInterface.toStateMachine(): PluginStateMachine { + return PluginStateMachine( + identifier = identifier, + entitiesConfiguration = entitiesConfiguration, + afterTrackConfiguration = afterTrackConfiguration + ) +} + +/** + * Configuration for a custom tracker plugin. + * Enables you to add closures to be called when and after events are tracked in the tracker. + */ +class PluginConfiguration( + override val identifier: String +) : Configuration, PluginConfigurationInterface { + override var entitiesConfiguration: PluginEntitiesConfiguration? = null + override var afterTrackConfiguration: PluginAfterTrackConfiguration? = null + + /** + * Add a closure that generates entities for a given tracked event. + * + * @param schemas Optional list of event schemas to call the closure for. If null, the closure is called for all events. + * @param closure Closure that produces entities, called when events are tracked. + */ + fun entities( + schemas: List? = null, + closure: Function> + ) { + entitiesConfiguration = PluginEntitiesConfiguration( + schemas = schemas, + closure = closure + ) + } + + /** + * Add a closure that is called after the events are tracked. + * The closure is called after the events are added to event queue in Emitter, not necessarily after they are sent to the Collector. + * + * @param schemas Optional list of event schemas to call the closure for. If null, the closure is called for all events. + * @param closure Closure block to call after events are tracked. + */ + fun afterTrack( + schemas: List? = null, + closure: Consumer + ) { + afterTrackConfiguration = PluginAfterTrackConfiguration( + schemas = schemas, + closure = closure + ) + } + + override fun copy(): Configuration { + val copy = PluginConfiguration( + identifier=identifier, + ) + entitiesConfiguration?.let { copy.entities(schemas = it.schemas, closure = it.closure) } + afterTrackConfiguration?.let { copy.afterTrack(schemas = it.schemas, closure = it.closure) } + return copy + } +} diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/PluginsController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/PluginsController.kt new file mode 100644 index 000000000..3f8cafaa4 --- /dev/null +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/PluginsController.kt @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ +package com.snowplowanalytics.snowplow.controller + +import com.snowplowanalytics.snowplow.configuration.PluginConfigurationInterface + +/** + * Controller for managing plugins initialized in the tracker + */ +interface PluginsController { + /** + * List of initialized plugin identifiers + */ + val identifiers: List + + /** + * Add a new plugin + */ + fun addPlugin(plugin: PluginConfigurationInterface) + + /** + * Remove plugin with the identifier + */ + fun removePlugin(identifier: String) +} diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt index 19976f0ed..e474bc698 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt @@ -56,6 +56,12 @@ interface TrackerController : TrackerConfigurationInterface { * @apiNote Don't retain the reference. It may change on tracker reconfiguration. */ val globalContexts: GlobalContextsController + + /** + * Controller for managing tracker plugins + * @apiNote Don't retain the reference. It may change on tracker reconfiguration. + */ + val plugins: PluginsController // Methods /** From acc256e0a80be2cffeeb7e3c92bc4f67f58b3081 Mon Sep 17 00:00:00 2001 From: Miranda Wilson Date: Thu, 2 Feb 2023 12:50:34 +0000 Subject: [PATCH 3/4] Update copyrights to 2023 (close #579) PR #579 * Update copyrights to 2023 * Update copyright in LICENSE --- LICENSE | 4 ++-- README.md | 2 +- .../snowplowanalytics/snowplowtrackerdemo/Demo.java | 2 +- .../snowplowtrackerdemo/MainActivity.java | 2 +- .../snowplowtrackerdemo/utils/DemoUtils.java | 2 +- .../snowplowtrackerdemo/utils/TrackerEvents.java | 2 +- .../com/snowplowanalytics/snowplowdemokotlin/Demo.kt | 2 +- .../snowplowdemokotlin/MainActivity.kt | 2 +- .../snowplowdemokotlin/utils/DemoUtils.kt | 2 +- .../snowplowdemokotlin/utils/TrackerEvents.kt | 2 +- .../java/com/snowplowanalytics/snowplow/TestUtils.kt | 12 ++++++++++++ .../snowplow/event/ApplicationInstallTest.kt | 12 ++++++++++++ .../snowplow/event/ConsentGrantedTest.kt | 2 +- .../snowplow/event/ConsentWithdrawnTest.kt | 2 +- .../snowplow/event/DeepLinkReceivedTest.kt | 12 ++++++++++++ .../snowplow/event/EcommerceItemTest.kt | 2 +- .../snowplow/event/EcommerceTest.kt | 2 +- .../snowplow/event/MessageNotificationTest.kt | 12 ++++++++++++ .../snowplowanalytics/snowplow/event/PageViewTest.kt | 2 +- .../snowplow/event/ScreenViewTest.kt | 2 +- .../snowplow/event/SelfDescribingTest.kt | 2 +- .../snowplow/event/StructuredTest.kt | 2 +- .../snowplowanalytics/snowplow/event/TimingTest.kt | 2 +- .../snowplow/globalcontexts/GlobalContextTest.kt | 12 ++++++++++++ .../snowplow/globalcontexts/SchemaRuleSetTest.kt | 12 ++++++++++++ .../internal/emitter/storage/EventStoreTest.kt | 2 +- .../remoteconfiguration/RemoteConfigurationTest.kt | 12 ++++++++++++ .../snowplow/internal/tracker/ConfigurationTest.kt | 12 ++++++++++++ .../internal/tracker/MockDeviceInfoMonitor.kt | 2 +- .../internal/tracker/MultipleInstancesTest.kt | 12 ++++++++++++ .../snowplow/internal/tracker/PlatformContextTest.kt | 2 +- .../snowplow/internal/tracker/StateManagerTest.kt | 12 ++++++++++++ .../snowplow/internal/tracker/TrackerTest.kt | 2 +- .../snowplow/internal/utils/FileStoreTest.kt | 2 +- .../internal/utils/NotificationCenterTest.kt | 12 ++++++++++++ .../snowplow/internal/utils/UtilTest.kt | 12 ++++++++++++ .../snowplow/payload/SelfDescribingJsonTest.kt | 2 +- .../snowplow/payload/TrackerPayloadTest.kt | 2 +- .../snowplow/tracker/CollectorCookieJarTest.kt | 12 ++++++++++++ .../snowplow/tracker/DevicePlatformTest.kt | 2 +- .../snowplow/tracker/EmitterTest.kt | 2 +- .../snowplow/tracker/ExecutorTest.kt | 12 ++++++++++++ .../snowplow/tracker/LoggingTest.kt | 2 +- .../snowplow/tracker/MockEventStore.kt | 12 ++++++++++++ .../snowplow/tracker/MockNetworkConnection.kt | 12 ++++++++++++ .../snowplow/tracker/NetworkConnectionTest.kt | 2 +- .../snowplow/tracker/PluginsTest.kt | 2 +- .../snowplow/tracker/RequestResultTest.kt | 12 ++++++++++++ .../snowplow/tracker/ServiceProviderTest.kt | 2 +- .../snowplow/tracker/SessionTest.kt | 2 +- .../snowplow/tracker/SubjectTest.kt | 2 +- .../snowplow/tracker/TrackerWebViewInterfaceTest.kt | 2 +- .../snowplow/tracker/emitter/TLSArgumentsTest.kt | 2 +- .../snowplow/tracker/integration/EventSendingTest.kt | 2 +- .../snowplow/tracker/noise/NoiseTest.kt | 2 +- .../java/com/snowplowanalytics/core/Controller.kt | 12 ++++++++++++ .../snowplowanalytics/core/constants/Parameters.kt | 2 +- .../core/constants/TrackerConstants.kt | 2 +- .../com/snowplowanalytics/core/emitter/Emitter.kt | 2 +- .../core/emitter/EmitterConfigurationInterface.kt | 12 ++++++++++++ .../core/emitter/EmitterConfigurationUpdate.kt | 12 ++++++++++++ .../core/emitter/EmitterControllerImpl.kt | 12 ++++++++++++ .../core/emitter/EmitterDefaults.kt | 2 +- .../com/snowplowanalytics/core/emitter/Executor.kt | 2 +- .../core/emitter/NetworkConfigurationInterface.kt | 12 ++++++++++++ .../core/emitter/NetworkConfigurationUpdate.kt | 12 ++++++++++++ .../core/emitter/NetworkControllerImpl.kt | 12 ++++++++++++ .../snowplowanalytics/core/emitter/TLSArguments.kt | 2 +- .../core/emitter/TLSSocketFactory.kt | 2 +- .../com/snowplowanalytics/core/emitter/TLSVersion.kt | 2 +- .../core/emitter/storage/EventStoreHelper.kt | 2 +- .../core/emitter/storage/SQLiteEventStore.kt | 2 +- .../java/com/snowplowanalytics/core/gdpr/Gdpr.kt | 12 ++++++++++++ .../core/gdpr/GdprConfigurationInterface.kt | 12 ++++++++++++ .../core/gdpr/GdprConfigurationUpdate.kt | 12 ++++++++++++ .../core/gdpr/GdprControllerImpl.kt | 12 ++++++++++++ .../GlobalContextPluginConfiguration.kt | 2 +- .../GlobalContextsConfigurationInterface.kt | 12 ++++++++++++ .../globalcontexts/GlobalContextsControllerImpl.kt | 12 ++++++++++++ .../core/remoteconfiguration/ConfigurationCache.kt | 12 ++++++++++++ .../core/remoteconfiguration/ConfigurationFetcher.kt | 12 ++++++++++++ .../remoteconfiguration/ConfigurationProvider.kt | 12 ++++++++++++ .../FetchedConfigurationBundle.kt | 12 ++++++++++++ .../com/snowplowanalytics/core/session/FileStore.kt | 2 +- .../core/session/ProcessObserver.kt | 2 +- .../com/snowplowanalytics/core/session/Session.kt | 2 +- .../core/session/SessionConfigurationInterface.kt | 12 ++++++++++++ .../core/session/SessionConfigurationUpdate.kt | 12 ++++++++++++ .../core/session/SessionControllerImpl.kt | 12 ++++++++++++ .../core/statemachine/DeepLinkState.kt | 2 +- .../core/statemachine/DeepLinkStateMachine.kt | 2 +- .../core/statemachine/LifecycleState.kt | 12 ++++++++++++ .../core/statemachine/LifecycleStateMachine.kt | 12 ++++++++++++ .../core/statemachine/PluginStateMachine.kt | 2 +- .../com/snowplowanalytics/core/statemachine/State.kt | 12 ++++++++++++ .../core/statemachine/StateFuture.kt | 12 ++++++++++++ .../core/statemachine/StateMachineEvent.kt | 2 +- .../core/statemachine/StateMachineInterface.kt | 12 ++++++++++++ .../core/statemachine/StateManager.kt | 12 ++++++++++++ .../core/statemachine/TrackerState.kt | 12 ++++++++++++ .../core/statemachine/TrackerStateSnapshot.kt | 12 ++++++++++++ .../core/tracker/ActivityLifecycleHandler.kt | 2 +- .../core/tracker/ExceptionHandler.kt | 2 +- .../snowplowanalytics/core/tracker/InstallTracker.kt | 12 ++++++++++++ .../com/snowplowanalytics/core/tracker/Logger.kt | 2 +- .../core/tracker/PlatformContext.kt | 2 +- .../core/tracker/PluginsControllerImpl.kt | 2 +- .../com/snowplowanalytics/core/tracker/SchemaRule.kt | 2 +- .../snowplowanalytics/core/tracker/ScreenState.kt | 12 ++++++++++++ .../core/tracker/ScreenStateMachine.kt | 12 ++++++++++++ .../core/tracker/ServiceProvider.kt | 12 ++++++++++++ .../core/tracker/ServiceProviderInterface.kt | 12 ++++++++++++ .../com/snowplowanalytics/core/tracker/Subject.kt | 2 +- .../core/tracker/SubjectConfigurationInterface.kt | 12 ++++++++++++ .../core/tracker/SubjectConfigurationUpdate.kt | 12 ++++++++++++ .../core/tracker/SubjectControllerImpl.kt | 12 ++++++++++++ .../com/snowplowanalytics/core/tracker/Tracker.kt | 2 +- .../core/tracker/TrackerConfigurationInterface.kt | 12 ++++++++++++ .../core/tracker/TrackerConfigurationUpdate.kt | 12 ++++++++++++ .../core/tracker/TrackerControllerImpl.kt | 12 ++++++++++++ .../core/tracker/TrackerDefaults.kt | 2 +- .../snowplowanalytics/core/tracker/TrackerEvent.kt | 2 +- .../core/tracker/TrackerWebViewInterface.kt | 2 +- .../core/utils/DeviceInfoMonitor.kt | 2 +- .../com/snowplowanalytics/core/utils/JsonUtils.kt | 2 +- .../core/utils/NotificationCenter.kt | 12 ++++++++++++ .../java/com/snowplowanalytics/core/utils/Util.kt | 2 +- .../java/com/snowplowanalytics/snowplow/Snowplow.kt | 12 ++++++++++++ .../snowplow/configuration/Configuration.kt | 12 ++++++++++++ .../snowplow/configuration/ConfigurationBundle.kt | 12 ++++++++++++ .../snowplow/configuration/ConfigurationState.kt | 12 ++++++++++++ .../snowplow/configuration/EmitterConfiguration.kt | 12 ++++++++++++ .../snowplow/configuration/GdprConfiguration.kt | 12 ++++++++++++ .../configuration/GlobalContextsConfiguration.kt | 12 ++++++++++++ .../snowplow/configuration/NetworkConfiguration.kt | 12 ++++++++++++ .../snowplow/configuration/PluginConfiguration.kt | 2 +- .../snowplow/configuration/RemoteConfiguration.kt | 12 ++++++++++++ .../snowplow/configuration/SessionConfiguration.kt | 12 ++++++++++++ .../snowplow/configuration/SubjectConfiguration.kt | 12 ++++++++++++ .../snowplow/configuration/TrackerConfiguration.kt | 12 ++++++++++++ .../snowplow/controller/EmitterController.kt | 12 ++++++++++++ .../snowplow/controller/GdprController.kt | 12 ++++++++++++ .../snowplow/controller/GlobalContextsController.kt | 12 ++++++++++++ .../snowplow/controller/NetworkController.kt | 12 ++++++++++++ .../snowplow/controller/PluginsController.kt | 2 +- .../snowplow/controller/SessionController.kt | 12 ++++++++++++ .../snowplow/controller/SubjectController.kt | 12 ++++++++++++ .../snowplow/controller/TrackerController.kt | 12 ++++++++++++ .../snowplow/emitter/BufferOption.kt | 2 +- .../snowplow/emitter/EmitterEvent.kt | 2 +- .../snowplowanalytics/snowplow/emitter/EventStore.kt | 2 +- .../snowplowanalytics/snowplow/entity/DeepLink.kt | 2 +- .../snowplow/entity/LifecycleEntity.kt | 2 +- .../snowplow/event/AbstractEvent.kt | 2 +- .../snowplow/event/AbstractPrimitive.kt | 2 +- .../snowplow/event/AbstractSelfDescribing.kt | 2 +- .../snowplowanalytics/snowplow/event/Background.kt | 2 +- .../snowplow/event/ConsentDocument.kt | 2 +- .../snowplow/event/ConsentGranted.kt | 2 +- .../snowplow/event/ConsentWithdrawn.kt | 2 +- .../snowplow/event/DeepLinkReceived.kt | 2 +- .../snowplow/event/EcommerceTransaction.kt | 2 +- .../snowplow/event/EcommerceTransactionItem.kt | 2 +- .../com/snowplowanalytics/snowplow/event/Event.kt | 2 +- .../snowplowanalytics/snowplow/event/Foreground.kt | 2 +- .../snowplow/event/MessageNotification.kt | 2 +- .../snowplow/event/MessageNotificationAttachment.kt | 2 +- .../snowplow/event/MessageNotificationTrigger.kt | 2 +- .../com/snowplowanalytics/snowplow/event/PageView.kt | 2 +- .../snowplowanalytics/snowplow/event/ScreenView.kt | 2 +- .../snowplow/event/SelfDescribing.kt | 2 +- .../snowplowanalytics/snowplow/event/Structured.kt | 2 +- .../com/snowplowanalytics/snowplow/event/Timing.kt | 2 +- .../snowplowanalytics/snowplow/event/TrackerError.kt | 2 +- .../snowplow/globalcontexts/ContextGenerator.kt | 2 +- .../snowplow/globalcontexts/FunctionalFilter.kt | 12 ++++++++++++ .../snowplow/globalcontexts/FunctionalGenerator.kt | 12 ++++++++++++ .../snowplow/globalcontexts/GlobalContext.kt | 2 +- .../snowplow/globalcontexts/SchemaRuleSet.kt | 2 +- .../snowplow/network/CollectorCookie.kt | 12 ++++++++++++ .../snowplow/network/CollectorCookieJar.kt | 12 ++++++++++++ .../snowplowanalytics/snowplow/network/HttpMethod.kt | 2 +- .../snowplow/network/NetworkConnection.kt | 2 +- .../snowplow/network/OkHttpNetworkConnection.kt | 12 ++++++++++++ .../snowplowanalytics/snowplow/network/Protocol.kt | 2 +- .../snowplowanalytics/snowplow/network/Request.kt | 2 +- .../snowplow/network/RequestCallback.kt | 2 +- .../snowplow/network/RequestResult.kt | 2 +- .../snowplowanalytics/snowplow/payload/Payload.kt | 2 +- .../snowplow/payload/SelfDescribingJson.kt | 2 +- .../snowplow/payload/TrackerPayload.kt | 2 +- .../snowplow/tracker/DevicePlatform.kt | 2 +- .../snowplow/tracker/InspectableEvent.kt | 2 +- .../snowplowanalytics/snowplow/tracker/LogLevel.kt | 2 +- .../snowplow/tracker/LoggerDelegate.kt | 2 +- .../snowplow/tracker/SessionState.kt | 2 +- .../com/snowplowanalytics/snowplow/util/Basis.kt | 12 ++++++++++++ .../java/com/snowplowanalytics/snowplow/util/Size.kt | 12 ++++++++++++ .../snowplowanalytics/snowplow/util/TimeMeasure.kt | 12 ++++++++++++ 199 files changed, 1124 insertions(+), 116 deletions(-) diff --git a/LICENSE b/LICENSE index 6b4cc11d4..9354487b4 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2022 Snowplow Analytics Ltd. + Copyright 2023 Snowplow Analytics Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -198,4 +198,4 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License. diff --git a/README.md b/README.md index 670840442..e4c083492 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Two demo apps are included in this repository: one in [Java](https://github.com/ ## Copyright and license -The Snowplow Android Tracker is copyright 2015-2022 Snowplow Analytics Ltd. +The Snowplow Android Tracker is copyright 2015-2023 Snowplow Analytics Ltd. Licensed under the **[Apache License, Version 2.0][license]** (the "License"); you may not use this software except in compliance with the License. diff --git a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/Demo.java b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/Demo.java index 6d2a0497f..9e52cfc44 100644 --- a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/Demo.java +++ b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/Demo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/MainActivity.java b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/MainActivity.java index 21b78f3c6..3c14953a6 100644 --- a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/MainActivity.java +++ b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/MainActivity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/utils/DemoUtils.java b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/utils/DemoUtils.java index 9307d0a3f..e111df63c 100644 --- a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/utils/DemoUtils.java +++ b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/utils/DemoUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/utils/TrackerEvents.java b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/utils/TrackerEvents.java index 50650a87d..43ebedb09 100644 --- a/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/utils/TrackerEvents.java +++ b/snowplow-demo-java/src/main/java/com/snowplowanalytics/snowplowtrackerdemo/utils/TrackerEvents.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt index 3ebd66f68..023c16923 100644 --- a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt +++ b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/Demo.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/MainActivity.kt b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/MainActivity.kt index 36e049676..26c26c317 100644 --- a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/MainActivity.kt +++ b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/MainActivity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/DemoUtils.kt b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/DemoUtils.kt index eecdaf546..68fc32e20 100644 --- a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/DemoUtils.kt +++ b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/DemoUtils.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/TrackerEvents.kt b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/TrackerEvents.kt index 45c004bc4..3442ea399 100644 --- a/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/TrackerEvents.kt +++ b/snowplow-demo-kotlin/src/main/java/com/snowplowanalytics/snowplowdemokotlin/utils/TrackerEvents.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/TestUtils.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/TestUtils.kt index 81ef9d4fd..09541ed71 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/TestUtils.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/TestUtils.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow import android.content.Context diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ApplicationInstallTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ApplicationInstallTest.kt index d894ba1fe..bbbc6b240 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ApplicationInstallTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ApplicationInstallTest.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.event import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentGrantedTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentGrantedTest.kt index 543b1c809..136035b6b 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentGrantedTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentGrantedTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawnTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawnTest.kt index d71eefc83..1c771129b 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawnTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawnTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/DeepLinkReceivedTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/DeepLinkReceivedTest.kt index 05b0dc775..163e476d8 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/DeepLinkReceivedTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/DeepLinkReceivedTest.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.event import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceItemTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceItemTest.kt index 506e53218..956c5cc6f 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceItemTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceItemTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceTest.kt index 752e01be6..a40354ef4 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/MessageNotificationTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/MessageNotificationTest.kt index 7c816a6c6..d8d269ebf 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/MessageNotificationTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/MessageNotificationTest.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.event import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PageViewTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PageViewTest.kt index 1510fb099..3141d7d9e 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PageViewTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/PageViewTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ScreenViewTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ScreenViewTest.kt index a4ec825d9..b0dc76e73 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ScreenViewTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/ScreenViewTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/SelfDescribingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/SelfDescribingTest.kt index 88ed722b6..f4de15603 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/SelfDescribingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/SelfDescribingTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/StructuredTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/StructuredTest.kt index 7c6a08908..31e65003c 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/StructuredTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/StructuredTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TimingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TimingTest.kt index e70f64fed..cdbb5243e 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TimingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/TimingTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContextTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContextTest.kt index 3a45e59ca..daad3c3d2 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContextTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContextTest.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.globalcontexts import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSetTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSetTest.kt index 2fb03c7ae..5ef1a82aa 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSetTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSetTest.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.globalcontexts import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt index b172adbe6..3c6a7c262 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/emitter/storage/EventStoreTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/remoteconfiguration/RemoteConfigurationTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/remoteconfiguration/RemoteConfigurationTest.kt index 62d14ba7d..38d9897ae 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/remoteconfiguration/RemoteConfigurationTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/remoteconfiguration/RemoteConfigurationTest.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.internal.remoteconfiguration import android.annotation.SuppressLint diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/ConfigurationTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/ConfigurationTest.kt index 251f6b1df..a465a4e12 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/ConfigurationTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/ConfigurationTest.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.internal.tracker import android.content.Context diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MockDeviceInfoMonitor.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MockDeviceInfoMonitor.kt index b3bef833a..21e671b5c 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MockDeviceInfoMonitor.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MockDeviceInfoMonitor.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MultipleInstancesTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MultipleInstancesTest.kt index 02722ccbf..a495601dc 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MultipleInstancesTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MultipleInstancesTest.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.internal.tracker import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/PlatformContextTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/PlatformContextTest.kt index 1497ca4dd..d7d06114d 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/PlatformContextTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/PlatformContextTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt index 03bf2b4c1..1d252bfbd 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.internal.tracker import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt index 2cd6146a6..979f9d57c 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/TrackerTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/FileStoreTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/FileStoreTest.kt index 14702418d..e502ae35e 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/FileStoreTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/FileStoreTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/NotificationCenterTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/NotificationCenterTest.kt index c3df8f6de..218129c59 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/NotificationCenterTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/NotificationCenterTest.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.internal.utils import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/UtilTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/UtilTest.kt index e20d76bb2..84d9bdd7b 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/UtilTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/utils/UtilTest.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.internal.utils import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJsonTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJsonTest.kt index 53680d2d5..6ff56d987 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJsonTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJsonTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/TrackerPayloadTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/TrackerPayloadTest.kt index b0f53f6f8..534e247f3 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/TrackerPayloadTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/payload/TrackerPayloadTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/CollectorCookieJarTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/CollectorCookieJarTest.kt index d179d7bf7..e7dacb9a3 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/CollectorCookieJarTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/CollectorCookieJarTest.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.tracker import android.content.Context diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/DevicePlatformTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/DevicePlatformTest.kt index 53fad6a0c..060189047 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/DevicePlatformTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/DevicePlatformTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt index 5331fdc52..e2f13a6ac 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/EmitterTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ExecutorTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ExecutorTest.kt index 30db51d3c..94a224c3e 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ExecutorTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ExecutorTest.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.tracker import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt index 1cded4bc0..9b91f88ed 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/LoggingTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt index bce08b66e..71671c56f 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.tracker import com.snowplowanalytics.core.tracker.Logger.v diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockNetworkConnection.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockNetworkConnection.kt index ebf3f973d..f29cc26ba 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockNetworkConnection.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockNetworkConnection.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.tracker import android.net.Uri diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/NetworkConnectionTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/NetworkConnectionTest.kt index 91f986917..b7779f1b2 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/NetworkConnectionTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/NetworkConnectionTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/PluginsTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/PluginsTest.kt index c050862da..5600471a0 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/PluginsTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/PluginsTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/RequestResultTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/RequestResultTest.kt index 4b612f32a..ba745ea3a 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/RequestResultTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/RequestResultTest.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.tracker import androidx.test.ext.junit.runners.AndroidJUnit4 diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ServiceProviderTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ServiceProviderTest.kt index 32cd38b20..3ae51cbea 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ServiceProviderTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ServiceProviderTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt index eced13ef4..8a9908d42 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt index 347bfc10d..bfa419891 100755 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SubjectTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/TrackerWebViewInterfaceTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/TrackerWebViewInterfaceTest.kt index 3bc231a68..ab5bcac2e 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/TrackerWebViewInterfaceTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/TrackerWebViewInterfaceTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/emitter/TLSArgumentsTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/emitter/TLSArgumentsTest.kt index b42f027bd..b91991555 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/emitter/TLSArgumentsTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/emitter/TLSArgumentsTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt index 1f4a0ddfa..added359f 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/noise/NoiseTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/noise/NoiseTest.kt index c73ac1703..bc568b311 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/noise/NoiseTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/noise/NoiseTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/Controller.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/Controller.kt index 9c6317231..5a0c7f708 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/Controller.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/Controller.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core import com.snowplowanalytics.core.tracker.ServiceProviderInterface diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/Parameters.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/Parameters.kt index 956f27559..8115afdbf 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/Parameters.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/Parameters.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/TrackerConstants.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/TrackerConstants.kt index 9f602ff3b..a919c1803 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/TrackerConstants.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/constants/TrackerConstants.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt index 2082ee7b0..34b2e2d59 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Emitter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationInterface.kt index 8762f027f..588d00359 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationInterface.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.emitter import com.snowplowanalytics.snowplow.emitter.BufferOption diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationUpdate.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationUpdate.kt index 23a19d023..11a68b63a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationUpdate.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterConfigurationUpdate.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.emitter import com.snowplowanalytics.snowplow.configuration.EmitterConfiguration diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt index 920bb0168..d9ec47e64 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterControllerImpl.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.emitter import androidx.annotation.RestrictTo diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt index 7e38e1fff..fcf4176ad 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/EmitterDefaults.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Executor.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Executor.kt index 24dd7bde8..78bf75c9d 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Executor.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/Executor.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkConfigurationInterface.kt index 567a7b86d..2be442bd7 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkConfigurationInterface.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.emitter import com.snowplowanalytics.snowplow.network.HttpMethod diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkConfigurationUpdate.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkConfigurationUpdate.kt index eabd7347a..07849e306 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkConfigurationUpdate.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkConfigurationUpdate.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.emitter import com.snowplowanalytics.snowplow.configuration.NetworkConfiguration diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkControllerImpl.kt index 5cb69c8d8..c3714a2f0 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/NetworkControllerImpl.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.emitter import androidx.annotation.RestrictTo diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSArguments.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSArguments.kt index cb37d3198..7bad62f87 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSArguments.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSArguments.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSSocketFactory.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSSocketFactory.kt index 1bd4f0929..04db4fab1 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSSocketFactory.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSSocketFactory.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSVersion.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSVersion.kt index c3f182468..4ea812bd2 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSVersion.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/TLSVersion.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/EventStoreHelper.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/EventStoreHelper.kt index 789ec03a4..a2856a4da 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/EventStoreHelper.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/EventStoreHelper.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt index 68cac1099..55c4000bd 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/emitter/storage/SQLiteEventStore.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/Gdpr.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/Gdpr.kt index 792f82112..60189776e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/Gdpr.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/Gdpr.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.gdpr import androidx.annotation.RestrictTo diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprConfigurationInterface.kt index d29795bb0..3b0f79810 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprConfigurationInterface.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.gdpr import com.snowplowanalytics.snowplow.util.Basis diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprConfigurationUpdate.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprConfigurationUpdate.kt index 5673d7bcf..3fb78a61e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprConfigurationUpdate.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprConfigurationUpdate.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.gdpr import com.snowplowanalytics.snowplow.configuration.GdprConfiguration diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprControllerImpl.kt index ead7a27cd..10aebc057 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/gdpr/GdprControllerImpl.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.gdpr import androidx.annotation.RestrictTo diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextPluginConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextPluginConfiguration.kt index 87a990739..c0d86a030 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextPluginConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextPluginConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsConfigurationInterface.kt index 8d785b693..d5c2d718c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsConfigurationInterface.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.globalcontexts import com.snowplowanalytics.snowplow.globalcontexts.GlobalContext diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsControllerImpl.kt index d9201640f..2f2038bb1 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/globalcontexts/GlobalContextsControllerImpl.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.globalcontexts import androidx.annotation.RestrictTo diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/ConfigurationCache.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/ConfigurationCache.kt index 645f8f88c..eb6e023f9 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/ConfigurationCache.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/ConfigurationCache.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.remoteconfiguration import android.content.Context diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/ConfigurationFetcher.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/ConfigurationFetcher.kt index fc2b299cf..c1aac6869 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/ConfigurationFetcher.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/ConfigurationFetcher.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.remoteconfiguration import android.content.Context diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/ConfigurationProvider.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/ConfigurationProvider.kt index 018323e8d..76846bfc5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/ConfigurationProvider.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/ConfigurationProvider.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.remoteconfiguration import android.content.Context diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/FetchedConfigurationBundle.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/FetchedConfigurationBundle.kt index 521386734..e37cdf778 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/FetchedConfigurationBundle.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/remoteconfiguration/FetchedConfigurationBundle.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.remoteconfiguration import android.content.Context diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/FileStore.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/FileStore.kt index 080555a9c..cec8ca733 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/FileStore.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/FileStore.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/ProcessObserver.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/ProcessObserver.kt index 05e3081c7..97a2d791d 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/ProcessObserver.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/ProcessObserver.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/Session.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/Session.kt index fc53ecb2c..e1a1beb7c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/Session.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/Session.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionConfigurationInterface.kt index 7673aaba5..e5f1c6dea 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionConfigurationInterface.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.session import androidx.core.util.Consumer diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionConfigurationUpdate.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionConfigurationUpdate.kt index 5973800e7..25006e664 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionConfigurationUpdate.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionConfigurationUpdate.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.session import androidx.core.util.Consumer diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionControllerImpl.kt index f09ce4c87..9854a981f 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/session/SessionControllerImpl.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.session import androidx.annotation.RestrictTo diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkState.kt index 05d245696..2613ee649 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkState.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt index 2564efe93..f4c5d813a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/DeepLinkStateMachine.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleState.kt index 15c5abb3e..970cb0955 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleState.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.statemachine class LifecycleState(val isForeground: Boolean, val index: Int?) : State diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt index 5f38020a4..58a99d5ff 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/LifecycleStateMachine.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.statemachine import com.snowplowanalytics.snowplow.entity.LifecycleEntity diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt index 28141e66a..ef92c2828 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/PluginStateMachine.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/State.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/State.kt index 1a488b01f..f1ca6b500 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/State.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/State.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.statemachine interface State diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateFuture.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateFuture.kt index 7b20f2203..07996891d 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateFuture.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateFuture.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.statemachine import com.snowplowanalytics.snowplow.event.Event diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineEvent.kt index 960adc416..e4c71acf3 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt index b6a2f23b8..ad450b049 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateMachineInterface.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.statemachine import com.snowplowanalytics.snowplow.event.Event diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt index cd36d7c6e..8c86929c7 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/StateManager.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.statemachine import com.snowplowanalytics.core.emitter.Executor.execute diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerState.kt index 7d79ace85..7a450dcf5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerState.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.statemachine class TrackerState : TrackerStateSnapshot { diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerStateSnapshot.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerStateSnapshot.kt index 3dbc7adf9..c1960117a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerStateSnapshot.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/statemachine/TrackerStateSnapshot.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.statemachine interface TrackerStateSnapshot { diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ActivityLifecycleHandler.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ActivityLifecycleHandler.kt index aeccd81af..d6195f0d5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ActivityLifecycleHandler.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ActivityLifecycleHandler.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ExceptionHandler.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ExceptionHandler.kt index dcf501d8f..828d1920f 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ExceptionHandler.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ExceptionHandler.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/InstallTracker.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/InstallTracker.kt index e66ec4e48..51592b9d2 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/InstallTracker.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/InstallTracker.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.tracker import android.content.Context diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Logger.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Logger.kt index b6217025b..10cde60f5 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Logger.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Logger.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PlatformContext.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PlatformContext.kt index 587918784..3b661c4f3 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PlatformContext.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PlatformContext.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PluginsControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PluginsControllerImpl.kt index 8ae80d8c0..776058f1d 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PluginsControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/PluginsControllerImpl.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SchemaRule.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SchemaRule.kt index c0887a1ba..1cb41c12d 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SchemaRule.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SchemaRule.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenState.kt index 01aec7117..09071c515 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenState.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.tracker import androidx.annotation.RestrictTo diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt index 662ef847a..0cc7c07d8 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ScreenStateMachine.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.tracker import com.snowplowanalytics.core.constants.Parameters diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt index eedc6a14c..211b1d712 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProvider.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.tracker import android.content.Context diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProviderInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProviderInterface.kt index cfcb2affc..55b935a48 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProviderInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/ServiceProviderInterface.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.tracker import com.snowplowanalytics.core.emitter.* diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt index eb088c2e1..b78a1b29f 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectConfigurationInterface.kt index a093c23a3..8c3e0a183 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectConfigurationInterface.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.tracker import com.snowplowanalytics.snowplow.util.Size diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectConfigurationUpdate.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectConfigurationUpdate.kt index 494bae2e1..b67788c71 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectConfigurationUpdate.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectConfigurationUpdate.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.tracker import com.snowplowanalytics.snowplow.configuration.SubjectConfiguration diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectControllerImpl.kt index 748558a2c..550e78ffc 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/SubjectControllerImpl.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.tracker import androidx.annotation.RestrictTo diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt index 20f9d9482..50e04b0b8 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Tracker.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt index 95846cc97..ef7a7d2b3 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationInterface.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.tracker import com.snowplowanalytics.snowplow.tracker.DevicePlatform diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationUpdate.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationUpdate.kt index b5403ecec..494d7d9e6 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationUpdate.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerConfigurationUpdate.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.tracker import com.snowplowanalytics.snowplow.configuration.TrackerConfiguration diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt index 4aee555e7..30d4ecb6c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerControllerImpl.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.tracker import androidx.annotation.RestrictTo diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt index a3e0a813b..92dc50597 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerDefaults.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt index 675c049a6..d40542291 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerWebViewInterface.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerWebViewInterface.kt index 8844ffdd9..cb6c0dd4a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerWebViewInterface.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/TrackerWebViewInterface.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/DeviceInfoMonitor.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/DeviceInfoMonitor.kt index 3b7a5be18..27f974771 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/DeviceInfoMonitor.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/DeviceInfoMonitor.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/JsonUtils.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/JsonUtils.kt index c1419035b..8181c3cf5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/JsonUtils.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/JsonUtils.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/NotificationCenter.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/NotificationCenter.kt index f0b4e5680..312ede4f7 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/NotificationCenter.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/NotificationCenter.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.core.utils import java.lang.ref.WeakReference diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/Util.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/Util.kt index a89700d89..f2b06c67a 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/Util.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/utils/Util.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/Snowplow.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/Snowplow.kt index ed7f045dc..5c6f545f3 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/Snowplow.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/Snowplow.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow import android.content.Context diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/Configuration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/Configuration.kt index bdab20818..3761f643e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/Configuration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/Configuration.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.configuration import java.io.Serializable diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationBundle.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationBundle.kt index a1950d5f9..a8c7820cc 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationBundle.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationBundle.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.configuration import android.content.Context diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationState.kt index 25add9519..d396f73c4 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/ConfigurationState.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.configuration /** diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt index 223000ebb..a24c93cdf 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/EmitterConfiguration.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.configuration import com.snowplowanalytics.core.emitter.EmitterConfigurationInterface diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GdprConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GdprConfiguration.kt index 76c97cdc3..390a54d20 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GdprConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GdprConfiguration.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.configuration import com.snowplowanalytics.core.gdpr.GdprConfigurationInterface diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GlobalContextsConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GlobalContextsConfiguration.kt index b5c1c8b9f..1b7e9cfab 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GlobalContextsConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/GlobalContextsConfiguration.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.configuration import com.snowplowanalytics.core.globalcontexts.GlobalContextPluginConfiguration diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/NetworkConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/NetworkConfiguration.kt index d23941f6d..e1360fae9 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/NetworkConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/NetworkConfiguration.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.configuration import android.net.Uri diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PluginConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PluginConfiguration.kt index a59ec4520..14da0ac2f 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PluginConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/PluginConfiguration.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/RemoteConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/RemoteConfiguration.kt index 79e2b8600..0b1629728 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/RemoteConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/RemoteConfiguration.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.configuration import android.net.Uri diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SessionConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SessionConfiguration.kt index b89b7ec76..83582dc9a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SessionConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SessionConfiguration.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.configuration import androidx.core.util.Consumer diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SubjectConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SubjectConfiguration.kt index 5bc750878..fcbd5594e 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SubjectConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/SubjectConfiguration.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.configuration import com.snowplowanalytics.core.tracker.SubjectConfigurationInterface diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt index 64ac2b6cc..528c74edb 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/configuration/TrackerConfiguration.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.configuration import com.snowplowanalytics.core.tracker.Logger diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/EmitterController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/EmitterController.kt index 1471da82c..7123fa108 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/EmitterController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/EmitterController.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.controller import com.snowplowanalytics.core.emitter.EmitterConfigurationInterface diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GdprController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GdprController.kt index 76ab27422..e3ead27a2 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GdprController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GdprController.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.controller import com.snowplowanalytics.core.gdpr.GdprConfigurationInterface diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GlobalContextsController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GlobalContextsController.kt index 56d441dd5..599340dac 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GlobalContextsController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/GlobalContextsController.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.controller import com.snowplowanalytics.core.globalcontexts.GlobalContextsConfigurationInterface diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/NetworkController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/NetworkController.kt index 8a0bab5c8..08c3c5e72 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/NetworkController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/NetworkController.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.controller import com.snowplowanalytics.snowplow.network.HttpMethod diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/PluginsController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/PluginsController.kt index 3f8cafaa4..9a229a96a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/PluginsController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/PluginsController.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SessionController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SessionController.kt index 774fe6d25..bd3e7f6cb 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SessionController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SessionController.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.controller import com.snowplowanalytics.core.session.SessionConfigurationInterface diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SubjectController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SubjectController.kt index 17ca0e182..dd86b6231 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SubjectController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/SubjectController.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.controller import com.snowplowanalytics.core.tracker.SubjectConfigurationInterface diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt index e474bc698..c0aa66caa 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/controller/TrackerController.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.controller import com.snowplowanalytics.core.tracker.TrackerConfigurationInterface diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/BufferOption.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/BufferOption.kt index 8048b076e..a9b06d69a 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/BufferOption.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/BufferOption.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EmitterEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EmitterEvent.kt index 6b3a701ef..3402688e5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EmitterEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EmitterEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt index e2c5d5d65..16450b7b5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/emitter/EventStore.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/DeepLink.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/DeepLink.kt index b463dce7a..30ad9a446 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/DeepLink.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/DeepLink.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/LifecycleEntity.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/LifecycleEntity.kt index 443833971..1f13419c1 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/LifecycleEntity.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/entity/LifecycleEntity.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt index 74cd786e5..959de9e9d 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractPrimitive.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractPrimitive.kt index 891f1bde0..5cbae543d 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractPrimitive.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractPrimitive.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractSelfDescribing.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractSelfDescribing.kt index b12174b42..00965a159 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractSelfDescribing.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/AbstractSelfDescribing.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Background.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Background.kt index 389cc75e3..7ad7c2918 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Background.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Background.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentDocument.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentDocument.kt index 1de5ec890..ee6b16d18 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentDocument.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentDocument.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentGranted.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentGranted.kt index a3f60b890..52fad7e40 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentGranted.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentGranted.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawn.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawn.kt index 992458507..ad56ec6c6 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawn.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ConsentWithdrawn.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/DeepLinkReceived.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/DeepLinkReceived.kt index 8ab043114..3b0d49d7a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/DeepLinkReceived.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/DeepLinkReceived.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransaction.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransaction.kt index 3a9cbfa81..017e93dc2 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransaction.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransaction.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionItem.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionItem.kt index b2a96c6d7..58e84ce5d 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionItem.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionItem.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Event.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Event.kt index 583264639..8dacd389c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Event.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Event.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Foreground.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Foreground.kt index 685ad67bd..e2069a242 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Foreground.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Foreground.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotification.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotification.kt index f2e2a1c2d..34c058e74 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotification.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotification.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationAttachment.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationAttachment.kt index c51f5d01a..724748a54 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationAttachment.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationAttachment.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationTrigger.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationTrigger.kt index fa3910ea9..b9adc93a5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationTrigger.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/MessageNotificationTrigger.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/PageView.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/PageView.kt index b5d3d0575..9976eef9a 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/PageView.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/PageView.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScreenView.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScreenView.kt index c06db5d54..bac90f36c 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScreenView.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/ScreenView.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/SelfDescribing.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/SelfDescribing.kt index c022a5f3d..8334067bd 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/SelfDescribing.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/SelfDescribing.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Structured.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Structured.kt index dd309cf53..0024fa6f9 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Structured.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Structured.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Timing.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Timing.kt index f9c88016c..524585152 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Timing.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/Timing.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/TrackerError.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/TrackerError.kt index 36ddf0690..b5362c476 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/TrackerError.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/event/TrackerError.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/ContextGenerator.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/ContextGenerator.kt index 29a0e86aa..a7b72e6ec 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/ContextGenerator.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/ContextGenerator.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalFilter.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalFilter.kt index d6c113a18..5025d460b 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalFilter.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalFilter.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.globalcontexts import com.snowplowanalytics.snowplow.tracker.InspectableEvent diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalGenerator.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalGenerator.kt index c45e7d997..74b991f7f 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalGenerator.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/FunctionalGenerator.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.globalcontexts import com.snowplowanalytics.snowplow.payload.SelfDescribingJson diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContext.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContext.kt index 313ed6e31..8a0254111 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContext.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/GlobalContext.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSet.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSet.kt index af47e81d4..b264fed2b 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSet.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/globalcontexts/SchemaRuleSet.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookie.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookie.kt index 4a88633ab..41bd2fb31 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookie.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookie.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.network import okhttp3.Cookie diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookieJar.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookieJar.kt index 21817aa32..e3b128812 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookieJar.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/CollectorCookieJar.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.network import android.content.Context diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/HttpMethod.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/HttpMethod.kt index e61301e8d..d6bc000e1 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/HttpMethod.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/HttpMethod.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/NetworkConnection.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/NetworkConnection.kt index 5b36035a9..ad48c04a5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/NetworkConnection.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/NetworkConnection.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt index c3b5ea1f4..3a8c140fe 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.network import android.content.Context diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Protocol.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Protocol.kt index 465f9505e..502b09bfe 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Protocol.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Protocol.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Request.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Request.kt index 1fb8cd13b..7355b93d5 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Request.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/Request.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestCallback.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestCallback.kt index 14dc5b368..f647ccb8f 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestCallback.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestCallback.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestResult.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestResult.kt index f1a1a47bd..1bba88f7b 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestResult.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/RequestResult.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/Payload.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/Payload.kt index 98542a7b7..8358aa62f 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/Payload.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/Payload.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJson.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJson.kt index d8f49eb49..7ccf8ea17 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJson.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/SelfDescribingJson.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/TrackerPayload.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/TrackerPayload.kt index 8fb4e733a..8a9e4a132 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/TrackerPayload.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/payload/TrackerPayload.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/DevicePlatform.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/DevicePlatform.kt index e4c47cd8a..9a49e88f7 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/DevicePlatform.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/DevicePlatform.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/InspectableEvent.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/InspectableEvent.kt index 48f47e9cf..4487fd345 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/InspectableEvent.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/InspectableEvent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LogLevel.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LogLevel.kt index d5ac725bc..b5ac658dd 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LogLevel.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LogLevel.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LoggerDelegate.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LoggerDelegate.kt index 8c5d016bd..f77cd208d 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LoggerDelegate.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/LoggerDelegate.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/SessionState.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/SessionState.kt index e4bc82aff..a5cc67cf6 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/SessionState.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/tracker/SessionState.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022 Snowplow Analytics Ltd. All rights reserved. + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Basis.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Basis.kt index 638e3b25b..d5f1f1509 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Basis.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Basis.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.util enum class Basis { diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Size.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Size.kt index bb9aa59aa..54c099279 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Size.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/Size.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.util data class Size(val width: Int, val height: Int) diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/TimeMeasure.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/TimeMeasure.kt index f7a7c2e6e..9d59cdb18 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/TimeMeasure.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/util/TimeMeasure.kt @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. + * + * This program is licensed to you under the Apache License Version 2.0, + * and you may not use this file except in compliance with the Apache License Version 2.0. + * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the Apache License Version 2.0 is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + */ package com.snowplowanalytics.snowplow.util import java.util.concurrent.TimeUnit From c1492bf9185338a38711320a7fa6673a6ad89313 Mon Sep 17 00:00:00 2001 From: Miranda Wilson Date: Thu, 2 Feb 2023 15:14:06 +0000 Subject: [PATCH 4/4] Prepare for 5.0.0-beta.1 release --- CHANGELOG | 7 +++++-- VERSION | 2 +- build.gradle | 2 +- gradle.properties | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6806623cd..1cce010af 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ -Version 5.0.0-alpha.1 (2022-11-30) +Version 5.0.0-beta.1 (2022-02-02) -------------------------- -Migrate published API to Kotlin (#561) +Update copyrights to 2023 (#579) +Add ability to provide custom tracker plugins to inspect and enrich tracked events (#574) +Refactor event interface and rename contexts to entities (#573) +Migrate internal classes to Kotlin (#564) Version 4.1.1 (2022-12-02) -------------------------- diff --git a/VERSION b/VERSION index 5d200d543..9e25fc0ae 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.0.0-alpha.1 +5.0.0-beta.1 diff --git a/build.gradle b/build.gradle index 76319256a..9116270fc 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ buildscript { subprojects { group = 'com.snowplowanalytics' - version = '5.0.0-alpha.1' + version = '5.0.0-beta.1' repositories { google() maven { diff --git a/gradle.properties b/gradle.properties index 70efb700f..23725a901 100644 --- a/gradle.properties +++ b/gradle.properties @@ -30,7 +30,7 @@ systemProp.org.gradle.internal.http.socketTimeout=120000 SONATYPE_STAGING_PROFILE=comsnowplowanalytics GROUP=com.snowplowanalytics POM_ARTIFACT_ID=snowplow-android-tracker -VERSION_NAME=5.0.0-alpha.1 +VERSION_NAME=5.0.0-beta.1 POM_NAME=snowplow-android-tracker POM_PACKAGING=aar