Class AbstractPricatParser

    • 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

      • getPricatFileVersion

        public java.lang.String getPricatFileVersion()
        Gets pricat file version.
        Returns:
        the pricat file version
      • getDelegator

        public Delegator getDelegator()
        Gets delegator.
        Returns:
        the delegator
      • setDelegator

        public void setDelegator​(Delegator delegator)
        Sets delegator.
        Parameters:
        delegator - the delegator
      • getFileItems

        public java.util.List<org.apache.commons.fileupload.FileItem> getFileItems()
        Gets file items.
        Returns:
        the file items
      • setFileItems

        public void setFileItems​(java.util.List<org.apache.commons.fileupload.FileItem> fileItems)
        Sets file items.
        Parameters:
        fileItems - the file items
      • getCurrencyId

        public java.lang.String getCurrencyId()
        Gets currency id.
        Returns:
        the currency id
      • setCurrencyId

        public void setCurrencyId​(java.lang.String currencyId)
        Sets currency id.
        Parameters:
        currencyId - the currency id
      • getSequenceNum

        public long getSequenceNum()
        Gets sequence num.
        Returns:
        the sequence num
      • setSequenceNum

        public void setSequenceNum​(long sequenceNum)
        Sets sequence num.
        Parameters:
        sequenceNum - the sequence num
      • getPricatFile

        public java.io.File getPricatFile()
        Gets pricat file.
        Returns:
        the pricat file
      • setPricatFile

        public void setPricatFile​(java.io.File pricatFile)
        Sets pricat file.
        Parameters:
        pricatFile - the pricat file
      • getFormatter

        public org.apache.poi.hssf.usermodel.HSSFDataFormatter getFormatter()
        Gets formatter.
        Returns:
        the formatter
      • setFormatter

        public void setFormatter​(org.apache.poi.hssf.usermodel.HSSFDataFormatter formatter)
        Sets formatter.
        Parameters:
        formatter - the formatter
      • getErrorMessages

        public java.util.Map<org.apache.poi.ss.util.CellReference,​java.lang.String> getErrorMessages()
        Gets error messages.
        Returns:
        the error messages
      • setErrorMessages

        public void setErrorMessages​(java.util.Map<org.apache.poi.ss.util.CellReference,​java.lang.String> errorMessages)
        Sets error messages.
        Parameters:
        errorMessages - the error messages
      • getFacilities

        public java.util.Map<java.lang.String,​java.lang.String[]> getFacilities()
        Gets facilities.
        Returns:
        the facilities
      • setFacilities

        public void setFacilities​(java.util.Map<java.lang.String,​java.lang.String[]> facilities)
        Sets facilities.
        Parameters:
        facilities - the facilities
      • getReport

        public InterfaceReport getReport()
        Gets report.
        Returns:
        the report
      • setReport

        public void setReport​(InterfaceReport report)
        Sets report.
        Parameters:
        report - the report
      • getLocale

        public java.util.Locale getLocale()
        Gets locale.
        Returns:
        the locale
      • isCommentedExcelExists

        public static boolean isCommentedExcelExists​(HttpServletRequest request,
                                                     java.lang.Long sequenceNum)
        Check whether a commented file exists.
        Parameters:
        request -
        sequenceNum -
        Returns:
        boolean
      • 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:
        list
      • isEmptyRow

        protected boolean isEmptyRow​(org.apache.poi.xssf.usermodel.XSSFRow row,
                                     int size,
                                     boolean display)
        Is empty row boolean.
        Parameters:
        row - the row
        size - the size
        display - the display
        Returns:
        the boolean
      • getHeaderRowNo

        protected abstract int getHeaderRowNo()
      • cleanupLogAndCommentedExcel

        protected void cleanupLogAndCommentedExcel()
        Cleanup log and commented excel.