Class SynchronizationCsvInJobRequest
Object
BaseImportRequest
FileSynchronizationRequest
FullSynchronizationRequest
SynchronizationCsvInJobRequest
- All Implemented Interfaces:
Serializable
The request defining synchronization call properties from a CSV file.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
-
Field Summary
Modifier and TypeFieldDescriptionprotected @NotNull Character
The delimiter character used to escape separator or quote character.protected boolean
Whether the first row of the synchronized CSV file is the header.protected boolean
Whether whitespace characters before quotes should be ignored.protected @NotNull Character
The delimiter character used for quoted entries.protected @NotNull Character
The delimiter character used to separate entries.protected boolean
Whether the characters outside quotes should be ignored.protected @NotBlank String
The template that should be used for parsing and synchronizing the contents of the CSV 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
The delimiter character used to escape separator or quote character.Map
<SynchronizationJsonInJobRequest.SynchronizationJsonInJobRequestBuilder.CustomFinalizationParameter, String> getQuote()
The delimiter character used for quoted entries.The delimiter character used to separate entries.The template that should be used for parsing and synchronizing the contents of the CSV file.int
hashCode()
boolean
Whether the first row of the synchronized CSV file is the header.boolean
Whether whitespace characters before quotes should be ignored.boolean
Whether the characters outside quotes should be ignored.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
-
separator
The delimiter character used to separate entries. The default value is';'
. -
quote
The delimiter character used for quoted entries. The default value is'"'
. -
escape
The delimiter character used to escape separator or quote character. The default value is'\\'
. -
strictQuotes
protected boolean strictQuotesWhether the characters outside quotes should be ignored. The default value isfalse
. -
ignoreLeadingWhitespace
protected boolean ignoreLeadingWhitespaceWhether whitespace characters before quotes should be ignored. The default value isfalse
. -
headerRow
protected boolean headerRowWhether the first row of the synchronized CSV file is the header. The default value isfalse
. -
template
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, 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
-
SynchronizationCsvInJobRequest
public SynchronizationCsvInJobRequest()
-
-
Method Details
-
builder
-
getSeparator
The delimiter character used to separate entries. The default value is';'
. -
getQuote
The delimiter character used for quoted entries. The default value is'"'
. -
getEscape
The delimiter character used to escape separator or quote character. The default value is'\\'
. -
isStrictQuotes
public boolean isStrictQuotes()Whether the characters outside quotes should be ignored. The default value isfalse
. -
isIgnoreLeadingWhitespace
public boolean isIgnoreLeadingWhitespace()Whether whitespace characters before quotes should be ignored. The default value isfalse
. -
isHeaderRow
public boolean isHeaderRow()Whether the first row of the synchronized CSV file is the header. The default value isfalse
. -
getTemplate
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, 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
-