Package com.mparticle.consent
Class ConsentState
- java.lang.Object
-
- com.mparticle.consent.ConsentState
-
public final class ConsentState extends java.lang.ObjectConsentState represents the set of purposes and regulations for which a user has consented for data collection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConsentState.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConsentState.Builderbuilder()CCPAConsentgetCCPAConsentState()java.util.Map<java.lang.String,GDPRConsent>getGDPRConsentState()Retrieve the current GDPR consent state for this user.java.lang.StringtoString()static ConsentState.BuilderwithConsentState(ConsentState consentState)static ConsentState.BuilderwithConsentState(java.lang.String consentState)
-
-
-
Method Detail
-
builder
@NonNull public static ConsentState.Builder builder()
-
withConsentState
@NonNull public static ConsentState.Builder withConsentState(@NonNull ConsentState consentState)
-
withConsentState
@NonNull public static ConsentState.Builder withConsentState(@NonNull java.lang.String consentState)
-
getGDPRConsentState
@NonNull public java.util.Map<java.lang.String,GDPRConsent> getGDPRConsentState()
Retrieve the current GDPR consent state for this user.Note that all purpose keys will be lower-case and trimmed.
- Returns:
- returns an unmodifiable Map. Attempted mutation will
result in an
UnsupportedOperationException.
-
getCCPAConsentState
@Nullable public CCPAConsent getCCPAConsentState()
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-