Class DefaultExcelHeaderService

    • Constructor Detail

      • DefaultExcelHeaderService

        public DefaultExcelHeaderService()
    • Method Detail

      • getHeaders

        public java.util.Collection<SelectedAttribute> getHeaders​(org.apache.poi.ss.usermodel.Sheet metaInformationSheet,
                                                                  org.apache.poi.ss.usermodel.Sheet typeSheet)
        Description copied from interface: ExcelHeaderService
        Returns list of selected attributes for given sheet, based on metainformation from type system sheet.
        Specified by:
        getHeaders in interface ExcelHeaderService
        Parameters:
        metaInformationSheet - Sheet contains metaInformation about attributes for each type sheets
        typeSheet - Sheet contains data for given sheet
        Returns:
        collection of selected attributes
      • getHeaderDisplayNames

        public java.util.Collection<java.lang.String> getHeaderDisplayNames​(org.apache.poi.ss.usermodel.Sheet sheet)
        Description copied from interface: ExcelHeaderService
        Returns list of attribute display names, that is: the contents of the display name row: ExcelTemplateConstants.Header.DISPLAY_NAME
        Specified by:
        getHeaderDisplayNames in interface ExcelHeaderService
        Parameters:
        sheet - The Sheet from which the display names should be taken
        Returns:
        List of display names for each attribute in the sheet
      • getSelectedAttributesQualifiers

        public java.util.Collection<SelectedAttributeQualifier> getSelectedAttributesQualifiers​(org.apache.poi.ss.usermodel.Sheet metaInformationSheet,
                                                                                                org.apache.poi.ss.usermodel.Sheet typeSheet)
        Description copied from interface: ExcelHeaderService
        Returns qualifiers of attributes which at selected in the typSheet
        Specified by:
        getSelectedAttributesQualifiers in interface ExcelHeaderService
        Parameters:
        metaInformationSheet - Sheet contains metaInformation about attributes for each type sheets
        typeSheet - Sheet contains data for given sheet
        Returns:
        collection of selected attributes.
      • insertAttributeHeader

        public void insertAttributeHeader​(org.apache.poi.ss.usermodel.Sheet sheet,
                                          ExcelAttribute excelAttribute,
                                          int columnIndex)
        Description copied from interface: ExcelHeaderService
        Inserts value to the sheet's header
        Specified by:
        insertAttributeHeader in interface ExcelHeaderService
        Parameters:
        sheet - where the value will be inserted
        excelAttribute - a pojo which allows to retrieve value to insert
        columnIndex - index of a column for inserted value
      • findTypeSystemRowForGivenHeader

        protected java.util.Optional<org.apache.poi.ss.usermodel.Row> findTypeSystemRowForGivenHeader​(org.apache.poi.ss.usermodel.Sheet metaInformationSheet,
                                                                                                      java.lang.String typeCode,
                                                                                                      java.lang.String header)
      • loadIsoCode

        protected java.lang.String loadIsoCode​(org.apache.poi.ss.usermodel.Row row,
                                               java.lang.String header)
      • loadAttributeDescriptor

        protected AttributeDescriptorModel loadAttributeDescriptor​(org.apache.poi.ss.usermodel.Row row,
                                                                   java.lang.String typeCode)
      • setTypeService

        public void setTypeService​(TypeService typeService)
      • setCollectionFormatter

        public void setCollectionFormatter​(CollectionFormatter collectionFormatter)
      • setExcelSheetService

        public void setExcelSheetService​(ExcelSheetService excelSheetService)
      • setExcelCellService

        public void setExcelCellService​(ExcelCellService excelCellService)
      • setExcelTranslatorRegistry

        public void setExcelTranslatorRegistry​(ExcelTranslatorRegistry excelTranslatorRegistry)