Class WebClientExternalSystemContentProvider
- java.lang.Object
-
- com.flowable.engage.external.system.service.WebClientExternalSystemContentProvider
-
- All Implemented Interfaces:
ExternalSystemContentProvider
public class WebClientExternalSystemContentProvider extends Object implements ExternalSystemContentProvider
ExternalSystemContentProviderthat usesWebClientto fetch the external content.- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected StringexternalSystemIdprotected WebClientwebClient
-
Constructor Summary
Constructors Constructor Description WebClientExternalSystemContentProvider(String externalSystemId, WebClient webClient)Create a newExternalSystemContentProviderthat uses a preconfiguredWebClientwith the path to the external content resource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<ResponseEntity<Resource>>getContentData(String businessAccountId, String externalMediaId)Fetch the external media from the external system.StringgetExternalSystemId()Returns the id of the external system implemented by this adapter.
-
-
-
Constructor Detail
-
WebClientExternalSystemContentProvider
public WebClientExternalSystemContentProvider(String externalSystemId, WebClient webClient)
Create a newExternalSystemContentProviderthat uses a preconfiguredWebClientwith the path to the external content resource. The requests will be issued by suffixing thebusinessAccountIdand / or theexternalMediaId- Parameters:
externalSystemId- the id of the external systemwebClient- the preconfigured WebClient
-
-
Method Detail
-
getExternalSystemId
public String getExternalSystemId()
Description copied from interface:ExternalSystemContentProviderReturns the id of the external system implemented by this adapter.- Specified by:
getExternalSystemIdin interfaceExternalSystemContentProvider- Returns:
- the external system id implemented by this adapter
-
getContentData
public reactor.core.publisher.Mono<ResponseEntity<Resource>> getContentData(String businessAccountId, String externalMediaId)
Description copied from interface:ExternalSystemContentProviderFetch the external media from the external system.- Specified by:
getContentDatain interfaceExternalSystemContentProvider- Parameters:
businessAccountId- the id of the business accountexternalMediaId- the id of the content- Returns:
- a mono with the response entity containing the resource for the externalMediaId
-
-