Class actuate.DataService
Description
Retrieves data from Actuate BIRT reports as a ResultSet.
Constructor
Syntax
Constructs a DataService object.
Function summary
Table 4-15 lists actuate.DataService functions.
Table 4-15 actuate.DataService functions getId( ) Returns the URL for the Actuate web application Service set in this DataService.actuate.DataService.downloadResultSet
Syntax
actuate.data.ResultSet DataService.downloadResultSet(string datasource, actuate.data.Request request, function callback, function errorCallback)Returns data from an Actuate BIRT report document that is in an Actuate web application. The actuate.data.ResultSet object that downloadResultSet( ) returns is used by the callback function.
Parameters
String. The name of the document from which to retrieve data.
actuate.data.Request object. Specifies the request for the report.
Function. The callback function to use after the ResultSet finishes downloading. This function must take the returned ResultSet object as an input parameter.
Function. The function to call when an error occurs. The possible errors are actuate.Exception objects. The errorCallback( ) function must take an exception as an argument.
Returns
actuate.data.ResultSet object.
Example
This example retrieves a result set and applies a sorter to the result set.
myDataService.downloadResultSet("Quarterly Sales", mySalesRequest, makeAscendingSales(mySalesRequest), errorCallback(handler);actuate.DataService.getId
Syntax
Returns the ID of this object.
Returns
Example
This example returns the current object ID.
actuate.DataService.getIportalUrl
Syntax
Returns the URL for the Actuate web application service. Set the URL with setService( ).
Returns
Example
The following sample code retrieves the URL for the Actuate service:
actuate.DataService.getRequestOptions
Syntax
Returns the RequestOptions currently set in this DataService. Set the RequestOptions with setService( ).
Returns
actuate.RequestOptions object.
Example
The following sample code retrieves the RequestOptions object with the options that are set for this DataService object and sets the repository type.
actuate.DataService.setService
Syntax
Sets the URL for the target Actuate web application service, along with any options for that URL. When the URL is not set, the DataService object uses the default service, which is set by the actuate class’ initialize( ) function.
Parameters
String. The target Actuate web application URL.
actuate.RequestOptions object. Optional. RequestOptions defines the URL parameters to send with the authentication request, such as the iServer URL, Encyclopedia volume, or repository type. The requestOptions object can also add custom parameters to the URL. When the requestOptions parameter is null, setService( ) uses the default parameter values for the target Actuate web application URL. These default parameter values are defined in the Actuate web application’s web.xml file.
Example
This example sets the URL for the Actuate iPortal web application service.
myDataService.setService("http://localhost:8700/iportal",myRequestOptions);
(c) Copyright Actuate Corporation 2011 |
![]() |