Class ProductListService
java.lang.Object
sk.iway.iwcm.components.basket.rest.ProductListService
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addItemToInvoice
(Long invoiceId, List<Integer> itemIdsToAdd, BasketInvoiceItemsRepository biir, int userId, javax.servlet.http.HttpServletRequest request) addProductGroup
(Identity currentUser, String customData, EditorFacade editorFacade) static DatatablePageImpl<DocDetails>
getAllItems
(GetAllItemsDocOptions options) getGroupTreeIds
(int rootGroupId, DocDetailsRepository repo) static final Integer
getInvoiceStatusByValues
(BigDecimal priceToPayVat, BigDecimal totalPayedPrice) static List<LabelValueInteger>
getListOfProductGroupsViaIds
(String idsString) Parse given string to group ids.static List<LabelValueInteger>
getListOfProductGroupsViaInclude
(DocDetailsRepository docDetailsRepository) Find all groups, taht have doc containing certain INCLUDE or jsp file, that holds eshop products.static List<LabelValueInteger>
getListOfProductsGroups
(DocDetailsRepository docDetailsRepository) static List<LabelValue>
static BigDecimal
getPayedPrice
(Long invoiceId, BasketInvoicePaymentsRepository bipr) static BigDecimal
getPriceToPay
(Long invoiceId, BasketInvoiceItemsRepository biir) static boolean
isCurrencySupported
(String currency) static void
updateInvoiceStats
(Long invoiceId, boolean updateStatus) static void
updateInvoiceStats
(Long invoiceId, Long browserId, boolean updateStatus) Update invoice stats (items count, total price, total price with VAT).
-
Method Details
-
getAllItems
-
getGroupTreeIds
-
addProductGroup
public static ProductListService.AddingStatus addProductGroup(Identity currentUser, String customData, EditorFacade editorFacade) -
getListOfProductsGroups
public static List<LabelValueInteger> getListOfProductsGroups(DocDetailsRepository docDetailsRepository) -
getListOfProductGroupsViaInclude
public static List<LabelValueInteger> getListOfProductGroupsViaInclude(DocDetailsRepository docDetailsRepository) Find all groups, taht have doc containing certain INCLUDE or jsp file, that holds eshop products. Expand ids for whole tree. Sort it properly.- Parameters:
docDetailsRepository
-- Returns:
-
getListOfProductGroupsViaIds
Parse given string to group ids. Check that ids of groups are valid. If group id have "*" at end, load whole tree for this group. Sort it properly.- Parameters:
idsString
-- Returns:
-
isCurrencySupported
-
getListOfSupportedCurrencies
-
updateInvoiceStats
-
updateInvoiceStats
Update invoice stats (items count, total price, total price with VAT). After that invoice status will be updated !!- Parameters:
invoiceId
- - find invoiceItems by invoiceId - requiredbrowserId
- - find invoiceItems by browserId (if browser id is ) - can be null
-
getPriceToPay
-
getPayedPrice
-
getInvoiceStatusByValues
public static final Integer getInvoiceStatusByValues(BigDecimal priceToPayVat, BigDecimal totalPayedPrice) -
addItemToInvoice
public static void addItemToInvoice(Long invoiceId, List<Integer> itemIdsToAdd, BasketInvoiceItemsRepository biir, int userId, javax.servlet.http.HttpServletRequest request)
-