Class SamplePricatParser

    • Field Detail

      • COL_NAMES_LIST

        public static final java.util.Map<java.lang.String,​java.util.List<java.lang.Object[]>> COL_NAMES_LIST
    • Constructor Detail

      • SamplePricatParser

        public SamplePricatParser​(LocalDispatcher dispatcher,
                                  Delegator delegator,
                                  java.util.Locale locale,
                                  InterfaceReport report,
                                  java.util.Map<java.lang.String,​java.lang.String[]> facilities,
                                  java.io.File pricatFile,
                                  GenericValue userLogin)
    • Method Detail

      • parsePricatExcel

        public void parsePricatExcel​(boolean writeFile)
        Parse pricat excel file in xlsx format.
      • existsCurrencyId

        public boolean existsCurrencyId​(org.apache.poi.xssf.usermodel.XSSFSheet sheet)
        exists currency id
      • parseRowByRow

        public void parseRowByRow​(org.apache.poi.xssf.usermodel.XSSFSheet sheet)
        parse row by row
      • parseCellContentsAndStore

        public boolean parseCellContentsAndStore​(org.apache.poi.xssf.usermodel.XSSFRow row,
                                                 java.util.List<java.lang.Object> cellContents)
                                          throws GenericTransactionException
        Check data according to business logic. If data is ok, store it.
        Parameters:
        row -
        cellContents -
        Returns:
        Throws:
        GenericTransactionException
      • updateSku

        public java.lang.String updateSku​(org.apache.poi.xssf.usermodel.XSSFRow row,
                                          java.lang.String productId,
                                          java.lang.String ownerPartyId,
                                          java.lang.String facilityId,
                                          java.lang.String barcode,
                                          java.math.BigDecimal inventory,
                                          java.lang.String colorId,
                                          java.lang.String color,
                                          java.lang.String dimensionId,
                                          java.lang.String dimension,
                                          java.math.BigDecimal listPrice,
                                          java.math.BigDecimal averageCost)
        update sku
      • getProductId

        public java.lang.String getProductId​(org.apache.poi.xssf.usermodel.XSSFRow row,
                                             java.lang.String brandId,
                                             java.lang.String modelName,
                                             java.lang.String productName,
                                             java.lang.String productCategoryId,
                                             java.lang.String ownerPartyId,
                                             java.math.BigDecimal listPrice)
        get product id
      • getCellContent

        public java.lang.Object getCellContent​(java.util.List<java.lang.Object> cellContents,
                                               java.lang.String colName)
      • getProductCategoryId

        public java.lang.String getProductCategoryId​(java.util.List<java.lang.Object> cellContents,
                                                     java.lang.String ownerPartyId)
      • isFacilityOk

        public boolean isFacilityOk​(org.apache.poi.xssf.usermodel.XSSFRow row,
                                    java.lang.String facilityName,
                                    java.lang.String facilityId)
      • isTableHeaderMatched

        public boolean isTableHeaderMatched​(org.apache.poi.xssf.usermodel.XSSFSheet sheet)
      • isVersionSupported

        public boolean isVersionSupported​(org.apache.poi.xssf.usermodel.XSSFSheet sheet)
      • containsDataRows

        public boolean containsDataRows​(org.apache.poi.xssf.usermodel.XSSFSheet sheet)
      • parsePricatExcel

        public void parsePricatExcel()
      • getCellContents

        public java.util.List<java.lang.Object> getCellContents​(org.apache.poi.xssf.usermodel.XSSFRow row,
                                                                java.util.List<java.lang.Object[]> colNames,
                                                                int size)
        Get data by version definition.
        Specified by:
        getCellContents in interface InterfacePricatParser
        Overrides:
        getCellContents in class AbstractPricatParser
        Parameters:
        row -
        colNames -
        size -
        Returns: