Class DefaultQuoteFacade
java.lang.Object
de.hybris.platform.commercefacades.order.impl.DefaultQuoteFacade
- All Implemented Interfaces:
QuoteFacade
Default implementation of
QuoteFacade.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptAndPrepareCheckout(String quoteCode) Prepare a quote to make checkout.voidaddComment(String text) Adds a comment to the session cart.voidaddEntryComment(long entryNumber, String text) Method for adding a comment to a quote entryvoidapplyQuoteDiscount(Double discountRate, String discountTypeCode) Applies the discount to the session cart given the discount and it's type.voidapproveQuote(String quoteCode) Approve an existing quote.voidcancelQuote(String quoteCode) Cancels a quote.createCartFromQuote(String quoteCode) Creates a new cart data from an existing quote.voidenableQuoteEdit(String quoteCode) Activate quote and set it to edit mode.getAllowedActions(String quoteCode) Gets the set of allowed actions for the given quote.protected BaseStoreServiceprotected CartServiceprotected CommerceCartServiceprotected CommerceCommentServiceprotected CommerceQuoteServiceDeprecated, for removal: This API element is subject to removal in a future version.Since 6.4.protected AbstractOrderEntryModelgetEntryForEntryNumber(AbstractOrderModel order, int number) protected ModelServicegetPagedQuotes(PageableData pageableData) Retrieves the paged list of quotes for the current user and the current base store.protected Converter<QuoteModel,QuoteData> getQuoteForCode(String quoteCode) Retrieve the latest snapshot (version) of a quote by its code, for the current user and current base store.protected QuoteModelgetQuoteModelForCode(String quoteCode) doublegetQuoteRequestThreshold(String quoteCode) Gets quote threshold configured for the initial request, and the quote requires threshold validation.Gets the number of quotes for the current userprotected QuoteServiceprotected QuoteUserIdentificationStrategyprotected UserServiceCreates a new Quote for the current user, based on what is on the session.booleanValidates if the session quote cart can be checked-out or notnewCart()Sync quote and close edit mode.voidrejectQuote(String quoteCode) Reject an existing quote.voidremoveQuoteCart(String quoteCode) Removes the cart related to the given quoteRe-quote from the existing quote to create a new quotevoidsetBaseStoreService(BaseStoreService baseStoreService) voidsetCartConverter(Converter<CartModel, CartData> cartConverter) voidsetCartService(CartService cartService) voidsetCommerceCartService(CommerceCartService commerceCartService) voidsetCommerceCommentService(CommerceCommentService commerceCommentService) voidsetCommerceQuoteService(CommerceQuoteService commerceQuoteService) voidsetEnumerationService(EnumerationService enumerationService) voidsetModelService(ModelService modelService) voidsetQuoteConverter(Converter<QuoteModel, QuoteData> quoteConverter) voidsetQuoteService(QuoteService quoteService) voidsetQuoteUserIdentificationStrategy(QuoteUserIdentificationStrategy quoteUserIdentificationStrategy) voidsetTypeService(TypeService typeService) voidsetUserService(UserService userService) voidsubmitQuote(String quoteCode) Submits an existing quote.protected voidvalidateQuoteCart(CartModel cartModel)
-
Constructor Details
-
DefaultQuoteFacade
public DefaultQuoteFacade()
-
-
Method Details
-
initiateQuote
Description copied from interface:QuoteFacadeCreates a new Quote for the current user, based on what is on the session.- Specified by:
initiateQuotein interfaceQuoteFacade- Returns:
- the newly created quote
-
createCartFromQuote
Description copied from interface:QuoteFacadeCreates a new cart data from an existing quote. Cart is linked to the quote.- Specified by:
createCartFromQuotein interfaceQuoteFacade- Parameters:
quoteCode- the code of the quote that will generate the cart- Returns:
- the newly created cart
-
enableQuoteEdit
Description copied from interface:QuoteFacadeActivate quote and set it to edit mode.- Specified by:
enableQuoteEditin interfaceQuoteFacade- Parameters:
quoteCode- the code of the quote to process
-
newCart
Description copied from interface:QuoteFacadeSync quote and close edit mode.- Specified by:
newCartin interfaceQuoteFacade- Returns:
- the updated QuoteData object
-
submitQuote
Description copied from interface:QuoteFacadeSubmits an existing quote.- Specified by:
submitQuotein interfaceQuoteFacade- Parameters:
quoteCode- the code of the quote to process
-
getQuoteRequestThreshold
Description copied from interface:QuoteFacadeGets quote threshold configured for the initial request, and the quote requires threshold validation.- Specified by:
getQuoteRequestThresholdin interfaceQuoteFacade- Returns:
- The (positive) threshold value; 0, if none configured; or a negative number, if quote does not need threshold validation.
-
approveQuote
Description copied from interface:QuoteFacadeApprove an existing quote.- Specified by:
approveQuotein interfaceQuoteFacade- Parameters:
quoteCode- the code of the quote to process
-
rejectQuote
Description copied from interface:QuoteFacadeReject an existing quote.- Specified by:
rejectQuotein interfaceQuoteFacade- Parameters:
quoteCode- the code of the quote to process
-
acceptAndPrepareCheckout
Description copied from interface:QuoteFacadePrepare a quote to make checkout.- Specified by:
acceptAndPrepareCheckoutin interfaceQuoteFacade- Parameters:
quoteCode- the code of the quote to process
-
getPagedQuotes
Description copied from interface:QuoteFacadeRetrieves the paged list of quotes for the current user and the current base store.- Specified by:
getPagedQuotesin interfaceQuoteFacade- Parameters:
pageableData- paging information- Returns:
- the paged search results
-
getQuoteModelForCode
-
getQuoteForCode
Description copied from interface:QuoteFacadeRetrieve the latest snapshot (version) of a quote by its code, for the current user and current base store.- Specified by:
getQuoteForCodein interfaceQuoteFacade- Parameters:
quoteCode- The code of the quote- Returns:
- the latest snapshot of the quote
-
addComment
Description copied from interface:QuoteFacadeAdds a comment to the session cart.- Specified by:
addCommentin interfaceQuoteFacade- Parameters:
text- the comment to be added to the quote
-
addEntryComment
Description copied from interface:QuoteFacadeMethod for adding a comment to a quote entry- Specified by:
addEntryCommentin interfaceQuoteFacade- Parameters:
entryNumber- the entry numbertext- the comment to be added to the order entry
-
getAllowedActions
Description copied from interface:QuoteFacadeGets the set of allowed actions for the given quote.- Specified by:
getAllowedActionsin interfaceQuoteFacade- Parameters:
quoteCode- the code of the quote- Returns:
- the set of actions allowed for the quote. Empty set will be returned if none of the action is allowed.
-
applyQuoteDiscount
Description copied from interface:QuoteFacadeApplies the discount to the session cart given the discount and it's type.- Specified by:
applyQuoteDiscountin interfaceQuoteFacade- Parameters:
discountRate- the discount rate to be applieddiscountTypeCode- the code of the discount type to be applied
-
getDiscountTypes
Deprecated, for removal: This API element is subject to removal in a future version.Since 6.4.Description copied from interface:QuoteFacadeGet discount types ready to be applied for discount.- Specified by:
getDiscountTypesin interfaceQuoteFacade- Returns:
- the list of discount types to be applied for quote. Empty list will be returned if nothing can be applied.
-
cancelQuote
Description copied from interface:QuoteFacadeCancels a quote. The version of the quote visible to the user will have the state set to canceled.- Specified by:
cancelQuotein interfaceQuoteFacade- Parameters:
quoteCode- the code of the quote to cancel
-
getQuotesCountForCurrentUser
Description copied from interface:QuoteFacadeGets the number of quotes for the current user- Specified by:
getQuotesCountForCurrentUserin interfaceQuoteFacade- Returns:
- the number of quotes
-
isQuoteSessionCartValidForCheckout
public boolean isQuoteSessionCartValidForCheckout()Description copied from interface:QuoteFacadeValidates if the session quote cart can be checked-out or not- Specified by:
isQuoteSessionCartValidForCheckoutin interfaceQuoteFacade- Returns:
- true if it's valid for checkout, false otherwise
-
removeQuoteCart
Description copied from interface:QuoteFacadeRemoves the cart related to the given quote- Specified by:
removeQuoteCartin interfaceQuoteFacade- Parameters:
quoteCode- code of the quote to detach cart from
-
requote
Description copied from interface:QuoteFacadeRe-quote from the existing quote to create a new quote- Specified by:
requotein interfaceQuoteFacade- Parameters:
quoteCode- The code of the quote to be re-quoted- Returns:
- the new quote
-
validateQuoteCart
-
getEntryForEntryNumber
-
getCartService
-
setCartService
-
getCommerceQuoteService
-
setCommerceQuoteService
-
getCommerceCartService
-
setCommerceCartService
-
getQuoteService
-
setQuoteService
-
getModelService
-
setModelService
-
getQuoteConverter
-
setQuoteConverter
-
getCartConverter
-
setCartConverter
-
getUserService
-
setUserService
-
getBaseStoreService
-
setBaseStoreService
-
getEnumerationService
-
setEnumerationService
-
getTypeService
-
setTypeService
-
getCommerceCommentService
-
setCommerceCommentService
-
getQuoteUserIdentificationStrategy
-
setQuoteUserIdentificationStrategy
public void setQuoteUserIdentificationStrategy(QuoteUserIdentificationStrategy quoteUserIdentificationStrategy)
-