public abstract class AbstractPricatParser extends Object implements InterfacePricatParser
Modifier and Type | Field and Description |
---|---|
protected List<EntityCondition> |
basicBrandConds |
protected List<EntityCondition> |
basicCategoryConds |
protected String |
currencyId |
protected Delegator |
delegator |
protected LocalDispatcher |
dispatcher |
protected Map<org.apache.poi.ss.util.CellReference,String> |
errorMessages |
protected Map<String,String[]> |
facilities |
protected List<org.apache.commons.fileupload.FileItem> |
fileItems |
protected org.apache.poi.hssf.usermodel.HSSFDataFormatter |
formatter |
protected Locale |
locale |
static String |
module |
protected File |
pricatFile |
protected String |
pricatFileVersion |
protected InterfaceReport |
report |
protected String |
selectedFacilityId |
protected String |
selectedPricatType |
protected long |
sequenceNum |
protected HttpSession |
session |
protected GenericValue |
userLogin |
protected String |
userLoginId |
CONFIRM, DEFAULT_PRICAT_TYPE, defaultCategoryName, defaultColorName, defaultDimensionName, EXCEL_TEMPLATE_TYPE, FACILITY_ID, FileDateTimePattern, HISTORY_MAX_FILENUMBER, messageLabels, messages, PARSE_EXCEL, PRICAT_FILE, PricatTypeLabels, resource, tempFilesFolder
Constructor and Description |
---|
AbstractPricatParser(LocalDispatcher dispatcher,
Delegator delegator,
Locale locale,
InterfaceReport report,
Map<String,String[]> facilities,
File pricatFile,
GenericValue userLogin) |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanupLogAndCommentedExcel() |
void |
endExcelImportHistory(String logFileName,
String thruReasonId) |
String |
getBrandId(String brandName,
String ownerPartyId) |
List<Object> |
getCellContents(org.apache.poi.xssf.usermodel.XSSFRow row,
List<Object[]> colNames,
int size)
Get data by version definition.
|
Map<String,Object> |
getColorIds(String productId,
String ownerPartyId,
String color) |
Map<String,Object> |
getDimensionIds(String productId,
String ownerPartyId,
String dimension) |
protected abstract int |
getHeaderRowNo() |
boolean |
hasErrorMessages() |
void |
initBasicConds(List<String> orgPartyIds) |
static boolean |
isCommentedExcelExists(HttpServletRequest request,
Long sequenceNum)
Check whether a commented file exists.
|
protected boolean |
isEmptyRow(org.apache.poi.xssf.usermodel.XSSFRow row,
int size,
boolean display) |
boolean |
isNumOfSheetsOK(org.apache.poi.xssf.usermodel.XSSFWorkbook workbook) |
void |
setFacilityId(String selectedFacilityId) |
Map<String,Object> |
updateColorAndDimension(String productId,
String ownerPartyId,
String color,
String dimension) |
Map<String,Object> |
updateSkuPrice(String skuId,
String ownerPartyId,
BigDecimal memberPrice) |
void |
writeCommentsToFile(org.apache.poi.xssf.usermodel.XSSFWorkbook workbook,
org.apache.poi.xssf.usermodel.XSSFSheet sheet) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
containsDataRows, existsCurrencyId, getCellContent, getProductCategoryId, getProductId, isFacilityOk, isTableHeaderMatched, isVersionSupported, parseCellContentsAndStore, parsePricatExcel, parseRowByRow, updateSku
public static final String module
protected LocalDispatcher dispatcher
protected Delegator delegator
protected List<org.apache.commons.fileupload.FileItem> fileItems
protected File pricatFile
protected String userLoginId
protected GenericValue userLogin
protected String pricatFileVersion
protected String currencyId
protected org.apache.poi.hssf.usermodel.HSSFDataFormatter formatter
protected HttpSession session
protected List<EntityCondition> basicCategoryConds
protected List<EntityCondition> basicBrandConds
protected String selectedPricatType
protected String selectedFacilityId
protected InterfaceReport report
protected Locale locale
protected long sequenceNum
public AbstractPricatParser(LocalDispatcher dispatcher, Delegator delegator, Locale locale, InterfaceReport report, Map<String,String[]> facilities, File pricatFile, GenericValue userLogin)
public void writeCommentsToFile(org.apache.poi.xssf.usermodel.XSSFWorkbook workbook, org.apache.poi.xssf.usermodel.XSSFSheet sheet)
writeCommentsToFile
in interface InterfacePricatParser
public void initBasicConds(List<String> orgPartyIds)
initBasicConds
in interface InterfacePricatParser
public Map<String,Object> updateSkuPrice(String skuId, String ownerPartyId, BigDecimal memberPrice)
updateSkuPrice
in interface InterfacePricatParser
public Map<String,Object> updateColorAndDimension(String productId, String ownerPartyId, String color, String dimension)
updateColorAndDimension
in interface InterfacePricatParser
public Map<String,Object> getDimensionIds(String productId, String ownerPartyId, String dimension)
getDimensionIds
in interface InterfacePricatParser
public Map<String,Object> getColorIds(String productId, String ownerPartyId, String color)
getColorIds
in interface InterfacePricatParser
public String getBrandId(String brandName, String ownerPartyId)
getBrandId
in interface InterfacePricatParser
public boolean isNumOfSheetsOK(org.apache.poi.xssf.usermodel.XSSFWorkbook workbook)
isNumOfSheetsOK
in interface InterfacePricatParser
public List<Object> getCellContents(org.apache.poi.xssf.usermodel.XSSFRow row, List<Object[]> colNames, int size)
getCellContents
in interface InterfacePricatParser
row
- colNames
- size
- public void setFacilityId(String selectedFacilityId)
setFacilityId
in interface InterfacePricatParser
protected boolean isEmptyRow(org.apache.poi.xssf.usermodel.XSSFRow row, int size, boolean display)
protected abstract int getHeaderRowNo()
public void endExcelImportHistory(String logFileName, String thruReasonId)
endExcelImportHistory
in interface InterfacePricatParser
public boolean hasErrorMessages()
hasErrorMessages
in interface InterfacePricatParser
public static boolean isCommentedExcelExists(HttpServletRequest request, Long sequenceNum)
request
- sequenceNum
- protected void cleanupLogAndCommentedExcel()