Class DefaultExcelTemplateService

java.lang.Object
com.hybris.backoffice.excel.template.DefaultExcelTemplateService
All Implemented Interfaces:
ExcelTemplateService

@Deprecated(since="1808", forRemoval=true) public class DefaultExcelTemplateService extends Object implements ExcelTemplateService
Deprecated, for removal: This API element is subject to removal in a future version.
since 1808.
  • Constructor Details

    • DefaultExcelTemplateService

      public DefaultExcelTemplateService()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • createWorkbook

      public org.apache.poi.ss.usermodel.Workbook createWorkbook(InputStream is)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Creates workbook object based on inputStream of excel file. If inputStream doesn't contains excel file then new empty Workbook will be returned.
      Specified by:
      createWorkbook in interface ExcelTemplateService
      Parameters:
      is - Input stream of excel file
      Returns:
      Workbook object which represents excel file
    • getTypeSystemSheet

      public org.apache.poi.ss.usermodel.Sheet getTypeSystemSheet(org.apache.poi.ss.usermodel.Workbook workbook)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Returns sheet which contains metadata about type system
      Specified by:
      getTypeSystemSheet in interface ExcelTemplateService
      Parameters:
      workbook - Workbook object which represents excel file
      Returns:
      Sheet which contains information about type system
    • getSheetsNames

      public List<String> getSheetsNames(org.apache.poi.ss.usermodel.Workbook workbook)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Returns all sheets names except utility sheets.
      Specified by:
      getSheetsNames in interface ExcelTemplateService
      Parameters:
      workbook - Workbook object which represents excel file
      Returns:
      list of sheets names
    • getSheets

      public List<org.apache.poi.ss.usermodel.Sheet> getSheets(org.apache.poi.ss.usermodel.Workbook workbook)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Returns all sheets except utility sheets.
      Specified by:
      getSheets in interface ExcelTemplateService
      Parameters:
      workbook - Workbook object which represents excel file
      Returns:
      list of sheets
    • getCellValue

      public String getCellValue(org.apache.poi.ss.usermodel.Cell cell)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Returns 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:
      getCellValue in interface ExcelTemplateService
      Parameters:
      cell - Cell
      Returns:
      string value of cell
    • getHeaders

      public List<SelectedAttribute> getHeaders(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet typeSheet)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Returns list of selected attributes for given sheet, based on metainformation from type system sheet.
      Specified by:
      getHeaders in interface ExcelTemplateService
      Parameters:
      typeSystemSheet - Sheet contains metainformation about attributes for each type sheets
      typeSheet - Sheet contains data for given sheet
      Returns:
      list of selected attributes
    • getSelectedAttributesQualifiers

      public List<SelectedAttributeQualifier> getSelectedAttributesQualifiers(org.apache.poi.ss.usermodel.Sheet typeSystemSheet, org.apache.poi.ss.usermodel.Sheet typeSheet)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Returns qualifiers of attributes which at selected in the typSheet
      Specified by:
      getSelectedAttributesQualifiers in interface ExcelTemplateService
      Parameters:
      typeSystemSheet - Sheet contains metainformation about attributes for each type sheets
      typeSheet - Sheet contains 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, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Finds column index based on selected attribute. If column doesn't exist then -1 will be returned.
      Specified by:
      findColumnIndex in interface ExcelTemplateService
      Parameters:
      typeSystemSheet - - sheet which contains information about type system
      sheet - sheet for current type
      selectedAttribute - 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(String typeCode, org.apache.poi.ss.usermodel.Workbook workbook)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Creates 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:
      createTypeSheet in interface ExcelTemplateService
      Parameters:
      typeCode - a new sheet name
      workbook - workbook which will be extended by a new sheet
      Returns:
      sheet
    • findTypeCodeForSheetName

      public String findTypeCodeForSheetName(String sheetName, org.apache.poi.ss.usermodel.Workbook workbook)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Finds type code for given sheet name.
      Specified by:
      findTypeCodeForSheetName in interface ExcelTemplateService
      Parameters:
      sheetName - sheet name.
      workbook - workbook.
      Returns:
      found type code.
    • findSheetNameForTypeCode

      public String findSheetNameForTypeCode(String typeCode, org.apache.poi.ss.usermodel.Workbook workbook)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Finds sheet name for given type code.
      Specified by:
      findSheetNameForTypeCode in interface ExcelTemplateService
      Parameters:
      typeCode - type code
      workbook - workbook
      Returns:
      found type code.
    • addTypeSheet

      public void addTypeSheet(String typeName, org.apache.poi.ss.usermodel.Workbook workbook)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Adds a new sheet to given workbook.
      Specified by:
      addTypeSheet in interface ExcelTemplateService
      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, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Inserts value to the sheet's header (first row)
      Specified by:
      insertAttributeHeader in interface ExcelTemplateService
      Parameters:
      sheet - where the value will be inserted
      selectedAttribute - a pojo which allows to retrieve value to insert
      columnIndex - index of a column for inserted value
    • insertAttributesHeader

      public void insertAttributesHeader(org.apache.poi.ss.usermodel.Sheet sheet, Collection<SelectedAttribute> selectedAttributes)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      A shortcut for ExcelTemplateService.insertAttributeHeader(Sheet, SelectedAttribute, int) It is possible to inserts all values to the header at once instead of invoking ExcelTemplateService.insertAttributeHeader(Sheet, SelectedAttribute, int) for every attribute separately
      Specified by:
      insertAttributesHeader in interface ExcelTemplateService
      Parameters:
      sheet - where the value will be inserted
      selectedAttributes - a pojo which allows to retrieve value to insert
    • insertAttributeValue

      public void insertAttributeValue(org.apache.poi.ss.usermodel.Cell cell, Object object)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Inserts given value to a given cell
      Specified by:
      insertAttributeValue in interface ExcelTemplateService
      Parameters:
      cell - where the value will be inserted
      object - a value to insert
    • createEmptyRow

      public org.apache.poi.ss.usermodel.Row createEmptyRow(org.apache.poi.ss.usermodel.Sheet sheet)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Creates an empty row in given sheet.
      Specified by:
      createEmptyRow in interface ExcelTemplateService
      Parameters:
      sheet - where the row will be created
      Returns:
      row
    • getAttributeDisplayName

      public String getAttributeDisplayName(AttributeDescriptorModel attributeDescriptorModel, String isoCode)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ExcelTemplateService
      Returns displayed header name based on attribute descriptor
      Specified by:
      getAttributeDisplayName in interface ExcelTemplateService
      Parameters:
      attributeDescriptorModel - attribute descriptor of selected attribute
      isoCode - - isoCode of language
      Returns:
      displayed header name based on attribute descriptor
    • hideUtilitySheet

      @Deprecated(since="1808", forRemoval=true) protected void hideUtilitySheet(org.apache.poi.ss.usermodel.Workbook workbook, String sheetName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808. Process of hiding sheets was moved to HideUtilitySheetsDecorator
    • getUtilitySheetHiddenLevel

      @Deprecated(since="1808", forRemoval=true) protected int getUtilitySheetHiddenLevel()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808. Process of hiding sheets was moved to HideUtilitySheetsDecorator
    • activateFirstNonUtilitySheet

      @Deprecated(since="1808", forRemoval=true) protected void activateFirstNonUtilitySheet(org.apache.poi.ss.usermodel.Workbook workbook)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808. Process of hiding sheets was moved to HideUtilitySheetsDecorator
    • populateTypeSystemSheet

      @Deprecated(since="1808", forRemoval=true) protected void populateTypeSystemSheet(ComposedTypeModel composedType, org.apache.poi.ss.usermodel.Workbook workbook)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808, please use TypeSystemSheetPopulator.populate(ExcelExportResult) instead. The typeSystem sheet is now being populated in ExcelExportWorkbookPostProcessor via ExcelExportWorkbookDecorator
    • addAttributeToExcelTypeSystemSheet

      @Deprecated(since="1808", forRemoval=true) protected void addAttributeToExcelTypeSystemSheet(AttributeDescriptorModel attributeDescriptor, org.apache.poi.ss.usermodel.Sheet sheet)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808, please use TypeSystemSheetPopulator.populate(ExcelExportResult) instead. The typeSystem sheet is now being populated in ExcelExportWorkbookPostProcessor via ExcelExportWorkbookDecorator
    • addAttributeToExcelTypeSystemSheet

      @Deprecated(since="1808", forRemoval=true) protected void addAttributeToExcelTypeSystemSheet(AttributeDescriptorModel attributeDescriptor, org.apache.poi.ss.usermodel.Sheet sheet, String langIsoCode)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808, please use TypeSystemSheetPopulator.populate(ExcelExportResult) instead. The typeSystem sheet is now being populated in ExcelExportWorkbookPostProcessor via ExcelExportWorkbookDecorator
    • isMandatory

      @Deprecated(since="1808", forRemoval=true) protected boolean isMandatory(AttributeDescriptorModel attributeDescriptor, String langIsoCode)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808. Logic was moved to DisplayNameAttributeNameFormatter
    • getAttributeDescriptorName

      @Deprecated(since="1808", forRemoval=true) protected String getAttributeDescriptorName(AttributeDescriptorModel attributeDescriptor)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808. Logic was moved to DisplayNameAttributeNameFormatter
    • setCellService

      public void setCellService(ExcelCellService cellService)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setHeaderService

      public void setHeaderService(ExcelHeaderService headerService)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setSheetService

      public void setSheetService(ExcelSheetService sheetService)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setWorkbookService

      public void setWorkbookService(ExcelWorkbookService workbookService)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setAttributeNameFormatter

      public void setAttributeNameFormatter(AttributeNameFormatter<ExcelAttributeDescriptorAttribute> attributeNameFormatter)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getTypeService

      public TypeService getTypeService()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setTypeService

      public void setTypeService(TypeService typeService)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getCommonI18NService

      @Deprecated(since="1808", forRemoval=true) public CommonI18NService getCommonI18NService()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808.
    • setCommonI18NService

      @Deprecated(since="1808", forRemoval=true) public void setCommonI18NService(CommonI18NService commonI18NService)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808.
    • getExcelTranslatorRegistry

      @Deprecated(since="1808", forRemoval=true) public ExcelTranslatorRegistry getExcelTranslatorRegistry()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808.
    • setExcelTranslatorRegistry

      @Deprecated(since="1808", forRemoval=true) public void setExcelTranslatorRegistry(ExcelTranslatorRegistry excelTranslatorRegistry)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808.
    • getPermissionCRUDService

      @Deprecated(since="1808", forRemoval=true) public PermissionCRUDService getPermissionCRUDService()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808.
    • setPermissionCRUDService

      @Deprecated(since="1808", forRemoval=true) public void setPermissionCRUDService(PermissionCRUDService permissionCRUDService)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808.
    • getExcelDateUtils

      @Deprecated(since="1808", forRemoval=true) public ExcelDateUtils getExcelDateUtils()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808.
    • setExcelDateUtils

      @Deprecated(since="1808", forRemoval=true) public void setExcelDateUtils(ExcelDateUtils excelDateUtils)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808.
    • getExcelSheetNamingStrategy

      @Deprecated(since="1808", forRemoval=true) public ExcelSheetNamingStrategy getExcelSheetNamingStrategy()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808.
    • setExcelSheetNamingStrategy

      @Deprecated(since="1808", forRemoval=true) public void setExcelSheetNamingStrategy(ExcelSheetNamingStrategy excelSheetNamingStrategy)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1808.