Class QuoteEndpoint
java.lang.Object
com.broadleafcommerce.cartoperation.web.endpoint.QuoteEndpoint
Endpoints for Quote.
Note that these endpoints are guarded by the QuoteProperties
.
- Author:
- Kyrylo Boiko (kboiko2)
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionQuoteEndpoint
(CartResolverService cartResolverService, QuoteService quoteService, com.broadleafcommerce.cart.client.properties.QuoteProperties quoteProperties, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected QuoteConfigurationResponse
buildQuotePropertiesResponse
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Builds aQuoteConfigurationResponse
based on the givenContextInfo
.changeQuoteStatus
(QuoteProcessRequest quoteProcessRequest, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) void
deleteQuote
(String id, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected CartResolverService
protected com.broadleafcommerce.cart.client.properties.QuoteProperties
getQuoteProperties
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Endpoint to return quote-related properties based on the given context.protected QuoteService
protected com.broadleafcommerce.common.extension.TypeFactory
protected com.broadleafcommerce.cart.client.domain.Cart
resolveCartForDelete
(@NonNull String cartId, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected com.broadleafcommerce.cart.client.domain.Cart
resolveCartForStatusChange
(@NonNull String cartId, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart>
retrieveQuotes
(com.broadleafcommerce.order.common.domain.CustomerRef customerRef, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Endpoint intended for customers to retrieve their quotes and for CSRs to retrieve a customer's quotes when acting as that customerorg.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart>
retrieveRequestedQuotes
(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Endpoint intended for sales reps to retrieve requested quotes
-
Field Details
-
BASE_URI
- See Also:
-
-
Constructor Details
-
QuoteEndpoint
public QuoteEndpoint(CartResolverService cartResolverService, QuoteService quoteService, com.broadleafcommerce.cart.client.properties.QuoteProperties quoteProperties, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
retrieveQuotes
@Policy(permissionRoots={"CUSTOMER","CUSTOMER_PROFILE","CSR"}) @FrameworkGetMapping public org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart> retrieveQuotes(com.broadleafcommerce.order.common.domain.CustomerRef customerRef, cz.jirutka.rsql.parser.ast.Node filters, @PageableDefault(size=50,sort="createDate",direction=DESC) org.springframework.data.domain.Pageable pageable, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Endpoint intended for customers to retrieve their quotes and for CSRs to retrieve a customer's quotes when acting as that customer -
retrieveRequestedQuotes
@Policy(permissionRoots="PUBLISH_QUOTE") @FrameworkGetMapping(params="requested") public org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart> retrieveRequestedQuotes(cz.jirutka.rsql.parser.ast.Node filters, @PageableDefault(size=50,sort="createDate",direction=DESC) org.springframework.data.domain.Pageable pageable, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Endpoint intended for sales reps to retrieve requested quotes -
changeQuoteStatus
@FrameworkPostMapping(value="/{id}/status", consumes="application/json") public QuoteProcessResponse changeQuoteStatus(@RequestBody QuoteProcessRequest quoteProcessRequest, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
deleteQuote
@Policy(permissionRoots="PUBLISH_QUOTE") @FrameworkDeleteMapping("/{id}") public void deleteQuote(@PathVariable("id") String id, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getQuoteProperties
@FrameworkGetMapping(value="/properties", produces="application/json") public QuoteConfigurationResponse getQuoteProperties(@ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Endpoint to return quote-related properties based on the given context.Sensitive information should not be returned
- Parameters:
contextInfo
- the context to get the properties for- Returns:
- quote-related properties based on the given context
-
resolveCartForDelete
-
resolveCartForStatusChange
protected com.broadleafcommerce.cart.client.domain.Cart resolveCartForStatusChange(@NonNull @NonNull String cartId, @Nullable Integer cartVersion, @Nullable com.broadleafcommerce.order.common.domain.CustomerRef customer, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
buildQuotePropertiesResponse
protected QuoteConfigurationResponse buildQuotePropertiesResponse(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Builds aQuoteConfigurationResponse
based on the givenContextInfo
.- Parameters:
contextInfo
- the context to get the properties for- Returns:
- a
QuoteConfigurationResponse
based on the givenContextInfo
-
getCartResolverService
-
getQuoteService
-
getQuoteProperties
protected com.broadleafcommerce.cart.client.properties.QuoteProperties getQuoteProperties() -
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-