Class AbstractPricatParser

    • Field Detail

      • module

        public static final java.lang.String module
      • fileItems

        protected java.util.List<org.apache.commons.fileupload.FileItem> fileItems
      • pricatFile

        protected java.io.File pricatFile
      • userLoginId

        protected java.lang.String userLoginId
      • pricatFileVersion

        protected java.lang.String pricatFileVersion
      • currencyId

        protected java.lang.String currencyId
      • errorMessages

        protected java.util.Map<org.apache.poi.ss.util.CellReference,​java.lang.String> errorMessages
      • formatter

        protected org.apache.poi.hssf.usermodel.HSSFDataFormatter formatter
      • facilities

        protected java.util.Map<java.lang.String,​java.lang.String[]> facilities
      • basicCategoryConds

        protected java.util.List<EntityCondition> basicCategoryConds
      • basicBrandConds

        protected java.util.List<EntityCondition> basicBrandConds
      • selectedPricatType

        protected java.lang.String selectedPricatType
      • selectedFacilityId

        protected java.lang.String selectedFacilityId
      • locale

        protected java.util.Locale locale
      • sequenceNum

        protected long sequenceNum
    • Constructor Detail

      • AbstractPricatParser

        public AbstractPricatParser​(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

      • writeCommentsToFile

        public void writeCommentsToFile​(org.apache.poi.xssf.usermodel.XSSFWorkbook workbook,
                                        org.apache.poi.xssf.usermodel.XSSFSheet sheet)
        Specified by:
        writeCommentsToFile in interface InterfacePricatParser
      • updateSkuPrice

        public java.util.Map<java.lang.String,​java.lang.Object> updateSkuPrice​(java.lang.String skuId,
                                                                                     java.lang.String ownerPartyId,
                                                                                     java.math.BigDecimal memberPrice)
        Specified by:
        updateSkuPrice in interface InterfacePricatParser
      • updateColorAndDimension

        public java.util.Map<java.lang.String,​java.lang.Object> updateColorAndDimension​(java.lang.String productId,
                                                                                              java.lang.String ownerPartyId,
                                                                                              java.lang.String color,
                                                                                              java.lang.String dimension)
        Specified by:
        updateColorAndDimension in interface InterfacePricatParser
      • getDimensionIds

        public java.util.Map<java.lang.String,​java.lang.Object> getDimensionIds​(java.lang.String productId,
                                                                                      java.lang.String ownerPartyId,
                                                                                      java.lang.String dimension)
        Specified by:
        getDimensionIds in interface InterfacePricatParser
      • getColorIds

        public java.util.Map<java.lang.String,​java.lang.Object> getColorIds​(java.lang.String productId,
                                                                                  java.lang.String ownerPartyId,
                                                                                  java.lang.String color)
        Specified by:
        getColorIds in interface InterfacePricatParser
      • getBrandId

        public java.lang.String getBrandId​(java.lang.String brandName,
                                           java.lang.String ownerPartyId)
        Specified by:
        getBrandId in interface InterfacePricatParser
      • 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
        Parameters:
        row -
        colNames -
        size -
        Returns:
      • isEmptyRow

        protected boolean isEmptyRow​(org.apache.poi.xssf.usermodel.XSSFRow row,
                                     int size,
                                     boolean display)
      • getHeaderRowNo

        protected abstract int getHeaderRowNo()
      • isCommentedExcelExists

        public static boolean isCommentedExcelExists​(HttpServletRequest request,
                                                     java.lang.Long sequenceNum)
        Check whether a commented file exists.
        Parameters:
        request -
        sequenceNum -
        Returns:
      • cleanupLogAndCommentedExcel

        protected void cleanupLogAndCommentedExcel()