Class ImportExcelInJobRequest

  • All Implemented Interfaces:
    Serializable

    public class ImportExcelInJobRequest
    extends FileImportRequest
    The request defining import call properties from an Excel file.
    See Also:
    Serialized Form
    • Field Detail

      • sheetName

        protected String sheetName
        The name of the Excel sheet.

        If the name is null and sheetIndex is null, the first sheet of the workbook will be used for the import.

        If the name is null and sheetIndex is not null, the sheet with the index specified by value of sheetIndex will be used for the import.

      • sheetIndex

        protected Integer sheetIndex
        The index of the Excel sheet.

        If the index is null and sheetName is null, the first sheet of the workbook will be used for the import.

        If the index is null and sheetName is not null, the sheet with the name specified by value of sheetName will be used for the import.

      • headerRow

        @DefaultValue("false")
        protected boolean headerRow
        Whether the first row of the imported Excel sheet is the header. The default value is false.
      • template

        @NotBlank
        protected @NotBlank String template
        The template that should be used for parsing and importing the contents of the Excel file.

        There is one placeholder currently supported:

        • ${x} - refers to the x-th column in the Excel file, e.g. ${1}, ${2}, ...)

        Example of a correct JSON template:

         [
           {
             "identifier": {
               "name": "${1}",
               "domain": {
                 "name": "${2}",
                 "community": {
                   "name": "Some Community"
                 }
               }
             },
             "attributes" : {
                "00000000-0000-0000-0000-000000003115" : [ {
                  "value" : "${3}"
                } ],
                "00000000-0000-0000-0000-000000000222" : [ {
                  "value" : "${4}"
                } ]
             },
             "resourceType": "Asset"
           }
         ]
         
    • Constructor Detail

      • ImportExcelInJobRequest

        public ImportExcelInJobRequest()
    • Method Detail

      • getSheetName

        public String getSheetName()
        The name of the Excel sheet.

        If the name is null and sheetIndex is null, the first sheet of the workbook will be used for the import.

        If the name is null and sheetIndex is not null, the sheet with the index specified by value of sheetIndex will be used for the import.

      • getSheetIndex

        public Integer getSheetIndex()
        The index of the Excel sheet.

        If the index is null and sheetName is null, the first sheet of the workbook will be used for the import.

        If the index is null and sheetName is not null, the sheet with the name specified by value of sheetName will be used for the import.

      • isHeaderRow

        public boolean isHeaderRow()
        Whether the first row of the imported Excel sheet is the header. The default value is false.
      • getTemplate

        public String getTemplate()
        The template that should be used for parsing and importing the contents of the Excel file.

        There is one placeholder currently supported:

        • ${x} - refers to the x-th column in the Excel file, e.g. ${1}, ${2}, ...)

        Example of a correct JSON template:

         [
           {
             "identifier": {
               "name": "${1}",
               "domain": {
                 "name": "${2}",
                 "community": {
                   "name": "Some Community"
                 }
               }
             },
             "attributes" : {
                "00000000-0000-0000-0000-000000003115" : [ {
                  "value" : "${3}"
                } ],
                "00000000-0000-0000-0000-000000000222" : [ {
                  "value" : "${4}"
                } ]
             },
             "resourceType": "Asset"
           }
         ]