Class ProductListService

java.lang.Object
sk.iway.iwcm.components.basket.rest.ProductListService

public class ProductListService extends Object
  • Method Details

    • getAllItems

      public static DatatablePageImpl<DocDetails> getAllItems(GetAllItemsDocOptions options)
    • getGroupTreeIds

      public static List<Integer> getGroupTreeIds(int rootGroupId, DocDetailsRepository repo)
    • 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

      public static List<LabelValueInteger> getListOfProductGroupsViaIds(String idsString)
      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

      public static boolean isCurrencySupported(String currency)
    • getListOfSupportedCurrencies

      public static List<LabelValue> getListOfSupportedCurrencies()
    • updateInvoiceStats

      public static void updateInvoiceStats(Long invoiceId, boolean updateStatus)
    • updateInvoiceStats

      public static void updateInvoiceStats(Long invoiceId, Long browserId, boolean updateStatus)
      Update invoice stats (items count, total price, total price with VAT). After that invoice status will be updated !!
      Parameters:
      invoiceId - - find invoiceItems by invoiceId - required
      browserId - - find invoiceItems by browserId (if browser id is ) - can be null
    • getPriceToPay

      public static BigDecimal getPriceToPay(Long invoiceId, BasketInvoiceItemsRepository biir)
    • getPayedPrice

      public static BigDecimal getPayedPrice(Long invoiceId, BasketInvoicePaymentsRepository bipr)
    • 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)