public class RestPagingDataWeaveProvider<C extends RestConnection> extends RestPagingProvider<C>
RestPagingProvider which uses DataWeave to extract the payload and create the list of pages.
Type parameters: RestConnection
RestPagingProvider.PagingContextdefaultMediaType| Constructor and Description |
|---|
RestPagingDataWeaveProvider(Function<C,org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder> requestFactory,
org.mule.runtime.api.metadata.MediaType defaultMediaType,
PagingStrategy pagingStrategy,
org.mule.runtime.api.el.ExpressionLanguage expressionLanguage,
String pageItemsExtractorExpression)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
protected List<org.mule.runtime.api.metadata.TypedValue<String>> |
extractPageItems(org.mule.runtime.api.metadata.TypedValue<String> content,
org.mule.runtime.api.metadata.MediaType defaultMediaType)
Given the raw content response body this method will extract the payload data as a list of items which represent a page.
|
close, getPage, getTotalResults, postProcess, sendpublic RestPagingDataWeaveProvider(Function<C,org.mule.runtime.http.api.domain.message.request.HttpRequestBuilder> requestFactory, org.mule.runtime.api.metadata.MediaType defaultMediaType, PagingStrategy pagingStrategy, org.mule.runtime.api.el.ExpressionLanguage expressionLanguage, String pageItemsExtractorExpression)
requestFactory - a Function to generate the request to be used on each page request. Each invocation should
yield a different instance.defaultMediaType - the MediaType for the page items if the server doesn't specify one.pagingStrategy - the pagination strategy.expressionLanguage - ExpressionLanguage to evaluate the pageItemsExtractorExpression to extract the
pages content from the server's response.pageItemsExtractorExpression - a DataWeave expression to extract the response with the page data.protected List<org.mule.runtime.api.metadata.TypedValue<String>> extractPageItems(org.mule.runtime.api.metadata.TypedValue<String> content, org.mule.runtime.api.metadata.MediaType defaultMediaType)
RestPagingProviderextractPageItems in class RestPagingProvider<C extends RestConnection>content - raw content page as TypedValuedefaultMediaType - the MediaType for the page items if the server doesn't specify one.List> which represents a page with items.Copyright © 2022. All rights reserved.