Class FileSynchronizationRequest
- Object
-
- BaseImportRequest
-
- FileSynchronizationRequest
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SynchronizationBatchCsvInJobRequest
,SynchronizationBatchExcelInJobRequest
,SynchronizationBatchJsonInJobRequest
,SynchronizationCsvInJobRequest
,SynchronizationExcelInJobRequest
,SynchronizationJsonInJobRequest
public class FileSynchronizationRequest extends BaseImportRequest
The properties for a synchronization from a file.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
continueOnError
Whether the import should continue if some of the import commands are invalid or failed to execute.protected boolean
deleteFile
Whether the file should be deleted after the synchronization job is finished, regardless of the result.protected File
file
The file to upload.protected UUID
fileId
Theid
of uploaded file.protected String
fileName
The name of the file to upload.protected @Size(min=1,max=50) @NotNull String
synchronizationId
The synchronizationid
used to distinguish different synchronizations.-
Fields inherited from class BaseImportRequest
batchSize, DEFAULT_BATCH_SIZE, requestSource, saveResult, sendNotification, simulation
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FileSynchronizationRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
File
getFile()
The file to upload.UUID
getFileId()
Theid
of uploaded file.String
getFileName()
The name of the file to upload.@NotNull String
getSynchronizationId()
The synchronizationid
used to distinguish different synchronizations.int
hashCode()
boolean
isContinueOnError()
Whether the import should continue if some of the import commands are invalid or failed to execute.boolean
isDeleteFile()
Whether the file should be deleted after the synchronization job is finished, regardless of the result.void
setContinueOnError(boolean continueOnError)
Whether the import should continue if some of the import commands are invalid or failed to execute.void
setDeleteFile(boolean deleteFile)
Whether the file should be deleted after the synchronization job is finished, regardless of the result.void
setFile(File file)
The file to upload.void
setFileId(UUID fileId)
Theid
of uploaded file.void
setFileName(String fileName)
The name of the file to upload.void
setSynchronizationId(@NotNull String synchronizationId)
The synchronizationid
used to distinguish different synchronizations.String
toString()
-
Methods inherited from class BaseImportRequest
getBatchSize, getRequestSource, isSaveResult, isSendNotification, isSimulation, setBatchSize, setRequestSource, setSaveResult, setSendNotification, setSimulation
-
-
-
-
Field Detail
-
synchronizationId
@Size(min=1, max=50) @NotNull @PathParam("synchronizationId") protected @Size(min=1,max=50) @NotNull String synchronizationId
The synchronizationid
used to distinguish different synchronizations.
-
fileId
protected UUID fileId
Theid
of uploaded file.NOTE: if this field is used,
file
should not be set.
-
file
protected File file
-
fileName
@DefaultValue("synchronization_file") protected String fileName
-
deleteFile
@DefaultValue("false") protected boolean deleteFile
Whether the file should be deleted after the synchronization job is finished, regardless of the result. The default value isfalse
.NOTE: if the file corresponds to an attachment, the attachment will be deleted. When import operation fails then file will not be deleted.
-
continueOnError
@DefaultValue("false") protected boolean continueOnError
Whether the import should continue if some of the import commands are invalid or failed to execute. The default value isfalse
.If
true
, the valid commands are still committed to the database, which can lead to partial results being stored.
-
-
Method Detail
-
getSynchronizationId
@NotNull public @NotNull String getSynchronizationId()
The synchronizationid
used to distinguish different synchronizations.
-
getFileId
public UUID getFileId()
Theid
of uploaded file.NOTE: if this field is used,
file
should not be set.
-
getFile
public File getFile()
-
getFileName
public String getFileName()
-
isDeleteFile
public boolean isDeleteFile()
Whether the file should be deleted after the synchronization job is finished, regardless of the result. The default value isfalse
.NOTE: if the file corresponds to an attachment, the attachment will be deleted. When import operation fails then file will not be deleted.
-
isContinueOnError
public boolean isContinueOnError()
Whether the import should continue if some of the import commands are invalid or failed to execute. The default value isfalse
.If
true
, the valid commands are still committed to the database, which can lead to partial results being stored.
-
setSynchronizationId
public void setSynchronizationId(@NotNull @NotNull String synchronizationId)
The synchronizationid
used to distinguish different synchronizations.
-
setFileId
public void setFileId(UUID fileId)
Theid
of uploaded file.NOTE: if this field is used,
file
should not be set.
-
setFile
public void setFile(File file)
-
setFileName
public void setFileName(String fileName)
-
setDeleteFile
public void setDeleteFile(boolean deleteFile)
Whether the file should be deleted after the synchronization job is finished, regardless of the result. The default value isfalse
.NOTE: if the file corresponds to an attachment, the attachment will be deleted. When import operation fails then file will not be deleted.
-
setContinueOnError
public void setContinueOnError(boolean continueOnError)
Whether the import should continue if some of the import commands are invalid or failed to execute. The default value isfalse
.If
true
, the valid commands are still committed to the database, which can lead to partial results being stored.
-
toString
public String toString()
- Overrides:
toString
in classBaseImportRequest
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classBaseImportRequest
-
canEqual
protected boolean canEqual(Object other)
- Overrides:
canEqual
in classBaseImportRequest
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBaseImportRequest
-
-