Package co.mastermindcms.modules.beans
Class SellerSkuExcelWriter
- java.lang.Object
-
- co.mastermindcms.modules.beans.SellerSkuExcelWriter
-
@Component public class SellerSkuExcelWriter extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DELIMITER_ATTR
static java.lang.String
DELIMITER_ATTR_INTERNAL
static java.lang.String
DELIMITER_RANGE
static java.lang.String
DELIMITER_VALUE_INTERNAL
static java.lang.String
HEADER_ATTRIBUTE_LIST
static java.lang.String
HEADER_ATTRIBUTE_LOGICAL
static java.lang.String
HEADER_ATTRIBUTE_NUMERIC
static java.lang.String
HEADER_ATTRIBUTE_SIMPLE
static java.lang.String
HEADER_ATTRIBUTES_RANGE
static java.lang.String
HEADER_BASIC_PRICE
static java.lang.String
HEADER_COUNTRY_OF_ORIGIN
static java.lang.String
HEADER_CURRENCY_CODE
static java.lang.String
HEADER_CUSTOMER_ID
static java.lang.String
HEADER_DELIVERY_TYPE
static java.lang.String
HEADER_DESCRIPTION
static java.lang.String
HEADER_GENETIC_TYPE
static java.lang.String
HEADER_IMAGES
static java.lang.String
HEADER_INCOTERMS
static java.lang.String
HEADER_LISTING_ID
static java.lang.String
HEADER_LISTING_TYPE
static java.lang.String
HEADER_MIN_ORDER_QUANTITY
static java.lang.String
HEADER_QUANTITY
static java.lang.String
HEADER_QUANTITY_PER_PACKAGE
static java.lang.String
HEADER_SKU_ID
static java.lang.String
HEADER_TRADE_ITEM_NUMBER
static java.lang.String
HEADER_TRADE_UNIT
private static java.util.List<java.lang.String>
HEADERS
-
Constructor Summary
Constructors Constructor Description SellerSkuExcelWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createExcel(java.util.List<SellerSkuExcelModel> data, java.lang.String filePath)
private org.apache.poi.ss.usermodel.CellStyle
createHeaderStyle(org.apache.poi.ss.usermodel.Workbook workbook)
private void
createStringCell(org.apache.poi.ss.usermodel.Row row, int column, java.lang.Object value)
private void
parseAttributes(java.lang.String attribute, java.util.Set<java.lang.String> extraColumns, java.util.Map<java.lang.String,java.lang.String> attributesMap, java.lang.StringBuilder attributeKeys)
-
-
-
Field Detail
-
HEADER_LISTING_ID
public static final java.lang.String HEADER_LISTING_ID
- See Also:
- Constant Field Values
-
HEADER_TRADE_ITEM_NUMBER
public static final java.lang.String HEADER_TRADE_ITEM_NUMBER
- See Also:
- Constant Field Values
-
HEADER_COUNTRY_OF_ORIGIN
public static final java.lang.String HEADER_COUNTRY_OF_ORIGIN
- See Also:
- Constant Field Values
-
HEADER_GENETIC_TYPE
public static final java.lang.String HEADER_GENETIC_TYPE
- See Also:
- Constant Field Values
-
HEADER_TRADE_UNIT
public static final java.lang.String HEADER_TRADE_UNIT
- See Also:
- Constant Field Values
-
HEADER_SKU_ID
public static final java.lang.String HEADER_SKU_ID
- See Also:
- Constant Field Values
-
HEADER_CUSTOMER_ID
public static final java.lang.String HEADER_CUSTOMER_ID
- See Also:
- Constant Field Values
-
HEADER_QUANTITY
public static final java.lang.String HEADER_QUANTITY
- See Also:
- Constant Field Values
-
HEADER_MIN_ORDER_QUANTITY
public static final java.lang.String HEADER_MIN_ORDER_QUANTITY
- See Also:
- Constant Field Values
-
HEADER_QUANTITY_PER_PACKAGE
public static final java.lang.String HEADER_QUANTITY_PER_PACKAGE
- See Also:
- Constant Field Values
-
HEADER_DESCRIPTION
public static final java.lang.String HEADER_DESCRIPTION
- See Also:
- Constant Field Values
-
HEADER_BASIC_PRICE
public static final java.lang.String HEADER_BASIC_PRICE
- See Also:
- Constant Field Values
-
HEADER_DELIVERY_TYPE
public static final java.lang.String HEADER_DELIVERY_TYPE
- See Also:
- Constant Field Values
-
HEADER_LISTING_TYPE
public static final java.lang.String HEADER_LISTING_TYPE
- See Also:
- Constant Field Values
-
HEADER_INCOTERMS
public static final java.lang.String HEADER_INCOTERMS
- See Also:
- Constant Field Values
-
HEADER_CURRENCY_CODE
public static final java.lang.String HEADER_CURRENCY_CODE
- See Also:
- Constant Field Values
-
HEADER_ATTRIBUTE_LOGICAL
public static final java.lang.String HEADER_ATTRIBUTE_LOGICAL
- See Also:
- Constant Field Values
-
HEADER_ATTRIBUTES_RANGE
public static final java.lang.String HEADER_ATTRIBUTES_RANGE
- See Also:
- Constant Field Values
-
HEADER_ATTRIBUTE_SIMPLE
public static final java.lang.String HEADER_ATTRIBUTE_SIMPLE
- See Also:
- Constant Field Values
-
HEADER_ATTRIBUTE_LIST
public static final java.lang.String HEADER_ATTRIBUTE_LIST
- See Also:
- Constant Field Values
-
HEADER_ATTRIBUTE_NUMERIC
public static final java.lang.String HEADER_ATTRIBUTE_NUMERIC
- See Also:
- Constant Field Values
-
HEADER_IMAGES
public static final java.lang.String HEADER_IMAGES
- See Also:
- Constant Field Values
-
HEADERS
private static final java.util.List<java.lang.String> HEADERS
-
DELIMITER_ATTR_INTERNAL
public static final java.lang.String DELIMITER_ATTR_INTERNAL
- See Also:
- Constant Field Values
-
DELIMITER_ATTR
public static final java.lang.String DELIMITER_ATTR
- See Also:
- Constant Field Values
-
DELIMITER_VALUE_INTERNAL
public static final java.lang.String DELIMITER_VALUE_INTERNAL
- See Also:
- Constant Field Values
-
DELIMITER_RANGE
public static final java.lang.String DELIMITER_RANGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
createExcel
public void createExcel(java.util.List<SellerSkuExcelModel> data, java.lang.String filePath) throws java.io.IOException
- Throws:
java.io.IOException
-
createHeaderStyle
private org.apache.poi.ss.usermodel.CellStyle createHeaderStyle(org.apache.poi.ss.usermodel.Workbook workbook)
-
createStringCell
private void createStringCell(org.apache.poi.ss.usermodel.Row row, int column, java.lang.Object value)
-
parseAttributes
private void parseAttributes(java.lang.String attribute, java.util.Set<java.lang.String> extraColumns, java.util.Map<java.lang.String,java.lang.String> attributesMap, java.lang.StringBuilder attributeKeys)
-
-