Class SynchronizationExcelInJobRequest
Object
BaseImportRequest
FileSynchronizationRequest
FullSynchronizationRequest
SynchronizationExcelInJobRequest
- All Implemented Interfaces:
Serializable
The request defining synchronization call properties from a Excel file.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Whether the first row of the synchronized Excel file is the header.protected Integer
The index of the Excel sheet.protected String
The name of the Excel sheet.protected @NotBlank String
The template that should be used for parsing and synchronizing the contents of the Excel file.Fields inherited from class FullSynchronizationRequest
finalizationStrategy, missingAssetStatusId
Fields inherited from class FileSynchronizationRequest
continueOnError, deleteFile, file, fileId, fileName, synchronizationId
Fields inherited from class BaseImportRequest
batchSize, DEFAULT_BATCH_SIZE, requestSource, saveResult, sendNotification, simulation
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
protected boolean
boolean
Map
<SynchronizationJsonInJobRequest.SynchronizationJsonInJobRequestBuilder.CustomFinalizationParameter, String> The index of the Excel sheet.The name of the Excel sheet.The template that should be used for parsing and synchronizing the contents of the Excel file.int
hashCode()
boolean
Whether the first row of the synchronized Excel file is the header.toString()
Methods inherited from class FullSynchronizationRequest
getFinalizationStrategy, getMissingAssetStatusId
Methods inherited from class FileSynchronizationRequest
getFile, getFileId, getFileName, getSynchronizationId, isContinueOnError, isDeleteFile, setContinueOnError, setDeleteFile, setFile, setFileId, setFileName, setSynchronizationId
Methods 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
null
andsheetIndex
isnull
, the first sheet of the workbook will be used for the synchronization.If the name is
null
andsheetIndex
is notnull
, the sheet with the index specified by value ofsheetIndex
will be used for the synchronization. -
sheetIndex
-
headerRow
protected boolean headerRowWhether the first row of the synchronized Excel file is the header. The default value isfalse
. -
template
The template that should be used for parsing and synchronizing 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
-
SynchronizationExcelInJobRequest
public SynchronizationExcelInJobRequest()
-
-
Method Details
-
builder
-
getSheetName
The name of the Excel sheet.If the name is
null
andsheetIndex
isnull
, the first sheet of the workbook will be used for the synchronization.If the name is
null
andsheetIndex
is notnull
, the sheet with the index specified by value ofsheetIndex
will be used for the synchronization. -
getSheetIndex
-
isHeaderRow
public boolean isHeaderRow()Whether the first row of the synchronized Excel file is the header. The default value isfalse
. -
getTemplate
The template that should be used for parsing and synchronizing 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" } ]
-
getFinalizationParameters
public Map<SynchronizationJsonInJobRequest.SynchronizationJsonInJobRequestBuilder.CustomFinalizationParameter,String> getFinalizationParameters() -
toString
- Overrides:
toString
in classFullSynchronizationRequest
-
equals
- Overrides:
equals
in classFullSynchronizationRequest
-
canEqual
- Overrides:
canEqual
in classFullSynchronizationRequest
-
hashCode
public int hashCode()- Overrides:
hashCode
in classFullSynchronizationRequest
-