Class ExternalOrderProvider<O extends com.broadleafcommerce.order.client.domain.Order>
- java.lang.Object
 - 
- com.broadleafcommerce.orderoperation.service.provider.external.AbstractExternalProvider
 - 
- com.broadleafcommerce.orderoperation.service.provider.external.ExternalOrderProvider<O>
 
 
 
- 
- All Implemented Interfaces:
 OrderProvider<O>
public class ExternalOrderProvider<O extends com.broadleafcommerce.order.client.domain.Order> extends AbstractExternalProvider implements OrderProvider<O>
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected static StringORDER_CLIENT_IDDeprecated.protected static StringREAD_BY_CART_ID_SEGMENTprotected static StringREAD_BY_ORDER_NUMBER_SEGMENT- 
Fields inherited from class com.broadleafcommerce.orderoperation.service.provider.external.AbstractExternalProvider
RSQL_FILTER_PARAM 
 - 
 
- 
Constructor Summary
Constructors Constructor Description ExternalOrderProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalOrderProperties properties) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Ocreate(O order, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Creates aOrder.voiddelete(String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Deletes aOrderwith the given ID.protected org.springframework.web.util.UriComponentsBuildergetBaseUri()Gets the base URI common to all requests this provider will make.protected org.springframework.web.util.UriComponentsBuildergetMatchingTenantUri()Gets the base URI for requesting an order matching tenantprotected ExternalOrderPropertiesgetProperties()protected StringgetServiceClient()org.springframework.data.domain.Page<O>readAll(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Retrieve allOrders.Optional<O>readByCartId(@NonNull String cartId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Retrieve theOrderwith the given cart ID.OreadById(@NonNull String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Retrieve theOrderwith the given ID.OreadByIdMatchingTenant(@NonNull String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Retrieve theOrderwith the given ID, ignoring its application as long as it's in the current tenant context.OreadByOrderNumber(@NonNull String orderNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Retrieve theOrderwith the given order number.OreadOwnedById(@NonNull String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Retrieve theOrderwith the given ID, validating ownership if necessary.Oupdate(O order, String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Update theOrderwith the given ID.- 
Methods inherited from class com.broadleafcommerce.orderoperation.service.provider.external.AbstractExternalProvider
executeRequest, getHeaders, getObjectMapper, getTypeFactory, getWebClient, pageableToParams 
 - 
 
 - 
 
- 
- 
Field Detail
- 
READ_BY_CART_ID_SEGMENT
protected static final String READ_BY_CART_ID_SEGMENT
- See Also:
 - Constant Field Values
 
 
- 
READ_BY_ORDER_NUMBER_SEGMENT
protected static final String READ_BY_ORDER_NUMBER_SEGMENT
- See Also:
 - Constant Field Values
 
 
- 
ORDER_CLIENT_ID
@Deprecated protected static final String ORDER_CLIENT_ID
Deprecated.- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
ExternalOrderProvider
public ExternalOrderProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalOrderProperties properties) 
 - 
 
- 
Method Detail
- 
readAll
public org.springframework.data.domain.Page<O> readAll(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:OrderProviderRetrieve allOrders.- Specified by:
 readAllin interfaceOrderProvider<O extends com.broadleafcommerce.order.client.domain.Order>- Parameters:
 filters- the list of filters to apply to this querypage- the requested page of results from the databasecontextInfo- context information around sandbox and multitenant state.- Returns:
 - the order with the given ID
 
 
- 
readById
public O readById(@NonNull @NonNull String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:OrderProviderRetrieve theOrderwith the given ID.- Specified by:
 readByIdin interfaceOrderProvider<O extends com.broadleafcommerce.order.client.domain.Order>- Parameters:
 orderId- the ID of the order to retrievecontextInfo- context information around sandbox and multitenant state.- Returns:
 - the order with the given ID
 
 
- 
readByIdMatchingTenant
public O readByIdMatchingTenant(@NonNull @NonNull String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:OrderProviderRetrieve theOrderwith the given ID, ignoring its application as long as it's in the current tenant context.- Specified by:
 readByIdMatchingTenantin interfaceOrderProvider<O extends com.broadleafcommerce.order.client.domain.Order>- Parameters:
 orderId- the ID of the order to retrievecontextInfo- context information around sandbox and multitenant state.- Returns:
 - the order with the given ID
 
 
- 
readOwnedById
@Policy(identityTypes={OWNER,ADMIN}, operationTypes=READ) public O readOwnedById(@NonNull @NonNull String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Description copied from interface:OrderProviderRetrieve theOrderwith the given ID, validating ownership if necessary.- Specified by:
 readOwnedByIdin interfaceOrderProvider<O extends com.broadleafcommerce.order.client.domain.Order>- Parameters:
 orderId- the ID of the order to retrievecontextInfo- context information around sandbox and multitenant state.- Returns:
 - the order with the given ID
 
 
- 
readByCartId
public Optional<O> readByCartId(@NonNull @NonNull String cartId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:OrderProviderRetrieve theOrderwith the given cart ID.- Specified by:
 readByCartIdin interfaceOrderProvider<O extends com.broadleafcommerce.order.client.domain.Order>- Parameters:
 cartId- the cart ID of the order to retrievecontextInfo- context information around sandbox and multitenant state.- Returns:
 - the order with the given cart ID
 
 
- 
readByOrderNumber
public O readByOrderNumber(@NonNull @NonNull String orderNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:OrderProviderRetrieve theOrderwith the given order number.- Specified by:
 readByOrderNumberin interfaceOrderProvider<O extends com.broadleafcommerce.order.client.domain.Order>- Parameters:
 orderNumber- the order number of the order to retrievecontextInfo- context information around sandbox and multitenant state.- Returns:
 - the order with the given order number
 
 
- 
update
public O update(O order, String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:OrderProviderUpdate theOrderwith the given ID.- Specified by:
 updatein interfaceOrderProvider<O extends com.broadleafcommerce.order.client.domain.Order>- Parameters:
 order- the order to update withorderId- the ID of the order to retrievecontextInfo- context information around sandbox and multitenant state.- Returns:
 - the updated order with the given ID
 
 
- 
create
public O create(O order, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:OrderProviderCreates aOrder.- Specified by:
 createin interfaceOrderProvider<O extends com.broadleafcommerce.order.client.domain.Order>- Parameters:
 order- the order to replace withcontextInfo- context information around sandbox and multitenant state.- Returns:
 - the created order
 
 
- 
delete
public void delete(String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:OrderProviderDeletes aOrderwith the given ID.- Specified by:
 deletein interfaceOrderProvider<O extends com.broadleafcommerce.order.client.domain.Order>- Parameters:
 orderId- the ID of the order to deletecontextInfo- context information around sandbox and multitenant state.
 
- 
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
 
 
- 
getMatchingTenantUri
protected org.springframework.web.util.UriComponentsBuilder getMatchingTenantUri()
Gets the base URI for requesting an order matching tenant- Returns:
 - a URI components builder with the order matching tenant URI
 
 
- 
getServiceClient
protected String getServiceClient()
 
- 
getProperties
protected ExternalOrderProperties getProperties()
 
 - 
 
 -