Package org.openl.rules.lang.xls.load
Interface WorkbookLoader
-
- All Known Implementing Classes:
GreedyLazyWorkbookLoader,SimpleWorkbookLoader,UnloadableLazyWorkbookLoader
public interface WorkbookLoaderProvides access to the Workbook.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetNumberOfSheets()Get number of sheets in current workbook.SheetLoadergetSheetLoader(int sheetIndex)Get the sheet accessorSpreadsheetConstantsgetSpreadsheetConstants()org.apache.poi.ss.usermodel.WorkbookgetWorkbook()Get the workbook.booleanisCanUnload()If true - the workbook can (but mustn't) be unloaded (for example if there is no enough memory).voidsetCanUnload(boolean canUnload)Set the flag that this workbook can or cannot be unloaded.
-
-
-
Method Detail
-
getWorkbook
org.apache.poi.ss.usermodel.Workbook getWorkbook()
Get the workbook. Depending on implementation andisCanUnload()state, when this method is repeatedly called, it can (but mustn't) return different instances of workbook java object.- Returns:
- loaded workbook
- See Also:
isCanUnload()
-
getSheetLoader
SheetLoader getSheetLoader(int sheetIndex)
Get the sheet accessor- Parameters:
sheetIndex- the sheet index in the workbook- Returns:
- object that provides access to the specified sheet of current workbook
-
getNumberOfSheets
int getNumberOfSheets()
Get number of sheets in current workbook.- Returns:
- the number of sheets in current workbook
-
isCanUnload
boolean isCanUnload()
If true - the workbook can (but mustn't) be unloaded (for example if there is no enough memory). In this case when the
getWorkbook()is repeatedly called, it can (but mustn't) return different instances of workbook java object.If false - the workbook is not unloaded and
getWorkbook()always returns the same Workbook instance.- Returns:
- the flag that this workbook can or cannot be unloaded.
- See Also:
setCanUnload(boolean)
-
setCanUnload
void setCanUnload(boolean canUnload)
Set the flag that this workbook can or cannot be unloaded. If workbook cannot be unloaded (for example when we edit the workbook) internal implementation should always keep strong reference to workbook andgetWorkbook()always returns the same Workbook instance.- Parameters:
canUnload- the flag that this workbook can or cannot be unloaded- See Also:
isCanUnload()
-
getSpreadsheetConstants
SpreadsheetConstants getSpreadsheetConstants()
-
-