Class AbstractPricatParser

java.lang.Object
org.apache.ofbiz.pricat.AbstractPricatParser
All Implemented Interfaces:
InterfacePricatParser
Direct Known Subclasses:
SamplePricatParser

public abstract class AbstractPricatParser extends Object implements InterfacePricatParser
Abstract class of pricat parser.
  • Constructor Details

  • Method Details

    • getPricatFileVersion

      public 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 List<org.apache.commons.fileupload.FileItem> getFileItems()
      Gets file items.
      Returns:
      the file items
    • setFileItems

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

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

      public void setCurrencyId(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 File getPricatFile()
      Gets pricat file.
      Returns:
      the pricat file
    • setPricatFile

      public void setPricatFile(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 Map<org.apache.poi.ss.util.CellReference,String> getErrorMessages()
      Gets error messages.
      Returns:
      the error messages
    • setErrorMessages

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

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

      public void setFacilities(Map<String,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 Locale getLocale()
      Gets locale.
      Returns:
      the locale
    • isCommentedExcelExists

      public static boolean isCommentedExcelExists(HttpServletRequest request, 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
    • initBasicConds

      public void initBasicConds(List<String> orgPartyIds)
      Specified by:
      initBasicConds in interface InterfacePricatParser
    • updateSkuPrice

      public Map<String,Object> updateSkuPrice(String skuId, String ownerPartyId, BigDecimal memberPrice)
      Specified by:
      updateSkuPrice in interface InterfacePricatParser
    • updateColorAndDimension

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

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

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

      public String getBrandId(String brandName, String ownerPartyId)
      Specified by:
      getBrandId in interface InterfacePricatParser
    • isNumOfSheetsOK

      public boolean isNumOfSheetsOK(org.apache.poi.xssf.usermodel.XSSFWorkbook workbook)
      Specified by:
      isNumOfSheetsOK in interface InterfacePricatParser
    • getCellContents

      public List<Object> getCellContents(org.apache.poi.xssf.usermodel.XSSFRow row, List<Object[]> colNames, int size)
      Get data by version definition.
      Specified by:
      getCellContents in interface InterfacePricatParser
      Parameters:
      row -
      colNames -
      size -
      Returns:
      list
    • setFacilityId

      public void setFacilityId(String selectedFacilityId)
      Specified by:
      setFacilityId in interface InterfacePricatParser
    • 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()
    • endExcelImportHistory

      public void endExcelImportHistory(String logFileName, String thruReasonId)
      Specified by:
      endExcelImportHistory in interface InterfacePricatParser
    • hasErrorMessages

      public boolean hasErrorMessages()
      Specified by:
      hasErrorMessages in interface InterfacePricatParser
    • cleanupLogAndCommentedExcel

      protected void cleanupLogAndCommentedExcel()
      Cleanup log and commented excel.