@@ -102,6 +102,7 @@ public class AmpRequestFactory {
102102 private final DebugResolver debugResolver ;
103103 private final JacksonMapper mapper ;
104104 private final GeoLocationServiceWrapper geoLocationServiceWrapper ;
105+ private final TcfDefinerService tcfDefinerService ;
105106
106107 public AmpRequestFactory (Ortb2RequestFactory ortb2RequestFactory ,
107108 StoredRequestProcessor storedRequestProcessor ,
@@ -115,7 +116,8 @@ public AmpRequestFactory(Ortb2RequestFactory ortb2RequestFactory,
115116 AmpPrivacyContextFactory ampPrivacyContextFactory ,
116117 DebugResolver debugResolver ,
117118 JacksonMapper mapper ,
118- GeoLocationServiceWrapper geoLocationServiceWrapper ) {
119+ GeoLocationServiceWrapper geoLocationServiceWrapper ,
120+ TcfDefinerService tcfDefinerService ) {
119121
120122 this .ortb2RequestFactory = Objects .requireNonNull (ortb2RequestFactory );
121123 this .storedRequestProcessor = Objects .requireNonNull (storedRequestProcessor );
@@ -130,6 +132,7 @@ public AmpRequestFactory(Ortb2RequestFactory ortb2RequestFactory,
130132 this .ampPrivacyContextFactory = Objects .requireNonNull (ampPrivacyContextFactory );
131133 this .mapper = Objects .requireNonNull (mapper );
132134 this .geoLocationServiceWrapper = Objects .requireNonNull (geoLocationServiceWrapper );
135+ this .tcfDefinerService = Objects .requireNonNull (tcfDefinerService );
133136 }
134137
135138 /**
@@ -217,7 +220,7 @@ private Future<BidRequest> parseBidRequest(AuctionContext auctionContext, HttpRe
217220 return Future .succeededFuture (bidRequest );
218221 }
219222
220- private static ConsentParam consentParamFromQueryStringParams (HttpRequestContext httpRequest ) {
223+ private ConsentParam consentParamFromQueryStringParams (HttpRequestContext httpRequest ) {
221224 final ConsentType specifiedConsentType = ConsentType .from (httpRequest .getQueryParams ().get (CONSENT_TYPE_PARAM ));
222225 final CaseInsensitiveMultiMap queryParams = httpRequest .getQueryParams ();
223226
@@ -229,12 +232,12 @@ private static ConsentParam consentParamFromQueryStringParams(HttpRequestContext
229232 : toConsentParam (gdprConsentParam , GDPR_CONSENT_PARAM , specifiedConsentType );
230233 }
231234
232- private static ConsentParam toConsentParam (String consent , String fromParam , ConsentType specifiedConsentType ) {
235+ private ConsentParam toConsentParam (String consent , String fromParam , ConsentType specifiedConsentType ) {
233236 return ConsentParam .of (
234237 consent ,
235238 fromParam ,
236239 specifiedConsentType ,
237- TcfDefinerService .isConsentStringValid (consent ),
240+ tcfDefinerService .isConsentStringValid (consent ),
238241 Ccpa .isValid (consent ));
239242 }
240243
@@ -259,10 +262,10 @@ private static Site createSite(HttpRequestContext httpRequest) {
259262
260263 return !StringUtils .isAllBlank (accountId , canonicalUrl , domain )
261264 ? Site .builder ()
262- .publisher (Publisher .builder ().id (accountId ).build ())
263- .page (canonicalUrl )
264- .domain (domain )
265- .build ()
265+ .publisher (Publisher .builder ().id (accountId ).build ())
266+ .page (canonicalUrl )
267+ .domain (domain )
268+ .build ()
266269 : null ;
267270 }
268271
@@ -278,9 +281,9 @@ private static User createUser(ConsentParam consentParam, String addtlConsent) {
278281
279282 final ExtUser extUser = consentedProvidersSettings != null
280283 ? ExtUser .builder ()
281- .deprecatedConsentedProvidersSettings (consentedProvidersSettings )
282- .consentedProvidersSettings (consentedProvidersSettings )
283- .build ()
284+ .deprecatedConsentedProvidersSettings (consentedProvidersSettings )
285+ .consentedProvidersSettings (consentedProvidersSettings )
286+ .build ()
284287 : null ;
285288
286289 return User .builder ().consent (consent ).ext (extUser ).build ();
@@ -301,12 +304,12 @@ private static Regs createRegs(ConsentParam consentParam,
301304
302305 return gdpr != null || usPrivacy != null || gppSid != null || gpp != null || gpc != null
303306 ? Regs .builder ()
304- .gdpr (gdpr )
305- .usPrivacy (usPrivacy )
306- .gppSid (gppSid )
307- .gpp (gpp )
308- .ext (gpc != null ? ExtRegs .of (null , null , gpc , null ) : null )
309- .build ()
307+ .gdpr (gdpr )
308+ .usPrivacy (usPrivacy )
309+ .gppSid (gppSid )
310+ .gpp (gpp )
311+ .ext (gpc != null ? ExtRegs .of (null , null , gpc , null ) : null )
312+ .build ()
310313 : null ;
311314 }
312315
@@ -359,8 +362,8 @@ private GppSidExtraction gppSidFromQueryStringParams(HttpRequestContext httpRequ
359362 try {
360363 final List <Integer > gppSid = StringUtils .isNotBlank (gppSidParam )
361364 ? Arrays .stream (gppSidParam .split ("," ))
362- .map (Integer ::valueOf )
363- .toList ()
365+ .map (Integer ::valueOf )
366+ .toList ()
364367 : null ;
365368
366369 return GppSidExtraction .success (gppSid );
0 commit comments