Actuate JavaScript API classes : Class actuate.RequestOptions

Class actuate.RequestOptions

Description

The request reportexplorers that loginServlet requires to authenticate requests. RequestOptions is used by other classes to provide authentication information. It also adds any customized reportexplorers to the request URL.

Constructor

Syntax

actuate.RequestOptions( )

Constructs a new RequestOptions object.

Function summary

Table 4-40 lists actuate.RequestOptions functions.

actuate.RequestOptions.getIServerUrl

Syntax

string RequestOptions.getIserverurl( )

Gets the BIRT iServer URL value.

Returns

String. The BIRT iServer URL value.

Example

To retrieve the BIRT iServer URL value for the RequestOptions object reqOpts, use code similar to the following:

var iServerUrl = reqOpts.getIServerUrl( );

actuate.RequestOptions.getLocale

Syntax

string RequestOptions.getLocale( )

Gets 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");
}

actuate.RequestOptions.getRepositoryType

Syntax

string RequestOptions.getRepositoryType( )

Gets the repository type: enterprise or workgroup.

Returns

String. Valid repository type values are enterprise or workgroup.

Example

To retrieve the repository type value for the RequestOptions object reqOpts, use code similar to the following:

var repositoryType = reqOpts.getRepositoryType( );

actuate.RequestOptions.getVolume

Syntax

string RequestOptions.getVolume( )

Gets the Encyclopedia volume.

Returns

String. The Encyclopedia volume.

Example

To retrieve the Encyclopedia volume for the RequestOptions object reqOpts, use code similar to the following:

var encyVol = reqOpts.getVolume( );

actuate.RequestOptions.getVolumeProfile

Syntax

string RequestOptions.getVolumeProfile( )

Gets 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( );

actuate.RequestOptions.setCustomParameters

Syntax

void RequestOptions.setCustomParameters(object paramValue)

Sets a custom parameter in the request URL.

Parameters

paramValue

object. A mapped value and name pair for a URL parameter.

Example

To add "&myParam=myValue" in a request URL derived from requestOptions object, use code similar to the following:

MyRequestOptions.setCustomParameters({myParam: "myValue"});

actuate.RequestOptions.setIServerUrl

Syntax

void RequestOptions.setIServerUrl(string iServerUrl)

Set the BIRT iServer URL value.

Parameters

Iserverurl

String. The BIRT iServer URL value.

Example

This example sets the BIRT iServer URL value for the reqOpts RequestOptions object.

reqOpts.setIserverUrl("http://localhost:8700");

actuate.RequestOptions.setLocale

Syntax

void RequestOptions.setLocale(string Locale)

Sets the locale.

Parameters

Locale

String. The locale value. Use null to use the default locale.

Example

This example resets the locale value for the reqOpts RequestOptions object to the default.

reqOpts.setLocale( );

actuate.RequestOptions.setRepositoryType

Syntax

void RequestOptions.setRepositoryType(string repositoryType)

Sets the repository type: enterprise or workgroup.

Parameters

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:

n  
n  

Example

This example sets the repository to local.

reqOpts.setRepositoryType(actuate.RequestOptions.REPOSITORY_STANDALONE);

actuate.RequestOptions.setVolume

Syntax

void RequestOptions.setVolume(string volume)

Sets the Encyclopedia volume.

Parameters

volume

String. The Encyclopedia volume.

Example

To set the Encyclopedia volume to marcom if the RequestOptions object reqOpts volume is null, use code similar to the following:

if( reqOpts.getVolume( ) == null){
  reqOpts.setVolume("marcom");
}

actuate.RequestOptions.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.

Parameters

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");
}

(c) Copyright Actuate Corporation 2011