Package com.mparticle.consent
Class ConsentState
- java.lang.Object
-
- com.mparticle.consent.ConsentState
-
public final class ConsentState extends java.lang.Object
ConsentState 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 class
ConsentState.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConsentState.Builder
builder()
CCPAConsent
getCCPAConsentState()
java.util.Map<java.lang.String,GDPRConsent>
getGDPRConsentState()
Retrieve the current GDPR consent state for this user.java.lang.String
toString()
static ConsentState.Builder
withConsentState(ConsentState consentState)
static ConsentState.Builder
withConsentState(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:
toString
in classjava.lang.Object
-
-