Class CurrentUserStatus
-
- All Implemented Interfaces:
public final class CurrentUserStatusCurrent User Status Type used to represent the current user status. This contains all the choices made by the user on the Didomi SDK and other related information such as consent string and dates when the status was created or updated.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCurrentUserStatus.PurposeStatusUser Status for a Purpose
public final classCurrentUserStatus.VendorStatusUser Status for a Vendor
-
Field Summary
Fields Modifier and Type Field Description private final StringuserIdprivate final Stringcreatedprivate final Stringupdatedprivate final StringconsentStringprivate final StringadditionalConsentprivate final StringdidomiDcsprivate final StringgppStringprivate final transient Regulationregulationprivate final Map<String, CurrentUserStatus.PurposeStatus>purposesprivate final Map<String, CurrentUserStatus.VendorStatus>vendors
-
Constructor Summary
Constructors Constructor Description CurrentUserStatus(Map<String, CurrentUserStatus.PurposeStatus> purposes, Map<String, CurrentUserStatus.VendorStatus> vendors)Public constructor for CurrentUserStatus CurrentUserStatus(Map<String, CurrentUserStatus.PurposeStatus> purposes, Map<String, CurrentUserStatus.VendorStatus> vendors, String userId, String created, String updated, String consentString, String additionalConsent, String didomiDcs, String regulationString, String gppString)
-
Method Summary
Modifier and Type Method Description final StringgetUserId()Didomi user ID final StringgetCreated()User status creation date final StringgetUpdated()User status update date final StringgetConsentString()TCF consent as string final StringgetAdditionalConsent()Additional consent as string final StringgetDidomiDcs()Didomi DCS final StringgetGppString()GPP String (from IABGPP_HDR_GppStringkey)final RegulationgetRegulation()Current Regulation final Map<String, CurrentUserStatus.PurposeStatus>getPurposes()Property that contains the user status associated to purposes. final Map<String, CurrentUserStatus.VendorStatus>getVendors()Property that contains the user status associated to vendors. final BooleanshouldUserStatusBeCollected()Determine if the User Status (consent) should be collected or not. -
-
Constructor Detail
-
CurrentUserStatus
CurrentUserStatus(Map<String, CurrentUserStatus.PurposeStatus> purposes, Map<String, CurrentUserStatus.VendorStatus> vendors)
Public constructor for CurrentUserStatus- Parameters:
purposes- Map of purposes with their statusvendors- Map of vendors with their status
-
-
Method Detail
-
getCreated
final String getCreated()
User status creation date
-
getUpdated
final String getUpdated()
User status update date
-
getConsentString
final String getConsentString()
TCF consent as string
-
getAdditionalConsent
final String getAdditionalConsent()
Additional consent as string
-
getDidomiDcs
final String getDidomiDcs()
Didomi DCS
-
getGppString
final String getGppString()
GPP String (from
IABGPP_HDR_GppStringkey)
-
getRegulation
final Regulation getRegulation()
Current Regulation
-
getPurposes
final Map<String, CurrentUserStatus.PurposeStatus> getPurposes()
Property that contains the user status associated to purposes.
-
getVendors
final Map<String, CurrentUserStatus.VendorStatus> getVendors()
Property that contains the user status associated to vendors.
-
shouldUserStatusBeCollected
final Boolean shouldUserStatusBeCollected()
Determine if the User Status (consent) should be collected or not. This is based on the regulation and the expiration date.
If the regulation is NONE, we don't need to collect the User Status, false is always returned.
If the User Status (consent) should be collected when the CurrentUserStatus has been computed, true is always returned.
If the User Status (consent) should NOT be collected when the CurrentUserStatus has been computed, true is returned only if the consent is expired.
- Returns:
true if User Status (consent) should be collected, false otherwise.
-
-
-
-