Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ private static boolean checkKnownChildSensitiveDataConsents(USNatGppReader gppRe

return equalsAtIndex(KnownChildSensitiveDataConsent.NO_CONSENT, knownChildSensitiveDataConsents, 0)
|| equalsAtIndex(KnownChildSensitiveDataConsent.NO_CONSENT, knownChildSensitiveDataConsents, 1)
|| equalsAtIndex(KnownChildSensitiveDataConsent.NO_CONSENT, knownChildSensitiveDataConsents, 2)
|| equalsAtIndex(KnownChildSensitiveDataConsent.CONSENT, knownChildSensitiveDataConsents, 1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ private static boolean checkKnownChildSensitiveDataConsents(USNatGppReader gppRe

return equalsAtIndex(KnownChildSensitiveDataConsent.NO_CONSENT, knownChildSensitiveDataConsents, 0)
|| equalsAtIndex(KnownChildSensitiveDataConsent.NO_CONSENT, knownChildSensitiveDataConsents, 1)
|| equalsAtIndex(KnownChildSensitiveDataConsent.NO_CONSENT, knownChildSensitiveDataConsents, 2)
|| equalsAtIndex(KnownChildSensitiveDataConsent.CONSENT, knownChildSensitiveDataConsents, 1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@

public class USNatTransmitUfpd implements PrivacyModule, Loggable {

private static final Set<Integer> SENSITIVE_DATA_INDICES_SET_1 = Set.of(0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11);
private static final Set<Integer> SENSITIVE_DATA_INDICES_SET_2 = Set.of(0, 1, 2, 3, 4, 10);
private static final Set<Integer> SENSITIVE_DATA_INDICES_SET_3 = Set.of(5, 6, 8, 9, 11);
private static final Set<Integer> SENSITIVE_DATA_INDICES_SET_1 = Set.of(
0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15);
private static final Set<Integer> SENSITIVE_DATA_INDICES_SET_2 = Set.of(0, 1, 2, 3, 4, 10, 12, 14);
private static final Set<Integer> SENSITIVE_DATA_INDICES_SET_3 = Set.of(5, 6, 8, 9, 11, 13, 15);

private final USNatGppReader gppReader;
private final Result result;
Expand Down Expand Up @@ -125,6 +126,7 @@ private static boolean checkKnownChildSensitiveDataConsents(USNatGppReader gppRe

return equalsAtIndex(KnownChildSensitiveDataConsent.NO_CONSENT, knownChildSensitiveDataConsents, 0)
|| equalsAtIndex(KnownChildSensitiveDataConsent.NO_CONSENT, knownChildSensitiveDataConsents, 1)
|| equalsAtIndex(KnownChildSensitiveDataConsent.NO_CONSENT, knownChildSensitiveDataConsents, 2)
|| equalsAtIndex(KnownChildSensitiveDataConsent.CONSENT, knownChildSensitiveDataConsents, 1);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.prebid.server.functional.model.privacy.gpp

import com.fasterxml.jackson.annotation.JsonValue

enum GpcSubsectionType {

CORE(0),
GPC(1)

@JsonValue
final int value

GpcSubsectionType(int value) {
this.value = value
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.prebid.server.functional.model.privacy.gpp

import com.fasterxml.jackson.annotation.JsonValue

enum GppDataActivity {

NOT_APPLICABLE(0),
NO_CONSENT(1),
CONSENT(2)

@JsonValue
final int value

GppDataActivity(int value) {
this.value = value
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.prebid.server.functional.model.privacy.gpp

import com.fasterxml.jackson.annotation.JsonValue

enum MspaMode {

NOT_APPLICABLE(0),
YES(1),
NO(2)

@JsonValue
final int value

MspaMode(int value) {
this.value = value
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.prebid.server.functional.model.privacy.gpp

import com.fasterxml.jackson.annotation.JsonValue

enum Notice {

NOT_APPLICABLE(0),
PROVIDED(1),
NOT_PROVIDED(2)

@JsonValue
final int value

Notice(int value) {
this.value = value
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.prebid.server.functional.model.privacy.gpp

import com.fasterxml.jackson.annotation.JsonValue

enum OptOut {

NOT_APPLICABLE(0),
OPTED_OUT(1),
DID_NOT_OPT_OUT(2)

@JsonValue
final int value

OptOut(int value) {
this.value = value
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package org.prebid.server.functional.model.privacy.gpp

import org.prebid.server.functional.util.PBSUtils

class UsCaliforniaV1ChildSensitiveData {

GppDataActivity childUnder13
GppDataActivity childFrom13to16

static UsCaliforniaV1ChildSensitiveData getDefault(GppDataActivity childUnder13 = GppDataActivity.NOT_APPLICABLE,
GppDataActivity childFrom13to16 = GppDataActivity.NOT_APPLICABLE) {

new UsCaliforniaV1ChildSensitiveData().tap {
it.childUnder13 = childUnder13
it.childFrom13to16 = childFrom13to16
}
}

static UsCaliforniaV1ChildSensitiveData getRandom(List<GppDataActivity> excludedActivities) {
new UsCaliforniaV1ChildSensitiveData().tap {
it.childUnder13 = PBSUtils.getRandomEnum(GppDataActivity, excludedActivities)
it.childFrom13to16 = PBSUtils.getRandomEnum(GppDataActivity, excludedActivities)
}
}

List<Integer> getContentList() {
[childFrom13to16, childUnder13]*.value.collect { it ?: 0 }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.prebid.server.functional.model.privacy.gpp

class UsCaliforniaV1SensitiveData {

GppDataActivity idNumbers
GppDataActivity accountInfo
GppDataActivity geolocation
GppDataActivity racialEthnicOrigin
GppDataActivity communicationContents
GppDataActivity geneticId
GppDataActivity biometricId
GppDataActivity healthInfo
GppDataActivity orientation

List<Integer> getContentList() {
[idNumbers, accountInfo, geolocation, racialEthnicOrigin,
communicationContents, geneticId, biometricId, healthInfo, orientation]*.value.collect { it ?: 0 }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.prebid.server.functional.model.privacy.gpp

import org.prebid.server.functional.util.PBSUtils

class UsColoradoV1ChildSensitiveData {

GppDataActivity childSensitive

static UsColoradoV1ChildSensitiveData getDefault(GppDataActivity childSensitive = GppDataActivity.NOT_APPLICABLE) {
new UsColoradoV1ChildSensitiveData().tap {
it.childSensitive = childSensitive
}
}

static UsColoradoV1ChildSensitiveData getRandom(List<GppDataActivity> excludedActivities) {
new UsColoradoV1ChildSensitiveData().tap {
it.childSensitive = PBSUtils.getRandomEnum(GppDataActivity, excludedActivities)
}
}

Integer getContentList() {
this.childSensitive.value
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.prebid.server.functional.model.privacy.gpp

class UsColoradoV1SensitiveData {

GppDataActivity racialEthnicOrigin
GppDataActivity religiousBeliefs
GppDataActivity healthInfo
GppDataActivity orientation
GppDataActivity citizenshipStatus
GppDataActivity geneticId
GppDataActivity biometricId

List<Integer> getContentList() {
[racialEthnicOrigin, religiousBeliefs, healthInfo, orientation,
citizenshipStatus, geneticId, biometricId]*.value.collect { it ?: 0 }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package org.prebid.server.functional.model.privacy.gpp

import org.prebid.server.functional.util.PBSUtils

class UsConnecticutV1ChildSensitiveData {

GppDataActivity childUnder13
GppDataActivity childFrom13to16
GppDataActivity childFrom16to18

static UsConnecticutV1ChildSensitiveData getDefault(GppDataActivity childUnder13 = GppDataActivity.NOT_APPLICABLE,
GppDataActivity childFrom13to16 = GppDataActivity.NOT_APPLICABLE,
GppDataActivity childFrom16to18 = GppDataActivity.NOT_APPLICABLE) {

new UsConnecticutV1ChildSensitiveData().tap {
it.childUnder13 = childUnder13
it.childFrom13to16 = childFrom13to16
it.childFrom16to18 = childFrom16to18
}
}

static UsConnecticutV1ChildSensitiveData getRandom(List<GppDataActivity> excludedActivities = []) {
new UsConnecticutV1ChildSensitiveData().tap {
it.childUnder13 = PBSUtils.getRandomEnum(GppDataActivity, excludedActivities)
it.childFrom13to16 = PBSUtils.getRandomEnum(GppDataActivity, excludedActivities)
it.childFrom16to18 = PBSUtils.getRandomEnum(GppDataActivity, excludedActivities)
}
}

List<Integer> getContentList() {
[childFrom13to16, childUnder13, childFrom16to18]*.value.collect { it ?: 0 }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.prebid.server.functional.model.privacy.gpp

class UsConnecticutV1SensitiveData {

GppDataActivity racialEthnicOrigin
GppDataActivity religiousBeliefs
GppDataActivity healthInfo
GppDataActivity orientation
GppDataActivity citizenshipStatus
GppDataActivity geneticId
GppDataActivity biometricId
GppDataActivity geolocation
GppDataActivity idNumbers

List<Integer> getContentList() {
[racialEthnicOrigin, religiousBeliefs, healthInfo, orientation,
citizenshipStatus, geneticId, biometricId, geolocation, idNumbers]*.value.collect { it ?: 0 }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package org.prebid.server.functional.model.privacy.gpp

import org.prebid.server.functional.util.PBSUtils

class UsNationalV1ChildSensitiveData {

GppDataActivity childUnder13
GppDataActivity childFrom13to16

static UsNationalV1ChildSensitiveData getDefault(GppDataActivity childUnder13 = GppDataActivity.NOT_APPLICABLE,
GppDataActivity childFrom13to16 = GppDataActivity.NOT_APPLICABLE) {

new UsNationalV1ChildSensitiveData().tap {
it.childUnder13 = childUnder13
it.childFrom13to16 = childFrom13to16
}
}

static UsNationalV1ChildSensitiveData getRandom(List<GppDataActivity> excludedActivities) {
new UsNationalV1ChildSensitiveData().tap {
it.childUnder13 = PBSUtils.getRandomEnum(GppDataActivity, excludedActivities)
it.childFrom13to16 = PBSUtils.getRandomEnum(GppDataActivity, excludedActivities)
}
}

List<Integer> getContentList() {
[childFrom13to16, childUnder13]*.value.collect { it ?: 0 }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package org.prebid.server.functional.model.privacy.gpp

class UsNationalV1SensitiveData {

GppDataActivity racialEthnicOrigin
GppDataActivity religiousBeliefs
GppDataActivity healthInfo
GppDataActivity orientation
GppDataActivity citizenshipStatus
GppDataActivity geneticId
GppDataActivity biometricId
GppDataActivity geolocation
GppDataActivity idNumbers
GppDataActivity accountInfo
GppDataActivity unionMembership
GppDataActivity communicationContents

List<Integer> getContentList() {
[racialEthnicOrigin, religiousBeliefs, healthInfo, orientation,
citizenshipStatus, geneticId, biometricId, geolocation,
idNumbers, accountInfo, unionMembership, communicationContents]*.value.collect { it ?: 0 }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package org.prebid.server.functional.model.privacy.gpp

import org.prebid.server.functional.util.PBSUtils

class UsNationalV2ChildSensitiveData extends UsNationalV1ChildSensitiveData {

GppDataActivity childFrom16to17

static UsNationalV2ChildSensitiveData getDefault(GppDataActivity childUnder13 = GppDataActivity.NOT_APPLICABLE,
GppDataActivity childFrom13to16 = GppDataActivity.NOT_APPLICABLE,
GppDataActivity childFrom16to17 = GppDataActivity.NOT_APPLICABLE) {

new UsNationalV2ChildSensitiveData().tap {
it.childUnder13 = childUnder13
it.childFrom13to16 = childFrom13to16
it.childFrom16to17 = childFrom16to17
}
}

static UsNationalV2ChildSensitiveData getRandom(List<GppDataActivity> excludedActivities) {
new UsNationalV2ChildSensitiveData().tap {
it.childUnder13 = PBSUtils.getRandomEnum(GppDataActivity, excludedActivities)
it.childFrom13to16 = PBSUtils.getRandomEnum(GppDataActivity, excludedActivities)
it.childFrom16to17 = PBSUtils.getRandomEnum(GppDataActivity, excludedActivities)
}
}

List<Integer> getContentList() {
[childFrom13to16, childUnder13, childFrom16to17]*.value.collect { it ?: 0 }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.prebid.server.functional.model.privacy.gpp

class UsNationalV2SensitiveData extends UsNationalV1SensitiveData {

GppDataActivity consumerHealthData
GppDataActivity crimeVictim
GppDataActivity nationalOrigin
GppDataActivity transgenderStatus

@Override
List<Integer> getContentList() {
[racialEthnicOrigin, religiousBeliefs, healthInfo, orientation,
citizenshipStatus, geneticId, biometricId, geolocation,
idNumbers, accountInfo, unionMembership, communicationContents,
consumerHealthData, crimeVictim, nationalOrigin, transgenderStatus]*.value.collect { it ?: 0 }
}
}
Loading
Loading