public final class ConsentManager extends java.lang.Object implements DispatchSendListener
Modifier and Type | Class and Description |
---|---|
static class |
ConsentManager.ConsentCategory |
static class |
ConsentManager.ConsentStatus |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getPolicy() |
java.lang.String[] |
getUserConsentCategories() |
UserConsentPreferences |
getUserConsentPreferences() |
java.lang.String |
getUserConsentStatus() |
boolean |
isConsentLogging() |
void |
onDispatchSend(Dispatch dispatch) |
void |
resetUserConsentPreferences()
Removes stored user consent preferences, resets user preferences to defaults
consent status is set to "unknown" and categories are cleared
|
void |
setConsentLoggingEnabled(boolean isLogging)
Enables Consent Logging feature, which sends all consent status changes to UDH for auditing purposes
|
void |
setPolicy(java.lang.String policy)
Set policy name
|
void |
setUserConsentCategories(java.lang.String[] categories)
Sets user consent categories, and automatically sets the user consent to "consented"
|
void |
setUserConsentStatus(java.lang.String status)
Sets user consent status -
If true, automatically enables all categories
If false, all categories automatically disabled.
|
void |
setUserConsentStatusWithCategories(java.lang.String status,
java.lang.String[] categories)
Sets user consent status and categories
|
public java.lang.String getUserConsentStatus()
public java.lang.String[] getUserConsentCategories()
public UserConsentPreferences getUserConsentPreferences()
public boolean isConsentLogging()
public java.lang.String getPolicy()
public void setUserConsentStatus(java.lang.String status)
status
- User's consent statuspublic void setUserConsentCategories(java.lang.String[] categories)
categories
- User's consent categoriespublic void setUserConsentStatusWithCategories(java.lang.String status, java.lang.String[] categories)
status
- User's consent statuscategories
- User's consent categoriespublic void setConsentLoggingEnabled(boolean isLogging)
isLogging
- public void setPolicy(java.lang.String policy)
policy
- public void resetUserConsentPreferences()
public void onDispatchSend(Dispatch dispatch)
onDispatchSend
in interface DispatchSendListener