JSBlobLoaderBuilder
Overview
The JSBlobLoaderBuilder
utility facilitates constructing blob loader URLs for downloading or embedding data from a specified data provider. It supports configuration of data sources, file metadata, and database settings. ## Functionality
URL Construction
build()
generates a blob loader URL string for use in custom HTML or as a redirect URL for direct downloads.
Data Source Configuration
datasource(datasource)
specifies the server and table combination for the data provider.serverAndTable(servername, tablename)
assigns the server and table names for the builder's column data provider.
File Metadata
filename(filename)
sets the filename for the downloaded data, affecting theContent-Disposition
header.mimetype(mimetype)
specifies the MIME type of the data, applied in theContent-Type
header.
Row Management
rowid(rowid)
allows specifying single or composite primary keys for identifying rows in the data source.
Methods Summarized
Builds the blobloader url string that can be used in custom html or send to the browser as a redirect url for direct downloads.
Sets the datasource (server/table combination) of the builder's column dataprovider.
Sets the filename of the data in the dataprovider.
Sets the mimetype of the data in the dataprovider.
Sets the rowid (single pk or composite pk) of the table.
Sets the rowids (single pk or composite pk) of the table.
Sets the server name and table name of the builder's column dataprovider.
Methods Detailed
build()
Builds the blobloader url string that can be used in custom html or send to the browser as a redirect url for direct downloads.
Returns: String the blobloader url pointing to the data of the given dataprovider
datasource(datasource)
Sets the datasource (server/table combination) of the builder's column dataprovider.
Parameters
String datasource The datasource for this builder's column dataprovider.
Returns: JSBlobLoaderBuilder return the builder itself
filename(filename)
Sets the filename of the data in the dataprovider. If given, it will set the Content-disposition header to: attachment; filename=filename
Parameters
String filename The filename for the data.
Returns: JSBlobLoaderBuilder return the builder itself
mimetype(mimetype)
Sets the mimetype of the data in the dataprovider. This will be set in the content type header of the response for this data.
Parameters
String mimetype the mime type of the data (set as the content type header)
Returns: JSBlobLoaderBuilder return the builder itself
rowid(rowid)
Sets the rowid (single pk or composite pk) of the table.
Parameters
Object rowid The rowid, can be a single value or an array of values
Returns: JSBlobLoaderBuilder return the builder itself
rowid(rowid)
Sets the rowids (single pk or composite pk) of the table.
Parameters
Array rowid The rowid; can be a single value or an array of values.
Returns: JSBlobLoaderBuilder return the builder itself
serverAndTable(servername, tablename)
Sets the server name and table name of the builder's column dataprovider.
Parameters
String servername The servername for this builder's column dataprovider.
String tablename The tablename for this builder's column dataprovider.
Returns: JSBlobLoaderBuilder return the builder itself
Last updated