All Methods Instance Methods Concrete Methods
| Modifier and Type |
Method and Description |
CartModel |
acceptAndPrepareCheckout(QuoteModel quoteModel,
UserModel userModel)
Accept and prepare checkout.
|
void |
applyQuoteDiscount(AbstractOrderModel abstractOrderModel,
UserModel userModel,
java.lang.Double discountRate,
DiscountType discountType)
Applies a quote specific discount to abstract order model given the discount rate and discount type.
|
QuoteModel |
approveQuote(QuoteModel quoteModel,
UserModel userModel)
Approve a quote from seller representative.
|
void |
assignQuoteToUser(QuoteModel quote,
UserModel assignee,
UserModel assigner)
Assigns quote to an assignee
|
void |
cancelQuote(QuoteModel quoteModel,
UserModel userModel)
Cancels a quote.
|
protected java.util.Optional<DiscountValue> |
createDiscountValue(java.lang.Double discountRate,
DiscountType discountType,
java.lang.String currencyIsoCode) |
QuoteModel |
createQuoteFromCart(CartModel cartModel,
UserModel userModel)
Creates a new quote based on given cart.
|
protected QuoteModel |
createQuoteFromCartInternal(CartModel cartModel,
UserModel userModel) |
protected QuoteModel |
createQuoteSnapshot(QuoteModel quoteModel) |
QuoteModel |
createQuoteSnapshotWithState(QuoteModel quoteModel,
QuoteState quoteState)
Create a new quote snapshot for a given quote state and persist the model.
|
protected void |
executeQuoteAssignment(QuoteModel quote,
UserModel assignee,
java.lang.String errorMsg) |
java.util.Set<QuoteAction> |
getAllowedActions(QuoteModel quoteModel,
UserModel userModel)
Get currently allowed actions for a quote.
|
protected CalculationService |
getCalculationService() |
protected CartService |
getCartService() |
protected CommerceCartService |
getCommerceCartService() |
protected CommerceQuoteDao |
getCommerceQuoteDao() |
protected CommerceQuoteUtils |
getCommerceQuoteUtils() |
protected CommerceSaveCartService |
getCommerceSaveCartService() |
protected java.lang.String |
getCurrentDateTimeFormatted(java.lang.String format) |
protected EventService |
getEventService() |
protected ModelService |
getModelService() |
protected OrderQuoteDiscountValuesAccessor |
getOrderQuoteDiscountValuesAccessor() |
protected QuoteActionValidationStrategy |
getQuoteActionValidationStrategy() |
protected QuoteAssignmentValidationStrategy |
getQuoteAssignmentValidationStrategy() |
QuoteModel |
getQuoteByCodeAndCustomerAndStore(CustomerModel customerModel,
UserModel quoteUserModel,
BaseStoreModel store,
java.lang.String quoteCode)
Finds a quote with highest version by code, customer and store.
|
protected QuoteCartValidationStrategy |
getQuoteCartValidationStrategy() |
protected QuoteExpirationTimeValidationStrategy |
getQuoteExpirationTimeValidationStrategy() |
protected java.util.Optional<QuoteModel> |
getQuoteFromSessionCart() |
SearchPageData<QuoteModel> |
getQuoteList(CustomerModel customerModel,
UserModel quoteUserModel,
BaseStoreModel store,
PageableData pageableData)
Retrieves the paged list of quotes according to the provided selection criteria.
|
protected QuoteMetadataValidationStrategy |
getQuoteMetadataValidationStrategy() |
double |
getQuoteRequestThreshold(QuoteModel quote,
UserModel user,
CartModel sessionCart)
Get quote request threshold defined in properties.
|
java.lang.Integer |
getQuotesCountForStoreAndUser(CustomerModel customerModel,
UserModel quoteUserModel,
BaseStoreModel store)
Get the number of quotes for the specified user and store.
|
protected QuoteSellerApproverAutoApprovalStrategy |
getQuoteSellerApproverAutoApprovalStrategy() |
protected QuoteService |
getQuoteService() |
protected java.util.Map<QuoteState,QuoteState> |
getQuoteSnapshotStateTransitionMap() |
protected QuoteStateSelectionStrategy |
getQuoteStateSelectionStrategy() |
protected QuoteUpdateExpirationTimeStrategy |
getQuoteUpdateExpirationTimeStrategy() |
protected QuoteUpdateStateStrategy |
getQuoteUpdateStateStrategy() |
protected QuoteUserTypeIdentificationStrategy |
getQuoteUserTypeIdentificationStrategy() |
protected RequoteStrategy |
getRequoteStrategy() |
protected SessionService |
getSessionService() |
protected UpdateQuoteFromCartStrategy |
getUpdateQuoteFromCartStrategy() |
protected UserService |
getUserService() |
protected boolean |
hasQuoteInSessionCart() |
boolean |
isQuoteCartValidForCheckout(CartModel cart)
Validates if the quote cart can be checked-out or not
|
protected boolean |
isRequestThresholdRequired(QuoteModel quote,
UserModel user,
CartModel sessionCart)
Checks if quote is in a state that requires checking the request threshold.
|
protected boolean |
isSessionQuoteSameAsRequestedQuote(QuoteModel quoteModel) |
CartModel |
loadQuoteAsSessionCart(QuoteModel quoteModel,
UserModel userModel)
Loads the given quote into a new session cart or returns the existing session cart if existing session cart
already has the quote loaded.
|
QuoteModel |
rejectQuote(QuoteModel quoteModel,
UserModel userModel)
Reject a quote from seller representative.
|
void |
removeQuoteCart(QuoteModel quote)
Removes the cart related to the given quote
|
QuoteModel |
requote(QuoteModel quote,
UserModel user)
Re-quote from an existing quote to create a new quote
|
protected QuoteModel |
saveUpdate(CartModel cart,
QuoteModel outdatedQuote,
QuoteModel updatedQuote) |
protected void |
setAssigneeOnQuote(QuoteModel quote,
UserModel assignee) |
void |
setCalculationService(CalculationService calculationService) |
void |
setCartService(CartService cartService) |
void |
setCommerceCartService(CommerceCartService commerceCartService) |
void |
setCommerceQuoteDao(CommerceQuoteDao commerceQuoteDao) |
void |
setCommerceQuoteUtils(CommerceQuoteUtils commerceQuoteUtils) |
void |
setCommerceSaveCartService(CommerceSaveCartService commerceSaveCartService) |
void |
setEventService(EventService eventService) |
void |
setModelService(ModelService modelService) |
void |
setOrderQuoteDiscountValuesAccessor(OrderQuoteDiscountValuesAccessor orderQuoteDiscountValuesAccessor) |
void |
setQuoteActionValidationStrategy(QuoteActionValidationStrategy quoteActionValidationStrategy) |
void |
setQuoteAssignmentValidationStrategy(QuoteAssignmentValidationStrategy quoteAssignmentValidationStrategy) |
void |
setQuoteCartValidationStrategy(QuoteCartValidationStrategy quoteCartValidationStrategy) |
void |
setQuoteExpirationTimeValidationStrategy(QuoteExpirationTimeValidationStrategy quoteExpirationTimeValidationStrategy) |
void |
setQuoteMetadataValidationStrategy(QuoteMetadataValidationStrategy quoteMetadataValidationStrategy) |
void |
setQuoteSellerApproverAutoApprovalStrategy(QuoteSellerApproverAutoApprovalStrategy quoteSellerApproverAutoApprovalStrategy) |
void |
setQuoteService(QuoteService quoteService) |
void |
setQuoteSnapshotStateTransitionMap(java.util.Map<QuoteState,QuoteState> quoteSnapshotStateTransitionMap) |
void |
setQuoteStateSelectionStrategy(QuoteStateSelectionStrategy quoteStateSelectionStrategy) |
void |
setQuoteUpdateExpirationTimeStrategy(QuoteUpdateExpirationTimeStrategy quoteUpdateExpirationTimeStrategy) |
void |
setQuoteUpdateStateStrategy(QuoteUpdateStateStrategy quoteUpdateStateStrategy) |
void |
setQuoteUserTypeIdentificationStrategy(QuoteUserTypeIdentificationStrategy quoteUserTypeIdentificationStrategy) |
void |
setRequoteStrategy(RequoteStrategy requoteStrategy) |
void |
setSessionService(SessionService sessionService) |
void |
setUpdateQuoteFromCartStrategy(UpdateQuoteFromCartStrategy updateQuoteFromCartStrategy) |
void |
setUserService(UserService userService) |
boolean |
shouldAutoApproveTheQuoteForSellerApproval(QuoteModel quoteModel)
Checks whether a quote can be auto approved or requires seller approval based on the configured threshold.
|
QuoteModel |
submitQuote(QuoteModel quoteModel,
UserModel userModel)
Submits a quote from buyer to seller representative or from seller representative to seller approver.
|
void |
unassignQuote(QuoteModel quote,
UserModel assigner)
Unassigns the assignee from the quote
|
protected CartModel |
updateAndLoadQuoteCartWithAction(QuoteModel quoteModel,
QuoteAction quoteAction,
UserModel userModel) |
QuoteModel |
updateQuoteFromCart(CartModel cartModel,
UserModel userModel)
Updates quote with data from cart (and existing quote).
|
protected QuoteModel |
updateQuoteFromCartInternal(CartModel cartModel) |
protected void |
validateDiscountRate(java.lang.Double discountRate,
DiscountType discountType,
AbstractOrderModel abstractOrderModel) |
protected void |
validateListNotEmpty(java.util.Collection paramToCheck,
java.lang.String unknownIdException) |
protected void |
validateQuoteCart(CartModel cartModel) |
void |
validateQuoteThreshold(QuoteModel quote,
UserModel user,
CartModel sessionCart)
Validates if quote meets threshold.
|
protected void |
validateQuoteTotal(QuoteModel quoteModel) |