Class ExternalCancellationPolicyProvider<C extends CancellationPolicy>
java.lang.Object
com.broadleafcommerce.subscriptionoperation.service.provider.external.AbstractExternalProvider
com.broadleafcommerce.subscriptionoperation.service.provider.external.ExternalCancellationPolicyProvider<C>
- All Implemented Interfaces:
CancellationPolicyProvider<C>
public class ExternalCancellationPolicyProvider<C extends CancellationPolicy>
extends AbstractExternalProvider
implements CancellationPolicyProvider<C>
-
Field Summary
Fields inherited from class com.broadleafcommerce.subscriptionoperation.service.provider.external.AbstractExternalProvider
ENTITY_NOT_FOUND, RSQL_FILTER_PARAM, SANDBOX_AWARE_HEADER -
Constructor Summary
ConstructorsConstructorDescriptionExternalCancellationPolicyProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCancellationPolicyProviderProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.web.util.UriComponentsBuilderGets the base URI common to all requests this provider will make.protected org.springframework.core.ParameterizedTypeReference<ResponsePageGenerator<C>>protected Stringprotected org.springframework.core.ParameterizedTypeReference<C>getType()org.springframework.data.domain.Page<C>readAll(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads allCancellationPoliciesbased on the provided filters and paging.readById(@NonNull String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads aCancellationPolicyby its id.Methods inherited from class com.broadleafcommerce.subscriptionoperation.service.provider.external.AbstractExternalProvider
addOffsetOrPageNumber, buildNotFoundException, executeRequest, getHeaders, getObjectMapper, getTypeFactory, getWebClient, isEntityNotFound, pageableToParams, uriVars
-
Constructor Details
-
ExternalCancellationPolicyProvider
public ExternalCancellationPolicyProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCancellationPolicyProviderProperties properties)
-
-
Method Details
-
readById
public C readById(@NonNull @NonNull String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CancellationPolicyProviderReads aCancellationPolicyby its id.- Specified by:
readByIdin interfaceCancellationPolicyProvider<C extends CancellationPolicy>- Parameters:
id- the id of theCancellationPolicycontextInfo- context information around multi-tenant state- Returns:
- the
CancellationPolicywith the provided id
-
readAll
public org.springframework.data.domain.Page<C> readAll(@Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CancellationPolicyProviderReads allCancellationPoliciesbased on the provided filters and paging.- Specified by:
readAllin interfaceCancellationPolicyProvider<C extends CancellationPolicy>- Parameters:
filters- theNodefilters to applypage- the currentPageablecontextInfo- context information around multi-tenant state- Returns:
- a page of
CancellationPolicies
-
getBaseUri
protected org.springframework.web.util.UriComponentsBuilder getBaseUri()Gets the base URI common to all requests this provider will make.- Returns:
- a URI components builder with the base URI set up
-
getType
-
getPageType
protected org.springframework.core.ParameterizedTypeReference<ResponsePageGenerator<C>> getPageType() -
getServiceClient
-
getProperties
-