Class DefaultExcelTemplateService
- java.lang.Object
-
- com.hybris.backoffice.excel.template.DefaultExcelTemplateService
-
- All Implemented Interfaces:
ExcelTemplateService
@Deprecated public class DefaultExcelTemplateService extends java.lang.Object implements ExcelTemplateService
Deprecated.since 1808.
-
-
Constructor Summary
Constructors Constructor Description DefaultExcelTemplateService()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidactivateFirstNonUtilitySheet(org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.since 1808.protected voidaddAttributeToExcelTypeSystemSheet(AttributeDescriptorModel attributeDescriptor, org.apache.poi.ss.usermodel.Sheet sheet)Deprecated.since 1808, please useTypeSystemSheetPopulator.populate(ExcelExportResult)instead.protected voidaddAttributeToExcelTypeSystemSheet(AttributeDescriptorModel attributeDescriptor, org.apache.poi.ss.usermodel.Sheet sheet, java.lang.String langIsoCode)Deprecated.since 1808, please useTypeSystemSheetPopulator.populate(ExcelExportResult)instead.voidaddTypeSheet(java.lang.String typeName, org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.Adds a new sheet to given workbook.org.apache.poi.ss.usermodel.RowcreateEmptyRow(org.apache.poi.ss.usermodel.Sheet sheet)Deprecated.Creates an empty row in given sheet.org.apache.poi.ss.usermodel.SheetcreateTypeSheet(java.lang.String typeCode, org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.Creates a new type sheet in given workbook.org.apache.poi.ss.usermodel.WorkbookcreateWorkbook(java.io.InputStream is)Deprecated.Creates workbook object based on inputStream of excel file.intfindColumnIndex(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet sheet, SelectedAttribute selectedAttribute)Deprecated.Finds column index based on selected attribute.java.lang.StringfindSheetNameForTypeCode(java.lang.String typeCode, org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.Finds sheet name for given type code.java.lang.StringfindTypeCodeForSheetName(java.lang.String sheetName, org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.Finds type code for given sheet name.protected java.lang.StringgetAttributeDescriptorName(AttributeDescriptorModel attributeDescriptor)Deprecated.since 1808.java.lang.StringgetAttributeDisplayName(AttributeDescriptorModel attributeDescriptorModel, java.lang.String isoCode)Deprecated.Returns displayed header name based on attribute descriptorjava.lang.StringgetCellValue(org.apache.poi.ss.usermodel.Cell cell)Deprecated.Returns cell value as a string value.CommonI18NServicegetCommonI18NService()Deprecated.since 1808.ExcelDateUtilsgetExcelDateUtils()Deprecated.since 1808.ExcelSheetNamingStrategygetExcelSheetNamingStrategy()Deprecated.since 1808.ExcelTranslatorRegistrygetExcelTranslatorRegistry()Deprecated.since 1808.java.util.List<SelectedAttribute>getHeaders(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet typeSheet)Deprecated.Returns list of selected attributes for given sheet, based on metainformation from type system sheet.PermissionCRUDServicegetPermissionCRUDService()Deprecated.since 1808.java.util.List<SelectedAttributeQualifier>getSelectedAttributesQualifiers(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet typeSheet)Deprecated.Returns qualifiers of attributes which at selected in the typSheetjava.util.List<org.apache.poi.ss.usermodel.Sheet>getSheets(org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.Returns all sheets except utility sheets.java.util.List<java.lang.String>getSheetsNames(org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.Returns all sheets names except utility sheets.TypeServicegetTypeService()Deprecated.org.apache.poi.ss.usermodel.SheetgetTypeSystemSheet(org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.Returns sheet which contains metadata about type systemprotected intgetUtilitySheetHiddenLevel()Deprecated.since 1808.protected voidhideUtilitySheet(org.apache.poi.ss.usermodel.Workbook workbook, java.lang.String sheetName)Deprecated.since 1808.voidinsertAttributeHeader(org.apache.poi.ss.usermodel.Sheet sheet, SelectedAttribute selectedAttribute, int columnIndex)Deprecated.Inserts value to the sheet's header (first row)voidinsertAttributesHeader(org.apache.poi.ss.usermodel.Sheet sheet, java.util.Collection<SelectedAttribute> selectedAttributes)Deprecated.A shortcut forExcelTemplateService.insertAttributeHeader(Sheet, SelectedAttribute, int)It is possible to inserts all values to the header at once instead of invokingExcelTemplateService.insertAttributeHeader(Sheet, SelectedAttribute, int)for every attribute separatelyvoidinsertAttributeValue(org.apache.poi.ss.usermodel.Cell cell, java.lang.Object object)Deprecated.Inserts given value to a given cellprotected booleanisMandatory(AttributeDescriptorModel attributeDescriptor, java.lang.String langIsoCode)Deprecated.since 1808.protected voidpopulateTypeSystemSheet(ComposedTypeModel composedType, org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.since 1808, please useTypeSystemSheetPopulator.populate(ExcelExportResult)instead.voidsetAttributeNameFormatter(AttributeNameFormatter<ExcelAttributeDescriptorAttribute> attributeNameFormatter)Deprecated.voidsetCellService(ExcelCellService cellService)Deprecated.voidsetCommonI18NService(CommonI18NService commonI18NService)Deprecated.since 1808.voidsetExcelDateUtils(ExcelDateUtils excelDateUtils)Deprecated.since 1808.voidsetExcelSheetNamingStrategy(ExcelSheetNamingStrategy excelSheetNamingStrategy)Deprecated.since 1808.voidsetExcelTranslatorRegistry(ExcelTranslatorRegistry excelTranslatorRegistry)Deprecated.since 1808.voidsetHeaderService(ExcelHeaderService headerService)Deprecated.voidsetPermissionCRUDService(PermissionCRUDService permissionCRUDService)Deprecated.since 1808.voidsetSheetService(ExcelSheetService sheetService)Deprecated.voidsetTypeService(TypeService typeService)Deprecated.voidsetWorkbookService(ExcelWorkbookService workbookService)Deprecated.
-
-
-
Method Detail
-
createWorkbook
public org.apache.poi.ss.usermodel.Workbook createWorkbook(java.io.InputStream is)
Deprecated.Description copied from interface:ExcelTemplateServiceCreates workbook object based on inputStream of excel file. If inputStream doesn't contains excel file then new empty Workbook will be returned.- Specified by:
createWorkbookin interfaceExcelTemplateService- Parameters:
is- Input stream of excel file- Returns:
Workbookobject which represents excel file
-
getTypeSystemSheet
public org.apache.poi.ss.usermodel.Sheet getTypeSystemSheet(org.apache.poi.ss.usermodel.Workbook workbook)
Deprecated.Description copied from interface:ExcelTemplateServiceReturns sheet which contains metadata about type system- Specified by:
getTypeSystemSheetin interfaceExcelTemplateService- Parameters:
workbook-Workbookobject which represents excel file- Returns:
Sheetwhich contains information about type system
-
getSheetsNames
public java.util.List<java.lang.String> getSheetsNames(org.apache.poi.ss.usermodel.Workbook workbook)
Deprecated.Description copied from interface:ExcelTemplateServiceReturns all sheets names except utility sheets.- Specified by:
getSheetsNamesin interfaceExcelTemplateService- Parameters:
workbook-Workbookobject which represents excel file- Returns:
- list of sheets names
-
getSheets
public java.util.List<org.apache.poi.ss.usermodel.Sheet> getSheets(org.apache.poi.ss.usermodel.Workbook workbook)
Deprecated.Description copied from interface:ExcelTemplateServiceReturns all sheets except utility sheets.- Specified by:
getSheetsin interfaceExcelTemplateService- Parameters:
workbook-Workbookobject which represents excel file- Returns:
- list of sheets
-
getCellValue
public java.lang.String getCellValue(org.apache.poi.ss.usermodel.Cell cell)
Deprecated.Description copied from interface:ExcelTemplateServiceReturns cell value as a string value. In case when cell contains formula then the formula is evaluated and result of the evaluation is returned.- Specified by:
getCellValuein interfaceExcelTemplateService- Parameters:
cell-Cell- Returns:
- string value of cell
-
getHeaders
public java.util.List<SelectedAttribute> getHeaders(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet typeSheet)
Deprecated.Description copied from interface:ExcelTemplateServiceReturns list of selected attributes for given sheet, based on metainformation from type system sheet.- Specified by:
getHeadersin interfaceExcelTemplateService- Parameters:
typeSystemSheet-Sheetcontains metainformation about attributes for each type sheetstypeSheet-Sheetcontains data for given sheet- Returns:
- list of selected attributes
-
getSelectedAttributesQualifiers
public java.util.List<SelectedAttributeQualifier> getSelectedAttributesQualifiers(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet typeSheet)
Deprecated.Description copied from interface:ExcelTemplateServiceReturns qualifiers of attributes which at selected in the typSheet- Specified by:
getSelectedAttributesQualifiersin interfaceExcelTemplateService- Parameters:
typeSystemSheet-Sheetcontains metainformation about attributes for each type sheetstypeSheet-Sheetcontains data for given sheet- Returns:
- list of selected attributes.
-
findColumnIndex
public int findColumnIndex(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet sheet, SelectedAttribute selectedAttribute)Deprecated.Description copied from interface:ExcelTemplateServiceFinds column index based on selected attribute. If column doesn't exist then -1 will be returned.- Specified by:
findColumnIndexin interfaceExcelTemplateService- Parameters:
typeSystemSheet- - sheet which contains information about type systemsheet- sheet for current typeselectedAttribute- attribute for which column index should be found.- Returns:
- column index for given selected attribute. If column doesn't exist then -1 will be returned.
-
createTypeSheet
public org.apache.poi.ss.usermodel.Sheet createTypeSheet(java.lang.String typeCode, org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.Description copied from interface:ExcelTemplateServiceCreates a new type sheet in given workbook. If a sheet with given typeCode already exists, it is returned without creating an extra one.- Specified by:
createTypeSheetin interfaceExcelTemplateService- Parameters:
typeCode- a new sheet nameworkbook- workbook which will be extended by a new sheet- Returns:
- sheet
-
findTypeCodeForSheetName
public java.lang.String findTypeCodeForSheetName(java.lang.String sheetName, org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.Description copied from interface:ExcelTemplateServiceFinds type code for given sheet name.- Specified by:
findTypeCodeForSheetNamein interfaceExcelTemplateService- Parameters:
sheetName- sheet name.workbook- workbook.- Returns:
- found type code.
-
findSheetNameForTypeCode
public java.lang.String findSheetNameForTypeCode(java.lang.String typeCode, org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.Description copied from interface:ExcelTemplateServiceFinds sheet name for given type code.- Specified by:
findSheetNameForTypeCodein interfaceExcelTemplateService- Parameters:
typeCode- type codeworkbook- workbook- Returns:
- found type code.
-
addTypeSheet
public void addTypeSheet(java.lang.String typeName, org.apache.poi.ss.usermodel.Workbook workbook)Deprecated.Description copied from interface:ExcelTemplateServiceAdds a new sheet to given workbook.- Specified by:
addTypeSheetin interfaceExcelTemplateService- Parameters:
typeName- a new sheet name.workbook- workbook which will be extended by a new sheet
-
insertAttributeHeader
public void insertAttributeHeader(org.apache.poi.ss.usermodel.Sheet sheet, SelectedAttribute selectedAttribute, int columnIndex)Deprecated.Description copied from interface:ExcelTemplateServiceInserts value to the sheet's header (first row)- Specified by:
insertAttributeHeaderin interfaceExcelTemplateService- Parameters:
sheet- where the value will be insertedselectedAttribute- a pojo which allows to retrieve value to insertcolumnIndex- index of a column for inserted value
-
insertAttributesHeader
public void insertAttributesHeader(org.apache.poi.ss.usermodel.Sheet sheet, java.util.Collection<SelectedAttribute> selectedAttributes)Deprecated.Description copied from interface:ExcelTemplateServiceA shortcut forExcelTemplateService.insertAttributeHeader(Sheet, SelectedAttribute, int)It is possible to inserts all values to the header at once instead of invokingExcelTemplateService.insertAttributeHeader(Sheet, SelectedAttribute, int)for every attribute separately- Specified by:
insertAttributesHeaderin interfaceExcelTemplateService- Parameters:
sheet- where the value will be insertedselectedAttributes- a pojo which allows to retrieve value to insert
-
insertAttributeValue
public void insertAttributeValue(org.apache.poi.ss.usermodel.Cell cell, java.lang.Object object)Deprecated.Description copied from interface:ExcelTemplateServiceInserts given value to a given cell- Specified by:
insertAttributeValuein interfaceExcelTemplateService- Parameters:
cell- where the value will be insertedobject- a value to insert
-
createEmptyRow
public org.apache.poi.ss.usermodel.Row createEmptyRow(org.apache.poi.ss.usermodel.Sheet sheet)
Deprecated.Description copied from interface:ExcelTemplateServiceCreates an empty row in given sheet.- Specified by:
createEmptyRowin interfaceExcelTemplateService- Parameters:
sheet- where the row will be created- Returns:
- row
-
getAttributeDisplayName
public java.lang.String getAttributeDisplayName(AttributeDescriptorModel attributeDescriptorModel, java.lang.String isoCode)
Deprecated.Description copied from interface:ExcelTemplateServiceReturns displayed header name based on attribute descriptor- Specified by:
getAttributeDisplayNamein interfaceExcelTemplateService- Parameters:
attributeDescriptorModel- attribute descriptor of selected attributeisoCode- - isoCode of language- Returns:
- displayed header name based on attribute descriptor
-
hideUtilitySheet
@Deprecated protected void hideUtilitySheet(org.apache.poi.ss.usermodel.Workbook workbook, java.lang.String sheetName)Deprecated.since 1808. Process of hiding sheets was moved toHideUtilitySheetsDecorator
-
getUtilitySheetHiddenLevel
@Deprecated protected int getUtilitySheetHiddenLevel()
Deprecated.since 1808. Process of hiding sheets was moved toHideUtilitySheetsDecorator
-
activateFirstNonUtilitySheet
@Deprecated protected void activateFirstNonUtilitySheet(org.apache.poi.ss.usermodel.Workbook workbook)
Deprecated.since 1808. Process of hiding sheets was moved toHideUtilitySheetsDecorator
-
populateTypeSystemSheet
@Deprecated protected void populateTypeSystemSheet(ComposedTypeModel composedType, org.apache.poi.ss.usermodel.Workbook workbook)
Deprecated.since 1808, please useTypeSystemSheetPopulator.populate(ExcelExportResult)instead. The typeSystem sheet is now being populated inExcelExportWorkbookPostProcessorviaExcelExportWorkbookDecorator
-
addAttributeToExcelTypeSystemSheet
@Deprecated protected void addAttributeToExcelTypeSystemSheet(AttributeDescriptorModel attributeDescriptor, org.apache.poi.ss.usermodel.Sheet sheet)
Deprecated.since 1808, please useTypeSystemSheetPopulator.populate(ExcelExportResult)instead. The typeSystem sheet is now being populated inExcelExportWorkbookPostProcessorviaExcelExportWorkbookDecorator
-
addAttributeToExcelTypeSystemSheet
@Deprecated protected void addAttributeToExcelTypeSystemSheet(AttributeDescriptorModel attributeDescriptor, org.apache.poi.ss.usermodel.Sheet sheet, java.lang.String langIsoCode)
Deprecated.since 1808, please useTypeSystemSheetPopulator.populate(ExcelExportResult)instead. The typeSystem sheet is now being populated inExcelExportWorkbookPostProcessorviaExcelExportWorkbookDecorator
-
isMandatory
@Deprecated protected boolean isMandatory(AttributeDescriptorModel attributeDescriptor, java.lang.String langIsoCode)
Deprecated.since 1808. Logic was moved toDisplayNameAttributeNameFormatter
-
getAttributeDescriptorName
@Deprecated protected java.lang.String getAttributeDescriptorName(AttributeDescriptorModel attributeDescriptor)
Deprecated.since 1808. Logic was moved toDisplayNameAttributeNameFormatter
-
setCellService
public void setCellService(ExcelCellService cellService)
Deprecated.
-
setHeaderService
public void setHeaderService(ExcelHeaderService headerService)
Deprecated.
-
setSheetService
public void setSheetService(ExcelSheetService sheetService)
Deprecated.
-
setWorkbookService
public void setWorkbookService(ExcelWorkbookService workbookService)
Deprecated.
-
setAttributeNameFormatter
public void setAttributeNameFormatter(AttributeNameFormatter<ExcelAttributeDescriptorAttribute> attributeNameFormatter)
Deprecated.
-
getTypeService
public TypeService getTypeService()
Deprecated.
-
setTypeService
public void setTypeService(TypeService typeService)
Deprecated.
-
getCommonI18NService
@Deprecated public CommonI18NService getCommonI18NService()
Deprecated.since 1808.
-
setCommonI18NService
@Deprecated public void setCommonI18NService(CommonI18NService commonI18NService)
Deprecated.since 1808.
-
getExcelTranslatorRegistry
@Deprecated public ExcelTranslatorRegistry getExcelTranslatorRegistry()
Deprecated.since 1808.
-
setExcelTranslatorRegistry
@Deprecated public void setExcelTranslatorRegistry(ExcelTranslatorRegistry excelTranslatorRegistry)
Deprecated.since 1808.
-
getPermissionCRUDService
@Deprecated public PermissionCRUDService getPermissionCRUDService()
Deprecated.since 1808.
-
setPermissionCRUDService
@Deprecated public void setPermissionCRUDService(PermissionCRUDService permissionCRUDService)
Deprecated.since 1808.
-
getExcelDateUtils
@Deprecated public ExcelDateUtils getExcelDateUtils()
Deprecated.since 1808.
-
setExcelDateUtils
@Deprecated public void setExcelDateUtils(ExcelDateUtils excelDateUtils)
Deprecated.since 1808.
-
getExcelSheetNamingStrategy
@Deprecated public ExcelSheetNamingStrategy getExcelSheetNamingStrategy()
Deprecated.since 1808.
-
setExcelSheetNamingStrategy
@Deprecated public void setExcelSheetNamingStrategy(ExcelSheetNamingStrategy excelSheetNamingStrategy)
Deprecated.since 1808.
-
-