You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
2.4 KiB

package com.alibaba.excel.context;
7 years ago
import com.alibaba.excel.event.AnalysisEventListener;
7 years ago
import com.alibaba.excel.metadata.BaseRowModel;
import com.alibaba.excel.metadata.ExcelHeadProperty;
import com.alibaba.excel.metadata.Sheet;
import com.alibaba.excel.support.ExcelTypeEnum;
import java.io.InputStream;
import java.util.List;
7 years ago
/**
*
* A context is the main anchorage point of a excel reader.
7 years ago
* @author jipengfei
*/
public interface AnalysisContext {
/**
* Custom attribute
7 years ago
*/
Object getCustom();
/**
* get current sheet
7 years ago
*
* @return current analysis sheet
7 years ago
*/
Sheet getCurrentSheet();
/**
* set current sheet
* @param sheet
7 years ago
*/
void setCurrentSheet(Sheet sheet);
/**
*
* get excel type
7 years ago
* @return excel type
*/
ExcelTypeEnum getExcelType();
/**
* get in io
7 years ago
* @return file io
*/
InputStream getInputStream();
/**
*
* custom listener
* @return listener
7 years ago
*/
AnalysisEventListener getEventListener();
/**
* get current row
* @return
7 years ago
*/
Integer getCurrentRowNum();
/**
* set current row num
* @param row
7 years ago
*/
void setCurrentRowNum(Integer row);
/**
* get total row ,Data may be inaccurate
* @return
7 years ago
*/
@Deprecated
7 years ago
Integer getTotalCount();
/**
* get total row ,Data may be inaccurate
7 years ago
*
* @param totalCount
7 years ago
*/
void setTotalCount(Integer totalCount);
/**
* get excel head
* @return
7 years ago
*/
ExcelHeadProperty getExcelHeadProperty();
/**
*
* @param clazz
* @param headOneRow
7 years ago
*/
void buildExcelHeadProperty(Class<? extends BaseRowModel> clazz, List<String> headOneRow);
/**
*
*if need to short match the content
* @return
7 years ago
*/
boolean trim();
/**
* set current result
* @param result
7 years ago
*/
void setCurrentRowAnalysisResult(Object result);
7 years ago
/**
* get current result
* @return get current result
7 years ago
*/
Object getCurrentRowAnalysisResult();
/**
* Interrupt execution
7 years ago
*/
void interrupt();
/**
* date use1904WindowDate
* @return
7 years ago
*/
boolean use1904WindowDate();
/**
* date use1904WindowDate
* @param use1904WindowDate
7 years ago
*/
void setUse1904WindowDate(boolean use1904WindowDate);
}