Class ImportExcelInJobRequest
Object
BaseImportRequest
FileImportRequest
ImportExcelInJobRequest
- All Implemented Interfaces:
Serializable
The request defining import call properties from an Excel file.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhether the first row of the imported Excel sheet is the header.protected IntegerThe index of the Excel sheet.protected StringThe name of the Excel sheet.protected @NotBlank StringThe template that should be used for parsing and importing the contents of the Excel file.Fields inherited from class FileImportRequest
continueOnError, deleteFile, file, fileId, fileNameFields inherited from class BaseImportRequest
batchSize, DEFAULT_BATCH_SIZE, requestSource, saveResult, sendNotification, simulation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()protected booleanbooleanThe index of the Excel sheet.The name of the Excel sheet.The template that should be used for parsing and importing the contents of the Excel file.inthashCode()booleanWhether the first row of the imported Excel sheet is the header.toString()Methods inherited from class FileImportRequest
getFile, getFileId, getFileName, isContinueOnError, isDeleteFile, setContinueOnError, setDeleteFile, setFile, setFileId, setFileNameMethods inherited from class BaseImportRequest
getBatchSize, getRequestSource, isSaveResult, isSendNotification, isSimulation, setBatchSize, setRequestSource, setSaveResult, setSendNotification, setSimulation
-
Field Details
-
sheetName
The name of the Excel sheet.If the name is
nullandsheetIndexisnull, the first sheet of the workbook will be used for the import.If the name is
nullandsheetIndexis notnull, the sheet with the index specified by value ofsheetIndexwill be used for the import. -
sheetIndex
-
headerRow
@DefaultValue("false") protected boolean headerRowWhether the first row of the imported Excel sheet is the header. The default value isfalse. -
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 Details
-
ImportExcelInJobRequest
public ImportExcelInJobRequest()
-
-
Method Details
-
builder
-
getSheetName
The name of the Excel sheet.If the name is
nullandsheetIndexisnull, the first sheet of the workbook will be used for the import.If the name is
nullandsheetIndexis notnull, the sheet with the index specified by value ofsheetIndexwill be used for the import. -
getSheetIndex
-
isHeaderRow
public boolean isHeaderRow()Whether the first row of the imported Excel sheet is the header. The default value isfalse. -
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" } ] -
toString
- Overrides:
toStringin classFileImportRequest
-
equals
- Overrides:
equalsin classFileImportRequest
-
canEqual
- Overrides:
canEqualin classFileImportRequest
-
hashCode
public int hashCode()- Overrides:
hashCodein classFileImportRequest
-