Class actuate.RequestOptions
Description
The request options that loginServlet requires to authenticate requests. RequestOptions is used by other classes to provide authentication information. It also adds any customized options to the request URL.
Constructor
Syntax
actuate.RequestOptions( actuate.RequestOptions requestOptions)
Constructs a new RequestOptions object.
Parameter
requestOptions
actuate.RequestOptions object. Optional. Provides request option settings to copy into this RequestOptions object.
Function summary
Table 44‑46 lists actuate.RequestOptions functions.
Table 44‑46 actuate.RequestOptions functions 
Function
Description
Returns the BIRT iHub URL value
Returns the current locale
Returns the repository type
Returns the volume
Returns the volume profile
Appends custom parameters to the request URL
Sets the BIRT iHub URL value
Sets the locale
Sets the repository type: enterprise or workgroup
Sets the volume
Sets the volume profile
getIServerUrl
Syntax
string RequestOptions.getIserverurl( )
Returns the BIRT iHub URL.
Returns
String. The URL for BIRT iHub.
Example
To retrieve the BIRT iHub URL from the RequestOptions object reqOpts, use code similar to the following:
var iHubUrl = reqOpts.getIServerUrl( );
getLocale
Syntax
string RequestOptions.getLocale( )
Returns the current locale or null if no locale is set.
Returns
String. The locale value; null for default.
Example
This example pops up an alert box if the locale value is set to the default:
var locale = reqOpts.getLocale( );
if (locale == null){
alert("Locale value is default");
}
getRepositoryType
Syntax
string RequestOptions.getRepositoryType( )
Returns the repository type: enterprise or workgroup.
Returns
String. Valid repository type values are enterprise or workgroup.
Example
To retrieve the repository type for the RequestOptions object reqOpts, use code similar to the following:
var repositorytype = reqOpts.getRepositoryType( );
getVolume
Syntax
string RequestOptions.getVolume( )
Returns the volume.
Returns
String. The name of the volume.
Example
To retrieve the volume for the RequestOptions object reqOpts, use code similar to the following:
var encyVol = reqOpts.getVolume( );
getVolumeProfile
Syntax
string RequestOptions.getVolumeProfile( )
Returns the volume profile by name. Valid volume profile names are listed in the service’s WEB-INF\volumeProfile.xml file.
Returns
String. The volume profile.
Example
To retrieve the volume profile for the RequestOptions object reqOpts, use code similar to the following:
var volProfile = reqOpts.getVolumeProfile( );
setCustomParameters
Syntax
void RequestOptions.setCustomParameters(object parameters)
Returns a custom parameter in the request URL.
Parameter
parameters
Object. An associative array of name:value pairs for URL parameters.
Example
To add "&myParam=myValue" in a request URL derived from RequestOptions object, use code similar to the following:
MyRequestOptions.setCustomParameters({myParam: "myValue"});
setIServerUrl
Syntax
void RequestOptions.setIServerUrl(string iServerUrl)
Sets the BIRT iHub URL.
Parameter
Iserverurl
String. The BIRT iHub URL value.
Example
This example sets the BIRT iHub URL for the reqOpts RequestOptions object:
reqOpts.setIserverUrl("http://127.0.0.1:8700");
setLocale
Syntax
void RequestOptions.setLocale(string Locale)
Sets the locale.
Parameter
Locale
String. Optional. The locale value. Null indicates the default locale.
Example
This example resets the locale for the reqOpts RequestOptions object to the default value provided by the actuate web service to which the JSAPI connects:
reqOpts.setLocale( );
This example resets the locale for the reqOpts RequestOptions object to Spain using the Spanish locale code listed in <context root>\WEB-INF\localemap.xml:
reqOpts.setLocale("es_ES");
setRepositoryType
Syntax
void RequestOptions.setRepositoryType(string repositoryType)
Sets the repository type, either enterprise or workgroup.
Parameter
repositoryType
String. Valid repository type values are enterprise or standalone, as designated by the Actuate web application service with which to connect. Use the following constants:
*actuate.RequestOptions.REPOSITORY_ENCYCLOPEDIA
*actuate.RequestOptions.REPOSITORY_STANDALONE
Example
This example sets the repository to workgroup:
reqOpts.setRepositoryType(
actuate.RequestOptions.REPOSITORY_STANDALONE);
setVolume
Syntax
void RequestOptions.setVolume(string volume)
Sets the volume.
Parameter
volume
String. The volume.
Example
To set the volume to marcom if the RequestOptions object reqOpts volume is null, use code similar to the following:
if( reqOpts.getVolume( ) == null){
reqOpts.setVolume("marcom");
}
setVolumeProfile
Syntax
void RequestOptions.setVolumeProfile(string volumeProfile)
Sets the volume profile to use. Valid volume profile names are listed in the service’s WEB-INF\volumeProfile.xml file.
Parameter
volumeProfile
String. The volume profile.
Example
To set the volume profile to myServer if the RequestOptions object reqOpts volume profile is null, use code similar to the following:
if( reqOpts.getVolume( ) == null){
reqOpts.setVolumeProvile("myServer");
}