Class SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
- Object
-
- SynchronizationCsvInJobRequestBuilder
-
- Enclosing class:
- SynchronizationCsvInJobRequest
public static final class SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
batchSize(int batchSize)
Sets the size of the batch.SynchronizationCsvInJobRequest
build()
SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
deleteFile(boolean deleteFile)
Sets whether the CSV file should be deleted after the synchronization job is finished, regardless of the result.SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
escape(Character escape)
Sets the delimiter character used to escape separator or quote character.SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
file(File file)
Sets the CSV file to upload.SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
fileId(UUID fileId)
Sets theid
of uploaded CSV file.SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
fileName(String fileName)
Sets the name of the CSV file to upload.SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
headerRow(boolean headerRow)
Sets whether the first row of the synchronized CSV file is the header.SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
ignoreLeadingWhitespace(boolean ignoreLeadingWhitespace)
Sets whether whitespace characters before quotes should be ignored.SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
quote(Character quote)
Sets the delimiter character used for quoted entries.SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
sendNotification(boolean sendNotification)
Sets whether job status notification should be sent.SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
separator(Character separator)
Sets the delimiter character used to separate entries.SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
simulation(boolean simulation)
Sets whether the synchronization should be triggered as a simulation.SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
strictQuotes(boolean strictQuotes)
Sets whether the characters outside quotes should be ignored.SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
synchronizationId(String synchronizationId)
(required) Sets the synchronizationid
used to distinguish different synchronizations.SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder
template(String template)
Sets the template that should be used for parsing and synchronizing the contents of the CSV file.
-
-
-
Method Detail
-
synchronizationId
public SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder synchronizationId(String synchronizationId)
(required) Sets the synchronizationid
used to distinguish different synchronizations.- Parameters:
synchronizationId
- the synchronizationid
used to distinguish different synchronizations
-
separator
public SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder separator(Character separator)
Sets the delimiter character used to separate entries. The default value is';'
.- Parameters:
separator
- the delimiter character used to separate entries
-
quote
public SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder quote(Character quote)
Sets the delimiter character used for quoted entries. The default value is'"'
.- Parameters:
quote
- the delimiter character used for quoted entries
-
escape
public SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder escape(Character escape)
Sets the delimiter character used to escape separator or quote character. The default value is'\\'
.- Parameters:
escape
- the delimiter character used to escape separator or quote character
-
strictQuotes
public SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder strictQuotes(boolean strictQuotes)
Sets whether the characters outside quotes should be ignored. The default value isfalse
.- Parameters:
strictQuotes
- whether the characters outside quotes should be ignored
-
ignoreLeadingWhitespace
public SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder ignoreLeadingWhitespace(boolean ignoreLeadingWhitespace)
Sets whether whitespace characters before quotes should be ignored. The default value isfalse
.- Parameters:
ignoreLeadingWhitespace
- whether whitespace characters before quotes should be ignored
-
headerRow
public SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder headerRow(boolean headerRow)
Sets whether the first row of the synchronized CSV file is the header. The default value isfalse
.- Parameters:
headerRow
- whether the first row of the synchronized CSV file is the header
-
template
public SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder template(String template)
Sets the template that should be used for parsing and synchronizing the contents of the CSV file.There is one placeholder currently supported:
- ${x} - refers to the x-th column in the CSV 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 CSV file
-
fileId
public SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder fileId(UUID fileId)
Sets theid
of uploaded CSV file.NOTE: if this field is used,
FileImportRequest.file
should not be set.- Parameters:
fileId
- theid
of uploaded CSV file
-
file
public SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder file(File file)
Sets the CSV 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 CSV file to upload
-
fileName
public SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder fileName(String fileName)
Sets the name of the CSV 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 CSV file to upload
-
deleteFile
public SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder deleteFile(boolean deleteFile)
Sets whether the CSV file should be deleted after the synchronization job is finished, regardless of the result. The default value isfalse
.NOTE: if the CSV file corresponds to an attachment, the attachment will be deleted. When import operation fails then file will not be deleted.
- Parameters:
deleteFile
- whether the CSV file should be deleted after the synchronization job is finished
-
sendNotification
public SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder 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 SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder batchSize(int batchSize)
Sets the size of the batch. The default value is1000
.- Parameters:
batchSize
- the size of the batch
-
simulation
public SynchronizationCsvInJobRequest.SynchronizationCsvInJobRequestBuilder 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
public SynchronizationCsvInJobRequest build()
-
-