public interface QuoteService
| Modifier and Type | Method and Description |
|---|---|
QuoteModel |
createQuoteFromCart(CartModel cart)
Creates a new quote based on the given cart.
|
QuoteModel |
createQuoteSnapshot(QuoteModel quote,
QuoteState quoteState)
Creates a new quote snapshot by cloning the given
QuoteModel. |
QuoteModel |
getCurrentQuoteForCode(java.lang.String code)
Returns the latest quote snapshot for the given code, i.e.
|
QuoteModel |
getQuoteForCodeAndVersion(java.lang.String code,
java.lang.Integer version)
Returns a unique
QuoteModel for the given code and version. |
java.util.List<QuoteModel> |
getQuotesForCode(java.lang.String code)
Returns a list of all quotes snapshots for the given code, ordered by version in descending order, i.e.
|
QuoteModel getCurrentQuoteForCode(java.lang.String code)
code - the code to query forjava.lang.IllegalArgumentException - in case code is nullModelNotFoundException - in case there is no latest snapshot for the given codeQuoteModel getQuoteForCodeAndVersion(java.lang.String code, java.lang.Integer version)
QuoteModel for the given code and version.code - the code to query forversion - the version to query forjava.lang.IllegalArgumentException - in case one of the parameters is nullModelNotFoundException - in case there is no unique quote for the given code and versionjava.util.List<QuoteModel> getQuotesForCode(java.lang.String code)
code - the code to query forjava.lang.IllegalArgumentException - in case code is nullQuoteModel createQuoteFromCart(CartModel cart)
DefaultQuotePrepareInterceptor to set default values. The cart that is passed into this
method is not affected by its logic.cart - the cart based on which the new quote will be createdjava.lang.IllegalArgumentException - in case cart is nullQuoteModel createQuoteSnapshot(QuoteModel quote, QuoteState quoteState)
QuoteModel. The state of the new snapshot is determined
by the given QuoteState, its version is the given quote's version incremented by 1. Please note that it is
the caller's responsibility to persist the quote that is returned by this method. The original quote passed into
this method is not affected by its logic.quote - quote to create the snapshot fromquoteState - desired state of the quotejava.lang.IllegalArgumentException - in case one of the parameters is nullCopyright © 2018 SAP SE. All Rights Reserved.