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 enumPossible 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 TypeMethodDescriptionvoidaddStepResult(String stepId, UploadControl.ReturnCode rc) insert a step result with no custom datavoidaddStepResult(String stepId, UploadControl.ReturnCode rc, String jsonData) insert a step result with extra JSON datavoidclose()Update all values (except BLOB and uploadId) into bcd_dataupload_controlintintstatic ConnectiongetManagedUploadConnection(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) intretrieve the position of mapped binding itemvoidsetColumnStartings(String columnStartings) voidsetDateFormat(String dateFormat) voidsetDecimalSeparator(Character decimalSeparator) voidsetDelimiter(Character delimiter) voidsetEncoding(String encoding) voidsetFileBlobIs(InputStream fileBlobIs) voidsetHasHeaderRow(Boolean hasHeaderRow) voidsetImportColumnCount(int columnCount) voidsetImportRowCount(int rowCount) voidsetMappingBindingItemAttribute(int idx, String name, String value) voidsetQuoteChar(Character quoteChar) voidsetSheetName(String sheetName) voidsetSheetRange(String sheetRange) voidsetSourceName(String sourceName) voidsetTargetBs(String targetBs) voidsetUploadId(String uploadId) voidsetUser_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:
ExceptionUploadException
-
UploadControl
For reading and updating entries in bcd_dataupload_control BLOB and uploadId are not updated- Parameters:
uploadId-- Throws:
ExceptionUploadException
-
-
Method Details
-
close
Update all values (except BLOB and uploadId) into bcd_dataupload_control- Specified by:
closein 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:
ExceptionUploadException
-
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
-