Package com.iab.gdpr.consent
Interface VendorConsent
-
- All Known Implementing Classes:
ByteBufferBackedVendorConsent
public interface VendorConsentRepresentation of the values in the vendor consent string. Combination ofisPurposeAllowed(int)andisVendorAllowed(int)methods fully describes user's consent for particular action by a particular vendor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<Integer>getAllowedPurposeIds()Set<Purpose>getAllowedPurposes()intgetAllowedPurposesBits()Set<Integer>getAllowedVendorIds()intgetCmpId()intgetCmpVersion()StringgetConsentLanguage()InstantgetConsentRecordCreated()InstantgetConsentRecordLastUpdated()intgetConsentScreen()intgetMaxVendorId()intgetVendorListVersion()intgetVersion()booleanisPurposeAllowed(int purposeId)Check whether purpose with specified ID is allowedbooleanisPurposeAllowed(Purpose purpose)Check whether specified purpose is allowedbooleanisVendorAllowed(int vendorId)Check whether vendor with specified ID is allowdbyte[]toByteArray()
-
-
-
Method Detail
-
getVersion
int getVersion()
- Returns:
- the version of consent string format
-
getConsentRecordCreated
Instant getConsentRecordCreated()
- Returns:
- the
Instantat which the consent string was created
-
getConsentRecordLastUpdated
Instant getConsentRecordLastUpdated()
- Returns:
- the
Instantat which consent string was last updated
-
getCmpId
int getCmpId()
- Returns:
- the Consent Manager Provider ID that last updated the consent string
-
getCmpVersion
int getCmpVersion()
- Returns:
- the Consent Manager Provider version
-
getConsentScreen
int getConsentScreen()
- Returns:
- the screen number in the CMP where consent was given
-
getConsentLanguage
String getConsentLanguage()
- Returns:
- the two-letter ISO639-1 language code that CMP asked for consent in
-
getVendorListVersion
int getVendorListVersion()
- Returns:
- version of vendor list used in most recent consent string update.
-
getAllowedPurposeIds
Set<Integer> getAllowedPurposeIds()
- Returns:
- the set of purpose id's which are permitted according to this consent string
-
getAllowedPurposes
Set<Purpose> getAllowedPurposes()
- Returns:
- the set of allowed purposes which are permitted according to this consent string
-
getAllowedPurposesBits
int getAllowedPurposesBits()
- Returns:
- an integer equivalent of allowed purpose id bits according to this consent string
-
getAllowedVendorIds
Set<Integer> getAllowedVendorIds()
- Returns:
- the set of allowed vendor id's which are permitted according to this consent string
-
getMaxVendorId
int getMaxVendorId()
- Returns:
- the maximum VendorId for which consent values are given.
-
isPurposeAllowed
boolean isPurposeAllowed(int purposeId)
Check whether purpose with specified ID is allowed- Parameters:
purposeId- purpose ID- Returns:
- true if purpose is allowed in this consent, false otherwise
-
isPurposeAllowed
boolean isPurposeAllowed(Purpose purpose)
Check whether specified purpose is allowed- Parameters:
purpose- purpose to check- Returns:
- true if purpose is allowed in this consent, false otherwise
-
isVendorAllowed
boolean isVendorAllowed(int vendorId)
Check whether vendor with specified ID is allowd- Parameters:
vendorId- vendor ID- Returns:
- a boolean describing if a user has consented to a particular vendor
-
toByteArray
byte[] toByteArray()
- Returns:
- the value of this consent as byte array
-
-