Class ImportCsvInJobRequest.ImportCsvInJobRequestBuilder

  • Enclosing class:
    ImportCsvInJobRequest

    public static final class ImportCsvInJobRequest.ImportCsvInJobRequestBuilder
    extends Object
    • Method Detail

      • separator

        public ImportCsvInJobRequest.ImportCsvInJobRequestBuilder separator​(Character separator)
        Sets the delimiter character used to separate entries. The default value is ';'.
        Parameters:
        separator - the delimiter character used to separate entries
      • escape

        public ImportCsvInJobRequest.ImportCsvInJobRequestBuilder 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 ImportCsvInJobRequest.ImportCsvInJobRequestBuilder strictQuotes​(boolean strictQuotes)
        Sets whether the characters outside quotes should be ignored. The default value is false.
        Parameters:
        strictQuotes - whether the characters outside quotes should be ignored
      • ignoreLeadingWhitespace

        public ImportCsvInJobRequest.ImportCsvInJobRequestBuilder ignoreLeadingWhitespace​(boolean ignoreLeadingWhitespace)
        Sets whether whitespace characters before quotes should be ignored. The default value is false.
        Parameters:
        ignoreLeadingWhitespace - whether whitespace characters before quotes should be ignored
      • headerRow

        public ImportCsvInJobRequest.ImportCsvInJobRequestBuilder headerRow​(boolean headerRow)
        Sets whether the first row of the imported CSV file is the header. The default value is false.
        Parameters:
        headerRow - whether the first row of the imported CSV file is the header
      • template

        public ImportCsvInJobRequest.ImportCsvInJobRequestBuilder template​(String template)
        Sets the template that should be used for parsing and importing 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 importing the contents of the CSV file
      • deleteFile

        public ImportCsvInJobRequest.ImportCsvInJobRequestBuilder deleteFile​(boolean deleteFile)
        Sets whether the CSV file should be deleted after the import job is finished, regardless of the result. The default value is false.

        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 import job is finished
      • sendNotification

        public ImportCsvInJobRequest.ImportCsvInJobRequestBuilder sendNotification​(boolean sendNotification)
        Sets whether job status notification should be sent. The default value is false.
        Parameters:
        sendNotification - whether job status notification should be sent
      • simulation

        public ImportCsvInJobRequest.ImportCsvInJobRequestBuilder simulation​(boolean simulation)
        Sets whether the import should be triggered as a simulation. The default value is false.

        If true, the result of the import simulation will be available at the end of the job but no change will be applied to the DGC.

        Parameters:
        simulation - whether the import should be triggered as a simulation