public class ApiEventsRepository extends java.lang.Object implements HttpResponseJSONListener, ConnectivityListener
| Constructor and Description |
|---|
ApiEventsRepository(ContextHelper contextHelper,
CountryHelper countryHelper,
ConnectivityHelper connectivityHelper,
HttpRequestHelper httpRequestHelper,
ConfigurationRepository configurationRepository,
ConsentRepository consentRepository,
io.didomi.sdk.user.OrganizationUserRepository organizationUserRepository,
io.didomi.sdk.user.UserRepository userRepository) |
| Modifier and Type | Method and Description |
|---|---|
java.util.ArrayList<ApiEvent> |
getEventsArray()
Getter method used to return APIEvents
returns ArrayList of ApiEvent.
|
java.util.Set<ApiEventType> |
getTriggeredEvents()
Getter method used to return triggered APIEvent types
returns Set of ApiEventType.
|
void |
onBackOnline()
Method called once the device is back online.
|
void |
onFailure(org.json.JSONObject jsonObject) |
void |
onSuccess(org.json.JSONObject jsonObject) |
void |
sendEvent(ApiEvent apiEvent)
Method used to send a single apiEvent.
|
static boolean |
shouldEventBeSent(java.lang.String userUUID,
double samplingRate)
Method used to determine if the current event should be sent to API.
|
boolean |
shouldSkipEvent(ApiEvent apiEvent)
Method used to determine if the current event should be skipped or not.
|
void |
triggerConsentAskedEvent(java.util.Set<java.lang.String> purposeIds,
java.util.Set<java.lang.String> legIntPurposeIds,
java.util.Set<java.lang.String> vendorIds,
java.util.Set<java.lang.String> vendorLegIntIds,
java.lang.String position)
Method used to trigger the Consent Asked event.
|
void |
triggerConsentGivenEvent(java.util.Set<java.lang.String> enabledPurposeIds,
java.util.Set<java.lang.String> disabledPurposeIds,
java.util.Set<java.lang.String> enabledLegitimatePurposeIds,
java.util.Set<java.lang.String> disabledLegitimatePurposeIds,
java.util.Set<java.lang.String> enabledVendorIds,
java.util.Set<java.lang.String> disabledVendorIds,
java.util.Set<java.lang.String> enabledLegIntVendorIds,
java.util.Set<java.lang.String> disabledLegIntVendorIds,
java.util.Set<java.lang.String> previousEnabledPurposeIds,
java.util.Set<java.lang.String> previousDisabledPurposeIds,
java.util.Set<java.lang.String> previousEnabledLegitimatePurposeIds,
java.util.Set<java.lang.String> previousDisabledLegitimatePurposeIds,
java.util.Set<java.lang.String> previousEnabledVendorIds,
java.util.Set<java.lang.String> previousDisabledVendorIds,
java.util.Set<java.lang.String> previousEnabledLegIntVendorIds,
java.util.Set<java.lang.String> previousDisabledLegIntVendorIds)
Method used to trigger the Consent Given event.
|
void |
triggerPageViewEvent()
Method used to trigger a pageview event.
|
void |
triggerUIActionPurposeChangedEvent()
Method used to trigger a purpose changed event.
|
void |
triggerUIActionShownPurposesEvent()
Method used to trigger a purposes shown event.
|
void |
triggerUIActionShownVendorsEvent()
Method used to trigger a vendors shown event.
|
void |
triggerUIActionVendorChangedEvent()
Method used to trigger a vendor changed event.
|
public ApiEventsRepository(ContextHelper contextHelper, CountryHelper countryHelper, ConnectivityHelper connectivityHelper, HttpRequestHelper httpRequestHelper, ConfigurationRepository configurationRepository, ConsentRepository consentRepository, io.didomi.sdk.user.OrganizationUserRepository organizationUserRepository, io.didomi.sdk.user.UserRepository userRepository)
public java.util.ArrayList<ApiEvent> getEventsArray()
public java.util.Set<ApiEventType> getTriggeredEvents()
public void triggerPageViewEvent()
public void triggerConsentAskedEvent(java.util.Set<java.lang.String> purposeIds,
java.util.Set<java.lang.String> legIntPurposeIds,
java.util.Set<java.lang.String> vendorIds,
java.util.Set<java.lang.String> vendorLegIntIds,
java.lang.String position)
public void triggerConsentGivenEvent(java.util.Set<java.lang.String> enabledPurposeIds,
java.util.Set<java.lang.String> disabledPurposeIds,
java.util.Set<java.lang.String> enabledLegitimatePurposeIds,
java.util.Set<java.lang.String> disabledLegitimatePurposeIds,
java.util.Set<java.lang.String> enabledVendorIds,
java.util.Set<java.lang.String> disabledVendorIds,
java.util.Set<java.lang.String> enabledLegIntVendorIds,
java.util.Set<java.lang.String> disabledLegIntVendorIds,
java.util.Set<java.lang.String> previousEnabledPurposeIds,
java.util.Set<java.lang.String> previousDisabledPurposeIds,
java.util.Set<java.lang.String> previousEnabledLegitimatePurposeIds,
java.util.Set<java.lang.String> previousDisabledLegitimatePurposeIds,
java.util.Set<java.lang.String> previousEnabledVendorIds,
java.util.Set<java.lang.String> previousDisabledVendorIds,
java.util.Set<java.lang.String> previousEnabledLegIntVendorIds,
java.util.Set<java.lang.String> previousDisabledLegIntVendorIds)
public void triggerUIActionShownPurposesEvent()
public void triggerUIActionShownVendorsEvent()
public void triggerUIActionPurposeChangedEvent()
public void triggerUIActionVendorChangedEvent()
public void sendEvent(ApiEvent apiEvent)
apiEvent - apiEvent to be sent.public boolean shouldSkipEvent(ApiEvent apiEvent)
apiEvent - to be sent to APIpublic static boolean shouldEventBeSent(java.lang.String userUUID,
double samplingRate)
userUUID - - UUID of usersamplingRate - - sampling ratepublic void onSuccess(org.json.JSONObject jsonObject)
onSuccess in interface HttpResponseJSONListenerpublic void onFailure(org.json.JSONObject jsonObject)
onFailure in interface HttpResponseJSONListenerpublic void onBackOnline()
ConnectivityListeneronBackOnline in interface ConnectivityListener