Class TppConnectorImpl
java.lang.Object
it.gov.pagopa.onboarding.citizen.connector.tpp.TppConnectorImpl
- All Implemented Interfaces:
TppConnector
Reactive TppConnector implementation using Spring WebClient
to fetch Third Party Provider (TPP) data from a remote service.
-
Constructor Summary
ConstructorsConstructorDescriptionTppConnectorImpl(org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder, String baseUrl) Constructs the connector initializing the WebClient with the provided base URL. -
Method Summary
Modifier and TypeMethodDescriptionfilterEnabledList(TppIdList tppIdList) Retrieves TPPs with recipientId on the whitelist and enabled TPPs from a list of TPP identifiers.reactor.core.publisher.Mono<TppDTO> Retrieves the TPP associated with the provided identifier.
-
Constructor Details
-
TppConnectorImpl
public TppConnectorImpl(org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder, @Value("${rest-client.tpp.baseUrl}") String baseUrl) Constructs the connector initializing the WebClient with the provided base URL.
- Parameters:
webClientBuilder- Spring-injected builder to create WebClient instancesbaseUrl- remote TPP service base URL (property:rest-client.tpp.baseUrl)
-
-
Method Details
-
get
Retrieves the TPP associated with the provided identifier.
Performs a reactive HTTP GET to
/emd/tpp/{tppId}.- Specified by:
getin interfaceTppConnector- Parameters:
tppId- technical or functional identifier of the TPP- Returns:
Mono<TppDTO>emitting the found DTO orMono.empty()if missing
-
filterEnabledList
Retrieves TPPs with recipientId on the whitelist and enabled TPPs from a list of TPP identifiers.
Delegates to the emd-tpp service filtering endpoint.
Performs a reactive HTTP POST to
/emd/tpp/listwith the provided TPP IDs and recipientId.- Specified by:
filterEnabledListin interfaceTppConnector- Parameters:
tppIdList- the list of TPP IDs to filter and the recipientId for whitelist filtering- Returns:
Mono<List<TppDTO>>list of enabled TPPs matching the provided IDs
-