ILogbookExport |
Note: The current implementation of this method should only be used in sever scripts.
void ExportLogbookEntriesToCsvFile( LogbookSearchParameters searchParams, string fileName )
| Exception | Condition |
|---|---|
| SdkException |
Thrown in case of any errors occurred during export process. For example: - Export target directory is not whitelisted. - Method executed in client script or in a external SDK application connected to Operator Client. |
The current implementation should only be used in server scripts.
If the method is used in an external SDK application and if the operation takes
more than 60 seconds then it will throw an exception which is caused by a timeout of the remote call.
This method will write all logbook entries to the CSV file which match the search criteria defined in argument searchParams.
If more than one million logbook entries match the specified search criteria then the method creates several CSV files, each containing at most one million entries. (The reason for this is that Microsoft Excel(TM) 2007 and 2010 cannot import CSV files with more than 1.048.576 rows.) The names of the additional CSV files are constructed by appending an ordinal number to the specified file name.
If one of the search requests fails the method throws an exception of class LogbookSearchSdkException which has a property of enum type LogbookSearchResultCode; the value of this property indicates the reason for the failure. If the method fails for other reasons it throws a SdkException.
|
The method uses "accept known good" input validation strategy and ensures that requested fileName is strictly within
a configured whitelist where exports are allowed.
Requested export path must met one of the following condition: - Specified path directory is white-listed itself; - Specified path directory is subdirectory of any white-listed directory; - Specified path is within an optical disc device, such as a CD or DVD-ROM or within removable storage device, such as a floppy disk drive or a USB; When none of the conditions above are met, requested export is rejected. |
| Exports whitelist is defined by BVMS administrator on Central Server in ..\ProgramData\Bosch\VMS\ServerData\PathWhitelistForExports.txt. |