Class UploadControl
java.lang.Object
de.businesscode.bcdui.upload.data.UploadControl
- All Implemented Interfaces:
AutoCloseable
Used for accessing bcd_dataupload_control table
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Possible return codes for steps -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUploadControl
(String uploadId) For reading and updating entries in bcd_dataupload_control BLOB and uploadId are not updatedUploadControl
(String userId, String sourceName, String targetBs, InputStream fileContent) Constructor inserting an initial entry in bcd_dataupload_control -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStepResult
(String stepId, UploadControl.ReturnCode rc) insert a step result with no custom datavoid
addStepResult
(String stepId, UploadControl.ReturnCode rc, String jsonData) insert a step result with extra JSON datavoid
close()
Update all values (except BLOB and uploadId) into bcd_dataupload_controlint
int
static Connection
getManagedUploadConnection
(String stepId) Returns a managed connection to the database where bcd_dataupload_control is located TODO allow to provide a BS name to find the right dbSourcenamegetMappingBindingItemAttribute
(int idx, String name) int
retrieve the position of mapped binding itemvoid
setColumnStartings
(String columnStartings) void
setDateFormat
(String dateFormat) void
setDecimalSeparator
(Character decimalSeparator) void
setDelimiter
(Character delimiter) void
setEncoding
(String encoding) void
setFileBlobIs
(InputStream fileBlobIs) void
setHasHeaderRow
(Boolean hasHeaderRow) void
setImportColumnCount
(int columnCount) void
setImportRowCount
(int rowCount) void
setMappingBindingItemAttribute
(int idx, String name, String value) void
setQuoteChar
(Character quoteChar) void
setSheetName
(String sheetName) void
setSheetRange
(String sheetRange) void
setSourceName
(String sourceName) void
setTargetBs
(String targetBs) void
setUploadId
(String uploadId) void
setUser_comment
(String userComment) void
-
Field Details
-
STEP_ID
-
-
Constructor Details
-
UploadControl
public UploadControl(String userId, String sourceName, String targetBs, InputStream fileContent) throws UploadException Constructor inserting an initial entry in bcd_dataupload_control- Parameters:
userId
-sourceName
-fileContent
-- Throws:
Exception
UploadException
-
UploadControl
For reading and updating entries in bcd_dataupload_control BLOB and uploadId are not updated- Parameters:
uploadId
-- Throws:
Exception
UploadException
-
-
Method Details
-
close
Update all values (except BLOB and uploadId) into bcd_dataupload_control- Specified by:
close
in interfaceAutoCloseable
- Throws:
UploadException
-
getMappingBindingItemAttribute
-
setMappingBindingItemAttribute
-
getMappingBindingItemPos
retrieve the position of mapped binding item- Parameters:
id
-- Returns:
- position (not index); 1-based of the mapping binding item
-
getManagedUploadConnection
Returns a managed connection to the database where bcd_dataupload_control is located TODO allow to provide a BS name to find the right dbSourcename- Returns:
- Throws:
Exception
UploadException
-
addStepResult
public void addStepResult(String stepId, UploadControl.ReturnCode rc, String jsonData) throws UploadException insert a step result with extra JSON data- Parameters:
stepId
-rc
-jsonData
- - a string in JSON notation- Throws:
UploadException
-
addStepResult
insert a step result with no custom data- Parameters:
stepId
-rc
-- Throws:
UploadException
-
getUploadId
-
setUploadId
-
getSourceName
-
setSourceName
-
getUserId
-
setUserId
-
getUserComment
-
setUser_comment
-
getFileBlobIs
- Throws:
Exception
-
setFileBlobIs
-
getDelimiter
-
setDelimiter
-
getEncoding
-
setEncoding
-
getQuoteChar
-
setQuoteChar
-
getDecimalSeparator
-
setDecimalSeparator
-
hasHeaderRow
-
setHasHeaderRow
-
getDateFormat
-
setDateFormat
-
getColumnStartings
-
setColumnStartings
-
getImportColumnCount
public int getImportColumnCount() -
setImportColumnCount
public void setImportColumnCount(int columnCount) -
getImportRowCount
public int getImportRowCount() -
setImportRowCount
public void setImportRowCount(int rowCount) -
getTargetBs
-
setTargetBs
-
getSheetName
-
setSheetName
-
getSheetRange
-
setSheetRange
-