Class SynchronizationBatchExcelInJobRequest.SynchronizationBatchExcelInJobRequestBuilder
- Enclosing class:
SynchronizationBatchExcelInJobRequest
-
Method Summary
Modifier and TypeMethodDescriptionbatchSize
(int batchSize) Sets the size of the batch.build()
deleteFile
(boolean deleteFile) Sets whether the Excel file should be deleted after the synchronization job is finished, regardless of the result.Sets the Excel file to upload.Sets theid
of uploaded Excel file.Sets the name of the Excel file to upload.headerRow
(boolean headerRow) Sets whether the first row of the synchronized Excel file is the header.sendNotification
(boolean sendNotification) Sets whether job status notification should be sent.sheetIndex
(Integer sheetIndex) Sets the index of the Excel sheet.Sets the name of the Excel sheet.simulation
(boolean simulation) Sets whether the synchronization should be triggered as a simulation.synchronizationId
(String synchronizationId) (required) Sets the synchronizationid
used to distinguish different synchronizations.Sets the template that should be used for parsing and synchronizing the contents of the Excel file.
-
Method Details
-
synchronizationId
public SynchronizationBatchExcelInJobRequest.SynchronizationBatchExcelInJobRequestBuilder synchronizationId(String synchronizationId) (required) Sets the synchronizationid
used to distinguish different synchronizations.- Parameters:
synchronizationId
- the synchronizationid
used to distinguish different synchronizations
-
sheetName
public SynchronizationBatchExcelInJobRequest.SynchronizationBatchExcelInJobRequestBuilder sheetName(String sheetName) Sets the name of the Excel sheet.If the name is
null
andSynchronizationBatchExcelInJobRequest.sheetIndex
isnull
, the first sheet of the workbook will be used for the synchronization.If the name is
null
andSynchronizationBatchExcelInJobRequest.sheetIndex
is notnull
, the sheet with the index specified by value ofSynchronizationBatchExcelInJobRequest.sheetIndex
will be used for the synchronization.- Parameters:
sheetName
- the name of the sheet
-
sheetIndex
public SynchronizationBatchExcelInJobRequest.SynchronizationBatchExcelInJobRequestBuilder sheetIndex(Integer sheetIndex) Sets the index of the Excel sheet.If the index is
null
andSynchronizationBatchExcelInJobRequest.sheetName
isnull
, the first sheet of the workbook will be used for the synchronization.If the index is
null
andSynchronizationBatchExcelInJobRequest.sheetName
is notnull
, the sheet with the name specified by value ofSynchronizationBatchExcelInJobRequest.sheetName
will be used for the synchronization.- Parameters:
sheetIndex
- the index of the sheet
-
headerRow
public SynchronizationBatchExcelInJobRequest.SynchronizationBatchExcelInJobRequestBuilder headerRow(boolean headerRow) Sets whether the first row of the synchronized Excel file is the header. The default value isfalse
.- Parameters:
headerRow
- whether the first row of the synchronized Excel file is the header
-
template
public SynchronizationBatchExcelInJobRequest.SynchronizationBatchExcelInJobRequestBuilder template(String template) Sets the template that should be used for parsing and synchronizing the contents of the Excel file.There are two types of placeholders currently supported:
- ${x} - refers to the x-th column in the Excel file (with numbering starting from 0, e.g. ${0}, ${1}, ...)
Example of a correct JSON template:
[ { "identifier": { "name": "${0}", "domain": { "name": "${1}", "community": { "name": "Some Community" } } }, "attributes" : { "00000000-0000-0000-0000-000000003115" : [ { "value" : "${2}" } ], "00000000-0000-0000-0000-000000000222" : [ { "value" : "${3}" } ] }, "resourceType": "Asset" } ]
- Parameters:
template
- the template that should be used for parsing and synchronizing the contents of the Excel file
-
fileId
public SynchronizationBatchExcelInJobRequest.SynchronizationBatchExcelInJobRequestBuilder fileId(UUID fileId) Sets theid
of uploaded Excel file.NOTE: if this field is used,
FileImportRequest.file
should not be set.- Parameters:
fileId
- theid
of uploaded Excel file
-
file
public SynchronizationBatchExcelInJobRequest.SynchronizationBatchExcelInJobRequestBuilder file(File file) Sets the Excel file to upload. If set, then alsoFileImportRequest.fileName
should be provided.NOTE: if this field is used,
FileImportRequest.fileId
should not be set.- Parameters:
file
- the Excel file to upload
-
fileName
public SynchronizationBatchExcelInJobRequest.SynchronizationBatchExcelInJobRequestBuilder fileName(String fileName) Sets the name of the Excel file to upload. If set, then alsoFileImportRequest.file
should be provided.NOTE: if this field is used,
FileImportRequest.fileId
should not be set.- Parameters:
fileName
- the name of the Excel file to upload
-
deleteFile
public SynchronizationBatchExcelInJobRequest.SynchronizationBatchExcelInJobRequestBuilder deleteFile(boolean deleteFile) Sets whether the Excel file should be deleted after the synchronization job is finished, regardless of the result. The default value isfalse
.NOTE: if the Excel file corresponds to an attachment, the attachment will be deleted. When import operation fails then file will not be deleted.
- Parameters:
deleteFile
- whether the Excel file should be deleted after the synchronization job is finished
-
sendNotification
public SynchronizationBatchExcelInJobRequest.SynchronizationBatchExcelInJobRequestBuilder sendNotification(boolean sendNotification) Sets whether job status notification should be sent. The default value isfalse
.- Parameters:
sendNotification
- whether job status notification should be sent
-
batchSize
public SynchronizationBatchExcelInJobRequest.SynchronizationBatchExcelInJobRequestBuilder batchSize(int batchSize) Sets the size of the batch. The default value is1000
.- Parameters:
batchSize
- the size of the batch
-
simulation
public SynchronizationBatchExcelInJobRequest.SynchronizationBatchExcelInJobRequestBuilder simulation(boolean simulation) Sets whether the synchronization should be triggered as a simulation. The default value isfalse
.If
true
, the result of the synchronization simulation will be available at the end of the job but no change will be applied to the DGC.- Parameters:
simulation
- whether the synchronization should be triggered as a simulation
-
build
-