Class ExternalEntitlementProvider<P extends Entitlement>
java.lang.Object
com.broadleafcommerce.billing.service.provider.external.AbstractExternalProvider
com.broadleafcommerce.subscription.service.provider.external.ExternalEntitlementProvider<P>
- All Implemented Interfaces:
EntitlementProvider<P>
public class ExternalEntitlementProvider<P extends Entitlement>
extends AbstractExternalProvider
implements EntitlementProvider<P>
-
Field Summary
Fields inherited from class com.broadleafcommerce.billing.service.provider.external.AbstractExternalProvider
ENTITY_NOT_FOUND -
Constructor Summary
ConstructorsConstructorDescriptionExternalEntitlementProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalEntitlementProviderProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionprotected ListEntitlementsRequestbuildListEntitlementsRequest(Subscription subscription) protected StringbuildReadEntitlementsUri(ListEntitlementsRequest listEntitlementsRequest, org.springframework.data.domain.Pageable pageable) protected BillingJobPropertiesprotected StringgetPrincipalType(Subscription subscription) protected ExternalEntitlementProviderPropertiesprotected Stringorg.springframework.data.domain.Page<P>readEntitlements(ListEntitlementsRequest listEntitlementsRequest, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves entitlements filtered by the requestorg.springframework.data.domain.Page<P>readEntitlementsBySubscription(Subscription subscription, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves entitlements connected to the subscriptionrevokeEntitlements(RevokeEntitlementsRequest revokeEntitlementsRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Revokes entitlements filtered by the requestrevokeEntitlementsForSubscription(Subscription subscription, Date revokeOn, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Revokes entitlements connected to the subscriptionvoidsetBillingJobProperties(BillingJobProperties billingJobProperties) Methods inherited from class com.broadleafcommerce.billing.service.provider.external.AbstractExternalProvider
addOffsetOrPageNumber, buildNotFoundException, executeRequest, getHeaders, getObjectMapper, getTypeFactory, getWebClient, isEntityNotFound, pageableToParams, uriVars
-
Constructor Details
-
ExternalEntitlementProvider
public ExternalEntitlementProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalEntitlementProviderProperties properties)
-
-
Method Details
-
readEntitlementsBySubscription
public org.springframework.data.domain.Page<P> readEntitlementsBySubscription(Subscription subscription, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:EntitlementProviderRetrieves entitlements connected to the subscription- Specified by:
readEntitlementsBySubscriptionin interfaceEntitlementProvider<P extends Entitlement>
-
readEntitlements
public org.springframework.data.domain.Page<P> readEntitlements(ListEntitlementsRequest listEntitlementsRequest, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:EntitlementProviderRetrieves entitlements filtered by the request- Specified by:
readEntitlementsin interfaceEntitlementProvider<P extends Entitlement>
-
revokeEntitlementsForSubscription
public List<P> revokeEntitlementsForSubscription(Subscription subscription, Date revokeOn, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:EntitlementProviderRevokes entitlements connected to the subscription- Specified by:
revokeEntitlementsForSubscriptionin interfaceEntitlementProvider<P extends Entitlement>
-
revokeEntitlements
public List<P> revokeEntitlements(RevokeEntitlementsRequest revokeEntitlementsRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:EntitlementProviderRevokes entitlements filtered by the request- Specified by:
revokeEntitlementsin interfaceEntitlementProvider<P extends Entitlement>
-
buildListEntitlementsRequest
-
getPrincipalType
-
buildReadEntitlementsUri
protected String buildReadEntitlementsUri(ListEntitlementsRequest listEntitlementsRequest, org.springframework.data.domain.Pageable pageable) -
getServiceClient
-
getProperties
-
getBillingJobProperties
-
setBillingJobProperties
-