Package co.mastermindcms.modules.beans
Class SellerSkuExcelReader
- java.lang.Object
-
- co.mastermindcms.modules.beans.SellerSkuExcelReader
-
@Component public class SellerSkuExcelReader extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private ImageUploader
imageUploader
private SellerSkuUtil
sellerSkuUtil
-
Constructor Summary
Constructors Constructor Description SellerSkuExcelReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private double
getCellNumericValue(org.apache.poi.ss.usermodel.Row row, java.lang.Integer cellIndex)
private java.lang.String
getCellStringValue(org.apache.poi.ss.usermodel.Row row, java.lang.Integer cellIndex)
private java.lang.String
getFileDestination(java.lang.String customerId, java.lang.String sellerSkuId)
private byte[]
getSingleImageFromSheet(org.apache.poi.xssf.usermodel.XSSFSheet sheet)
private java.util.Map<java.lang.String,java.lang.Integer>
mapHeaders(org.apache.poi.ss.usermodel.Row headerRow)
private void
parseAttributes(org.apache.poi.ss.usermodel.Row row, java.lang.String attributeHeader, java.util.Map<java.lang.String,java.lang.String> attributesMap, java.util.Map<java.lang.String,java.lang.Integer> headerMap)
private java.lang.String
processImage(java.lang.String imageReference, org.apache.poi.xssf.usermodel.XSSFWorkbook workbook, java.lang.String customerId, java.lang.String sellerSkuId)
java.util.List<SellerSkuExcelModel>
readExcel(java.io.InputStream stream)
-
-
-
Field Detail
-
sellerSkuUtil
@Autowired private SellerSkuUtil sellerSkuUtil
-
imageUploader
@Autowired private ImageUploader imageUploader
-
-
Method Detail
-
readExcel
public java.util.List<SellerSkuExcelModel> readExcel(java.io.InputStream stream) throws java.lang.Exception
- Throws:
java.lang.Exception
-
mapHeaders
private java.util.Map<java.lang.String,java.lang.Integer> mapHeaders(org.apache.poi.ss.usermodel.Row headerRow)
-
getCellStringValue
private java.lang.String getCellStringValue(org.apache.poi.ss.usermodel.Row row, java.lang.Integer cellIndex)
-
getCellNumericValue
private double getCellNumericValue(org.apache.poi.ss.usermodel.Row row, java.lang.Integer cellIndex)
-
getSingleImageFromSheet
private byte[] getSingleImageFromSheet(org.apache.poi.xssf.usermodel.XSSFSheet sheet)
-
parseAttributes
private void parseAttributes(org.apache.poi.ss.usermodel.Row row, java.lang.String attributeHeader, java.util.Map<java.lang.String,java.lang.String> attributesMap, java.util.Map<java.lang.String,java.lang.Integer> headerMap)
-
processImage
private java.lang.String processImage(java.lang.String imageReference, org.apache.poi.xssf.usermodel.XSSFWorkbook workbook, java.lang.String customerId, java.lang.String sellerSkuId)
-
getFileDestination
private java.lang.String getFileDestination(java.lang.String customerId, java.lang.String sellerSkuId)
-
-