publish
plugins.it2be_datastream info


Servoy Properties Summary
String build
Date buildDate
String component
String licensee
Boolean performClientFlush
Boolean promptOnOverwrite
String typeLicensed
Number version
String versionLicensed


Servoy Methods Summary
Boolean checkServerFileExists( String )
void clearRecord( Object, String, String, String, String, String, String, Boolean, String )
void clearRecord( Object, String, String, String, String, String, String, Boolean, String, Function, Array<Object> )
Boolean register( String )
void resetMimeTypeChooser( )
void resetProgressDialog( )
void resetProgressDialogButtons( )
void resetPromptOnOverwrite( )
void setErrorReportMethod( Function )
void setMimeTypeChooser( Boolean, Boolean )
void setMimeTypeChooser( Boolean )
void setMimeTypeChooser( Boolean, Boolean, Boolean )
void setProgressDialog( Boolean )
void setProgressDialog( Boolean, Boolean, Boolean, Number, Boolean, Boolean, Boolean, Number )
void setProgressDialogButtons( String, String, String )
void streamFileToRecord( Object, String, String, String, String, String, String, String, String, String, Boolean, String )
void streamFileToRecord( Object, String, String, String, String, String, String, String, String, String, Boolean, String, Function, Array<Object> )
void streamFileToServerFile( String, String, Boolean, String )
void streamFileToServerFile( String, String, Boolean, String, Function, Array<Object> )
void streamFileToServerFile( String, String, Boolean )
void streamFileToServerFile( String, String, Boolean, Function, Array<Object> )
void streamRecordToFile( Object, String, String, String, String, String, String, String, String, Boolean, String )
void streamRecordToFile( Object, String, String, String, String, String, String, String, String, Boolean, String, Function, Array<Object> )
void streamServerFileToFile( String, String, String, Boolean, Function, Array<Object> )
void streamServerFileToFile( String, String, Boolean, Function, Array<Object> )
void streamServerFileToFile( String, String, String, Boolean )
void streamServerFileToFile( String, String, Boolean, String, Function, Array<Object> )
void streamServerFileToFile( String, String, String, Boolean, String, Function, Array<Object> )
void streamServerFileToFile( String, String, String, Boolean, String, Number )
void streamServerFileToFile( String, String, String, Boolean, String, Number, Function, Array<Object> )
void streamServerFileToFile( String, String, String, Boolean, String )
void streamServerFileToFile( String, String, Boolean, String )
void streamServerFileToFile( String, String, Boolean )
void uploadMultipart( String, Number, String, Boolean, String, Object, Boolean, String, Function, Array<Object> )
void uploadMultipart( String, Number, String, Boolean, String, Object, Boolean, String )


Servoy Properties Details


build
String  build
Returns the current version (major, minor, build)
Returns
String  build String

Supported Clients
SmartClient


buildDate
Date  buildDate
Returns date release date
Returns
Date  date Date

Supported Clients
SmartClient


component
String  component
Returns the component name
Returns
String  name String

Supported Clients
SmartClient


licensee
String  licensee
Returns the licensee
Returns
String  licensee String

Supported Clients
SmartClient


performClientFlush
Boolean  performClientFlush
Whenever you need to avoid client flush set this value to false (default true).
Returns
Boolean  flushed boolean

Supported Clients
SmartClient


promptOnOverwrite
Boolean  promptOnOverwrite
Prompt on overwrite when downloading a file.
Returns
Boolean  prompt boolean

Supported Clients
SmartClient


typeLicensed
String  typeLicensed
Returns the type that is valid for this license
Returns
String  type String

Supported Clients
SmartClient


version
Number  version
Returns the current version (major, minor)
Returns
Number  version Double

Supported Clients
SmartClient


versionLicensed
String  versionLicensed
Returns the version that is valid for this license
Returns
String  license String

Supported Clients
SmartClient

Servoy Methods Details


checkServerFileExists
Boolean  checkServerFileExists( String )
Check that a file really exists on the server.
Parameters
String  fileName  the file name

Returns
Boolean  result boolean

Supported Clients
SmartClient


clearRecord
void  clearRecord( Object, String, String, String, String, String, String, Boolean, String )
Clear the data associated with the specified record and trigger optional method when finished.
Parameters
Object  primaryKey  the primary key
String  primaryColumn  the primary column
String  table  the table
String  mediaColumn  the media column
String  mediaSizeColumn  the media size column
String  mimeTypeColumn  the mime type column
String  displayNameColumn  the display name column
Boolean  background  the background
String  server  the server

Returns
void  

Supported Clients
SmartClient

Sample
// Clear the media column
// it2be_media_contentid = the primary key
// "it2be_media_contentid" = the primary key column
// "it2be_media_content" = the table name
// "media" = the data column name
// "media_size" = the media size column name
// "mimetype" = the mimetype column name
// "displayname" = the display name column name
// true = should the file process in foreground or background
// controller.getServerName() = the server name
// OPTION method = the callback method
// OPTION arguments = an array of arguments for the method
plugins.it2be_datastream.clearRecord(
it2be_media_contentid,
'it2be_media_contentid',
'it2be_media_content',
'media',
'media_size',
'mimetype',
'displayname',
true,
controller.getServerName()
);


clearRecord
void  clearRecord( Object, String, String, String, String, String, String, Boolean, String, Function, Array<Object> )
Clear the data associated with the specified record and trigger optional method when finished.
Parameters
Object  primaryKey  the primary key
String  primaryColumn  the primary column
String  table  the table
String  mediaColumn  the media column
String  mediaSizeColumn  the media size column
String  mimeTypeColumn  the mime type column
String  displayNameColumn  the display name column
Boolean  background  the background
String  server  the server
Function  method  the method
Array<Object>  arguments  the arguments

Returns
void  

Supported Clients
SmartClient

Sample
// Clear the media column

// it2be_media_contentid = the primary key
// "it2be_media_contentid" = the primary key column
// "it2be_media_content" = the table name
// "media" = the data column name
// "media_size" = the media size column name
// "mimetype" = the mimetype column name
// "displayname" = the display name column name
// true = should the file process in foreground or background
// controller.getServerName() = the server name
// OPTION method = the callback method
// OPTION arguments = an array of arguments for the method
plugins.it2be_datastream.clearRecord(
it2be_media_contentid,
'it2be_media_contentid',
'it2be_media_content',
'media',
'media_size',
'mimetype',
'displayname',
true,
controller.getServerName()
);


register
Boolean  register( String )
Register your runtime license (use the Components Manager to request your license string)
Parameters
String  license  the license

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// You have to register your plug-in(s) and beans before you start using them
// One way to do so is create an 'onOpenSolution' method and add the 'register(.)' method(s) there
plugins.it2be_datastream.register("Insert the license string(s) from your '*_runtime_license.txt' file here!");


resetMimeTypeChooser
void  resetMimeTypeChooser( )
Reset the MimeType chooser to preferences settings.
Returns
void  

Supported Clients
SmartClient


resetProgressDialog
void  resetProgressDialog( )
Reset the progress dialog to preferences settings.
Returns
void  

Supported Clients
SmartClient


resetProgressDialogButtons
void  resetProgressDialogButtons( )
Set the text of the buttons in the progress dialog back to default (English).
Returns
void  

Supported Clients
SmartClient


resetPromptOnOverwrite
void  resetPromptOnOverwrite( )
Prompt on overwrite when downloading a file based on preferences.
Returns
void  

Supported Clients
SmartClient


setErrorReportMethod
void  setErrorReportMethod( Function )
The callback method to be used when an error is reported
Parameters
Function  method  the error report method

Returns
void  

Supported Clients
SmartClient


setMimeTypeChooser
void  setMimeTypeChooser( Boolean, Boolean )
Show the MimeType chooser, default is false
Parameters
Boolean  show  the show
Boolean  onlyShowOnUnknown  the only show on unknown

Returns
void  

Supported Clients
SmartClient


setMimeTypeChooser
void  setMimeTypeChooser( Boolean )
Show the MimeType chooser, default is false
Parameters
Boolean  show  the show

Returns
void  

Supported Clients
SmartClient


setMimeTypeChooser
void  setMimeTypeChooser( Boolean, Boolean, Boolean )
Show the MimeType chooser, default is false
Parameters
Boolean  show  the show
Boolean  onlyShowOnUnknown  the only show on unknown
Boolean  allowUnknown  the allow unknown

Returns
void  

Supported Clients
SmartClient


setProgressDialog
void  setProgressDialog( Boolean )
Show the progress dialog and use the optional settings.
Parameters
Boolean  show  the show

Returns
void  

Supported Clients
SmartClient


setProgressDialog
void  setProgressDialog( Boolean, Boolean, Boolean, Number, Boolean, Boolean, Boolean, Number )
Show the progress dialog and use the optional settings.
Parameters
Boolean  show  the show
Boolean  showOnTop  the show on top
Boolean  removeBars  the remove bars
Number  autoHideSeconds  the auto hide seconds
Boolean  showClearCompletedButton  the show clear completed button
Boolean  showErroneusButton  the show erroneus button
Boolean  showClearAllButton  the show clear all button
Number  position  the position

Returns
void  

Supported Clients
SmartClient


setProgressDialogButtons
void  setProgressDialogButtons( String, String, String )
Set the text of the buttons in the progress dialog.
Parameters
String  clearCompletedButton  the clear completed button
String  erroneusButton  the erroneus button
String  clearAllButton  the clear all button

Returns
void  

Supported Clients
SmartClient


streamFileToRecord
void  streamFileToRecord( Object, String, String, String, String, String, String, String, String, String, Boolean, String )
Stream the specified file to the specified record and trigger optional method when finished.
Parameters
Object  primaryKey  the primary key
String  primaryColumn  the primary column
String  table  the table
String  mediaColumn  the media column
String  mediaSizeColumn  the media size column
String  fileName  the file name
String  mimeType  the mime type
String  mimeTypeColumn  the mime type column
String  displayName  the display name
String  displayNameColumn  the display name column
Boolean  background  the background
String  server  the server

Returns
void  

Supported Clients
SmartClient

Sample
// By using the below method we can stream a local file of any size
// to a reccord in a database
// Without the DataStream Plug-in such an operation would certainly cause
// the user interface to stall or possibly freeze due to low memory conditions.

// Check that the display_name is added otherwise set it from the filename
if (!display_name) {
display_name = import_from_file;
}

// it2be_media_contentid = the primary key
// "it2be_media_contentid" = the primary key column
// "it2be_media_content" = the table name
// "media" = the data column name
// "media_size" = the media size column name
// import_from_file = the filename to stream from
// mimeType = the mimetype to use while loading the data (useful to override the value read from the mimetype column)
// "mimetype" = the mimetype column name
// null = the display name, passing null as the display name means that the file portion of the 'filename' will be used
// display_name = the display name, passing null as the display name means that the file portion of the 'filename' will be used
// true = should the file process in foreground or background
// controller.getServerName() = the server name
// OPTION method = the callback method
// OPTION arguments = an array of arguments for the method
plugins.it2be_datastream.streamFileToRecord(
it2be_media_contentid,
'it2be_media_contentid',
'it2be_media_content',
'media',
'media_size',
import_from_file,
mimetype,
'mimetype',
null,
'display_name',
true,
controller.getServerName()
);


streamFileToRecord
void  streamFileToRecord( Object, String, String, String, String, String, String, String, String, String, Boolean, String, Function, Array<Object> )
Stream the specified file to the specified record and trigger optional method when finished.
Parameters
Object  primaryKey  the primary key
String  primaryColumn  the primary column
String  table  the table
String  mediaColumn  the media column
String  mediaSizeColumn  the media size column
String  fileName  the file name
String  mimeType  the mime type
String  mimeTypeColumn  the mime type column
String  displayName  the display name
String  displayNameColumn  the display name column
Boolean  background  the background
String  server  the server
Function  method  the method
Array<Object>  arguments  the arguments

Returns
void  

Supported Clients
SmartClient


streamFileToServerFile
void  streamFileToServerFile( String, String, Boolean, String )
Read the specified file, stream it to a server location and trigger optional method when finished.
Parameters
String  serverFile  the server file
String  localFile  the local file
Boolean  background  the background
String  server  the server

Returns
void  

Supported Clients
SmartClient


streamFileToServerFile
void  streamFileToServerFile( String, String, Boolean, String, Function, Array<Object> )
Read the specified file, stream it to a server location and trigger optional method when finished.
Parameters
String  serverFile  the server file
String  localFile  the local file
Boolean  background  the background
String  server  the server
Function  method  the method
Array<Object>  arguments  the arguments

Returns
void  

Supported Clients
SmartClient


streamFileToServerFile
void  streamFileToServerFile( String, String, Boolean )
Read the specified file, stream it to a server location and trigger optional method when finished.
Parameters
String  serverFile  the server file
String  localFile  the local file
Boolean  background  the background

Returns
void  

Supported Clients
SmartClient

Sample
// By using the below method we can stream a (binary) file of any size
// from a local file to a server file
// Without the DataStream Plug-in such an operation would certainly cause
// the user interface to stall or possibly freeze due to low memory conditions.

// globals.server_file = the file(path) to create on the server
// globals.local_file = the file(path) to stream from
// true = should the file process in foreground or background
// OPTION controller.getServerName() = the name of the server
// OPTION test_feedback = the callback method
// OPTION [globals.server_file,globals.local_file] = an array of arguments for the method
plugins.it2be_datastream.streamFileToServerFile(
globals.server_file,
globals.local_file,
true,
feedback,
[globals.local_file, globals.server_file]
);


streamFileToServerFile
void  streamFileToServerFile( String, String, Boolean, Function, Array<Object> )
Read the specified file, stream it to a server location and trigger optional method when finished.
Parameters
String  serverFile  the server file
String  localFile  the local file
Boolean  background  the background
Function  method  the method
Array<Object>  arguments  the arguments

Returns
void  

Supported Clients
SmartClient


streamRecordToFile
void  streamRecordToFile( Object, String, String, String, String, String, String, String, String, Boolean, String )
Stream the specified record binary to a disk location and trigger optional method when finished.
Parameters
Object  primaryKey  the primary key
String  primaryColumn  the primary column
String  table  the table
String  mediaColumn  the media column
String  mediaSizeColumn  the media size column
String  fileName  the file name
String  mimeType  the mime type
String  mimeTypeColumn  the mime type column
String  displayNameColumn  the display name column
Boolean  background  the background
String  server  the server

Returns
void  

Supported Clients
SmartClient

Sample
// With the below method we can stream (binary) column data of any size
// from a database record to a local file
// Without the DataStream Plug-in such an operation would certainly cause
// the user interface to stall or possibly freeze due to low memory conditions.

// it2be_media_contentid = the primary key
// "it2be_media_contentid" = the primary key column
// "it2be_media_content" = the table name
// "media" = the data column name
// "media_size" = the media size column name
// export_to_file = the filename to stream to
// mimeType = the mimetype to use while loading the data (useful to override the value read from the mimetype column)
// "mimetype" = the mimetype column name
// null = the display name, passing null as the display name means that the file portion of the 'filename' will be used
// "display_name" = the display name column name
// true = should the file process in foreground or background
// controller.getServerName() = the server name
// OPTION method = the callback method
// OPTION arguments = an array of arguments for the method
plugins.it2be_datastream.streamRecordToFile(
it2be_media_contentid,
'it2be_media_contentid',
'it2be_media_content',
'media',
'media_size',
export_to_file,
mimetype,
'mimetype',
'display_name',
true,
controller.getServerName()
);


streamRecordToFile
void  streamRecordToFile( Object, String, String, String, String, String, String, String, String, Boolean, String, Function, Array<Object> )
Stream the specified record binary to a disk location and trigger optional method when finished.
Parameters
Object  primaryKey  the primary key
String  primaryColumn  the primary column
String  table  the table
String  mediaColumn  the media column
String  mediaSizeColumn  the media size column
String  fileName  the file name
String  mimeType  the mime type
String  mimeTypeColumn  the mime type column
String  displayNameColumn  the display name column
Boolean  background  the background
String  server  the server
Function  method  the method
Array<Object>  arguments  the arguments

Returns
void  

Supported Clients
SmartClient


streamServerFileToFile
void  streamServerFileToFile( String, String, String, Boolean, Function, Array<Object> )
Read the specified server file and stream it to a local location and trigger optional method when finished.
Parameters
String  serverFile  the server file
String  localFile  the local file
String  mimeType  the mime type
Boolean  background  the background
Function  method  the method
Array<Object>  arguments  the arguments

Returns
void  

Supported Clients
SmartClient

Sample
// By using the below method we can stream a (binary) file of any size
// from a server file to a local file
// Without the DataStream Plug-in such an operation would certainly cause
// the user interface to stall or possibly freeze due to low memory conditions.

// globals.server_file = the file(path) to stream from
// globals.local_file = the file(path) to create on the local client
// OPTIONAL mimeType = the mimetype to use while loading the data (useful to override the value read from the mimetype column)
// OPTIONAL controller.getServerName() = the name of the server
// OPTIONAL eventID = the id of the event
// true = should the file process in foreground or background
// OPTIONAL test_feedback = the callback method
// OPTION [globals.server_file,globals.local_file] = an array of arguments for the method
plugins.it2be_datastream.streamServerFileToFile(
globals.server_file,
globals.local_file,
true,
test_feedback,
[globals.server_file, globals.local_file]
);


streamServerFileToFile
void  streamServerFileToFile( String, String, Boolean, Function, Array<Object> )
Read the specified server file and stream it to a local location and trigger optional method when finished.
Parameters
String  serverFile  the server file
String  localFile  the local file
Boolean  background  the background
Function  method  the method
Array<Object>  arguments  the arguments

Returns
void  

Supported Clients
SmartClient

Sample
// By using the below method we can stream a (binary) file of any size
// from a server file to a local file
// Without the DataStream Plug-in such an operation would certainly cause
// the user interface to stall or possibly freeze due to low memory conditions.

// globals.server_file = the file(path) to stream from
// globals.local_file = the file(path) to create on the local client
// OPTIONAL mimeType = the mimetype to use while loading the data (useful to override the value read from the mimetype column)
// OPTIONAL controller.getServerName() = the name of the server
// OPTIONAL eventID = the id of the event
// true = should the file process in foreground or background
// OPTIONAL test_feedback = the callback method
// OPTION [globals.server_file,globals.local_file] = an array of arguments for the method
plugins.it2be_datastream.streamServerFileToFile(
globals.server_file,
globals.local_file,
true,
test_feedback,
[globals.server_file, globals.local_file]
);


streamServerFileToFile
void  streamServerFileToFile( String, String, String, Boolean )
Read the specified server file and stream it to a local location and trigger optional method when finished.
Parameters
String  serverFile  the server file
String  localFile  the local file
String  mimeType  the mime type
Boolean  background  the background

Returns
void  

Supported Clients
SmartClient

Sample
// By using the below method we can stream a (binary) file of any size
// from a server file to a local file
// Without the DataStream Plug-in such an operation would certainly cause
// the user interface to stall or possibly freeze due to low memory conditions.

// globals.server_file = the file(path) to stream from
// globals.local_file = the file(path) to create on the local client
// OPTIONAL mimeType = the mimetype to use while loading the data (useful to override the value read from the mimetype column)
// OPTIONAL controller.getServerName() = the name of the server
// OPTIONAL eventID = the id of the event
// true = should the file process in foreground or background
// OPTIONAL test_feedback = the callback method
// OPTION [globals.server_file,globals.local_file] = an array of arguments for the method
plugins.it2be_datastream.streamServerFileToFile(
globals.server_file,
globals.local_file,
true,
test_feedback,
[globals.server_file, globals.local_file]
);


streamServerFileToFile
void  streamServerFileToFile( String, String, Boolean, String, Function, Array<Object> )
Read the specified server file and stream it to a local location and trigger optional method when finished.
Parameters
String  serverFile  the server file
String  localFile  the local file
Boolean  background  the background
String  server  the server
Function  method  the method
Array<Object>  arguments  the arguments

Returns
void  

Supported Clients
SmartClient

Sample
// By using the below method we can stream a (binary) file of any size
// from a server file to a local file
// Without the DataStream Plug-in such an operation would certainly cause
// the user interface to stall or possibly freeze due to low memory conditions.

// globals.server_file = the file(path) to stream from
// globals.local_file = the file(path) to create on the local client
// OPTIONAL mimeType = the mimetype to use while loading the data (useful to override the value read from the mimetype column)
// OPTIONAL controller.getServerName() = the name of the server
// OPTIONAL eventID = the id of the event
// true = should the file process in foreground or background
// OPTIONAL test_feedback = the callback method
// OPTION [globals.server_file,globals.local_file] = an array of arguments for the method
plugins.it2be_datastream.streamServerFileToFile(
globals.server_file,
globals.local_file,
true,
test_feedback,
[globals.server_file, globals.local_file]
);


streamServerFileToFile
void  streamServerFileToFile( String, String, String, Boolean, String, Function, Array<Object> )
Read the specified server file and stream it to a local location and trigger optional method when finished.
Parameters
String  serverFile  the server file
String  localFile  the local file
String  mimeType  the mime type
Boolean  background  the background
String  server  the server
Function  method  the method
Array<Object>  arguments  the arguments

Returns
void  

Supported Clients
SmartClient

Sample
// By using the below method we can stream a (binary) file of any size
// from a server file to a local file
// Without the DataStream Plug-in such an operation would certainly cause
// the user interface to stall or possibly freeze due to low memory conditions.

// globals.server_file = the file(path) to stream from
// globals.local_file = the file(path) to create on the local client
// OPTIONAL mimeType = the mimetype to use while loading the data (useful to override the value read from the mimetype column)
// OPTIONAL controller.getServerName() = the name of the server
// OPTIONAL eventID = the id of the event
// true = should the file process in foreground or background
// OPTIONAL test_feedback = the callback method
// OPTION [globals.server_file,globals.local_file] = an array of arguments for the method
plugins.it2be_datastream.streamServerFileToFile(
globals.server_file,
globals.local_file,
true,
test_feedback,
[globals.server_file, globals.local_file]
);


streamServerFileToFile
void  streamServerFileToFile( String, String, String, Boolean, String, Number )
Read the specified server file and stream it to a local location and trigger optional method when finished.
Parameters
String  serverFile  the server file
String  localFile  the local file
String  mimeType  the mime type
Boolean  background  the background
String  server  the server
Number  eventId

Returns
void  

Supported Clients
SmartClient

Sample
// By using the below method we can stream a (binary) file of any size
// from a server file to a local file
// Without the DataStream Plug-in such an operation would certainly cause
// the user interface to stall or possibly freeze due to low memory conditions.

// globals.server_file = the file(path) to stream from
// globals.local_file = the file(path) to create on the local client
// OPTIONAL mimeType = the mimetype to use while loading the data (useful to override the value read from the mimetype column)
// OPTIONAL controller.getServerName() = the name of the server
// OPTIONAL eventID = the id of the event
// true = should the file process in foreground or background
// OPTIONAL test_feedback = the callback method
// OPTION [globals.server_file,globals.local_file] = an array of arguments for the method
plugins.it2be_datastream.streamServerFileToFile(
globals.server_file,
globals.local_file,
true,
test_feedback,
[globals.server_file, globals.local_file]
);


streamServerFileToFile
void  streamServerFileToFile( String, String, String, Boolean, String, Number, Function, Array<Object> )
Read the specified server file and stream it to a local location and trigger optional method when finished.
Parameters
String  serverFile  the server file
String  localFile  the local file
String  mimeType  the mime type
Boolean  background  the background
String  server  the server
Number  method  the method
Function  arguments  the arguments
Array<Object>  arguments

Returns
void  

Supported Clients
SmartClient

Sample
// By using the below method we can stream a (binary) file of any size
// from a server file to a local file
// Without the DataStream Plug-in such an operation would certainly cause
// the user interface to stall or possibly freeze due to low memory conditions.

// globals.server_file = the file(path) to stream from
// globals.local_file = the file(path) to create on the local client
// OPTIONAL mimeType = the mimetype to use while loading the data (useful to override the value read from the mimetype column)
// OPTIONAL controller.getServerName() = the name of the server
// OPTIONAL eventID = the id of the event
// true = should the file process in foreground or background
// OPTIONAL test_feedback = the callback method
// OPTION [globals.server_file,globals.local_file] = an array of arguments for the method
plugins.it2be_datastream.streamServerFileToFile(
globals.server_file,
globals.local_file,
true,
test_feedback,
[globals.server_file, globals.local_file]
);


streamServerFileToFile
void  streamServerFileToFile( String, String, String, Boolean, String )
Read the specified server file and stream it to a local location and trigger optional method when finished.
Parameters
String  serverFile  the server file
String  localFile  the local file
String  mimeType  the mime type
Boolean  background  the background
String  server  the server

Returns
void  

Supported Clients
SmartClient

Sample
// By using the below method we can stream a (binary) file of any size
// from a server file to a local file
// Without the DataStream Plug-in such an operation would certainly cause
// the user interface to stall or possibly freeze due to low memory conditions.

// globals.server_file = the file(path) to stream from
// globals.local_file = the file(path) to create on the local client
// OPTIONAL mimeType = the mimetype to use while loading the data (useful to override the value read from the mimetype column)
// OPTIONAL controller.getServerName() = the name of the server
// OPTIONAL eventID = the id of the event
// true = should the file process in foreground or background
// OPTIONAL test_feedback = the callback method
// OPTION [globals.server_file,globals.local_file] = an array of arguments for the method
plugins.it2be_datastream.streamServerFileToFile(
globals.server_file,
globals.local_file,
true,
test_feedback,
[globals.server_file, globals.local_file]
);


streamServerFileToFile
void  streamServerFileToFile( String, String, Boolean, String )
Read the specified server file and stream it to a local location and trigger optional method when finished.
Parameters
String  serverFile  the server file
String  localFile  the local file
Boolean  background  the background
String  server  the server

Returns
void  

Supported Clients
SmartClient

Sample
// By using the below method we can stream a (binary) file of any size
// from a server file to a local file
// Without the DataStream Plug-in such an operation would certainly cause
// the user interface to stall or possibly freeze due to low memory conditions.

// globals.server_file = the file(path) to stream from
// globals.local_file = the file(path) to create on the local client
// OPTIONAL mimeType = the mimetype to use while loading the data (useful to override the value read from the mimetype column)
// OPTIONAL controller.getServerName() = the name of the server
// OPTIONAL eventID = the id of the event
// true = should the file process in foreground or background
// OPTIONAL test_feedback = the callback method
// OPTION [globals.server_file,globals.local_file] = an array of arguments for the method
plugins.it2be_datastream.streamServerFileToFile(
globals.server_file,
globals.local_file,
true,
test_feedback,
[globals.server_file, globals.local_file]
);


streamServerFileToFile
void  streamServerFileToFile( String, String, Boolean )
Read the specified server file and stream it to a local location and trigger optional method when finished.
Parameters
String  serverFile  the server file
String  localFile  the local file
Boolean  background  the background

Returns
void  

Supported Clients
SmartClient

Sample
// By using the below method we can stream a (binary) file of any size
// from a server file to a local file
// Without the DataStream Plug-in such an operation would certainly cause
// the user interface to stall or possibly freeze due to low memory conditions.

// globals.server_file = the file(path) to stream from
// globals.local_file = the file(path) to create on the local client
// OPTIONAL mimeType = the mimetype to use while loading the data (useful to override the value read from the mimetype column)
// OPTIONAL controller.getServerName() = the name of the server
// OPTIONAL eventID = the id of the event
// true = should the file process in foreground or background
// OPTIONAL test_feedback = the callback method
// OPTION [globals.server_file,globals.local_file] = an array of arguments for the method
plugins.it2be_datastream.streamServerFileToFile(
globals.server_file,
globals.local_file,
true,
test_feedback,
[globals.server_file, globals.local_file]
);


uploadMultipart
void  uploadMultipart( String, Number, String, Boolean, String, Object, Boolean, String, Function, Array<Object> )
Upload multipart file and trigger optional method when finished.
Parameters
String  host  the host
Number  port  the port
String  serverFile  the server file
Boolean  ssl  the ssl
String  localFile  the local file
Object  args  the args
Boolean  background  the background
String  server  the server
Function  method  the method
Array<Object>  arguments  the arguments

Returns
void  

Supported Clients
SmartClient


uploadMultipart
void  uploadMultipart( String, Number, String, Boolean, String, Object, Boolean, String )
Upload multipart file and trigger optional method when finished.
Parameters
String  host  the host
Number  port  the port
String  serverFile  the server file
Boolean  ssl  the ssl
String  localFile  the local file
Object  args  the args
Boolean  background  the background
String  server  the server

Returns
void  

Supported Clients
SmartClient

Sample
// File upload by multipart/form-data

// 'www.google.com' = the host
// 8080 = the port
// '/submission/submit.jsp' = the file portion of upload URL
// false = ssl communication or not
// '/test.txt' = the actual local file
// [["name1", "value1"],["name2", "value2"]] = the name-value pairs for the form submission
// true = should the file process in foreground or background
// controller.getServerName() = the server name
// OPTION method = the callback method
// OPTION arguments = an array of arguments for the method
plugins.it2be_datastream.uploadMultipart(
'www.google.com',
8080,
'/submission/submit.jsp',
false,
'/test.txt',
[["name1", "value1"],["name2", "value2"]],
true,
controller.getServerName());