Interface VendorConsent

    • Method Detail

      • getVersion

        int getVersion()
        Returns:
        the version of consent string format
      • getConsentRecordCreated

        Instant getConsentRecordCreated()
        Returns:
        the Instant at which the consent string was created
      • getConsentRecordLastUpdated

        Instant getConsentRecordLastUpdated()
        Returns:
        the Instant at 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