MicroStrategy ONE

Initialization and Request Properties

Before a Web bean can represent an actual MicroStrategy object, properties such as the object ID (report ID, Folder ID, and so on) and others must be set. Bean properties can be set either as initialization properties (set before a bean’s state is restored) or as request properties (set based on a user’s specific request after the bean state has been restored).

Initialization properties

Initialization properties are set immediately after the bean is instantiated. These properties are generally not dependent on a specific request, but rather serve to provide details about how the bean should operate once the remainder of its properties are set. These sources are generally a constant or a preference.

These properties are represented by the <init-properties> node within the <web-bean> node in the Page Configuration file. A description of the characteristics of the properties is provided below.

<init-properties>

   <property name="maxWait" source="const" type="int" value="520"/>

...

</init-properties>

Common initialization properties are those that have a constant value or those that come from preferences. The following are typical examples of initialization properties:  

  • Maximum wait time for a report to execute is often the same regardless of the report to be executed.  

  • The number of rows in a report to fetch at one time (such as incremental fetch settings) can be drawn from user preferences and is the same regardless of what report is executed.  

  • How often Web Universal polls Intelligence Server is generally independent of the report or document executed.

Request properties

Request properties are generally parameters that relay information specific to a user’s unique request to the bean. These sources are always requests. Examples include a specific report that a ReportBean should execute, or a specific folder that a FolderBean’s data should represent.

These properties are represented by the <request-properties> node within the <web-bean> node in the Page Configuration file. A description of the characteristics of the properties is provided below.

<request-properties>

    <property name="objectID" source="request" type="string" value="reportID"/>

    <property name="viewMode" source="request" type="int" value="reportViewMode"/>

</request-properties>

Request properties are important, as the data requested by the user is usually dependent upon the request (such as the link clicked by the user). The following are typical examples of request properties:  

  • The Report ID (or Template and Filter IDs) for a report execution request.  

  • The Message ID of an existing report instance in the event a manipulation is performed.  

  • The Folder ID of a folder’s contents to be described.  

  • The view mode of the report request.

Characteristics of properties

Both initialization and request properties have the following characteristics:

  • Name: Specifies the name of the property.  

  • Type: Specifies the type of the property. Values are boolean, int, and string.  

  • Source: Specifies the source for setting the property. Values are as follows:

    • constant: same for all users. For example, Root Folder.  

    • preference: set by user. For example, number of rows, columns, and so on, as set by the user.  

    • request: HTTP request – URL or cookies. For example, a request that can specify the folder to display.  

  • Value: Specifies the value for the property. For constants, examples include 13, Subtotals, and true. For request and preference properties, the value is the parameter name that is used to retrieve the actual value. Examples include folderID and folderType.

Determining available properties for each type of bean

There are a number of <init-properties> and <request-properties> that are available for a given type of bean, but those properties generally differ between bean types. For example, the FolderBean uses a property called sysFolder while the ReportBean uses properties such as templateID and messageID. To create custom pages with custom beans, you can use the API Reference to determine the properties that are available for a given bean, beyond what the default application configuration does with properties for a given use of that bean.

By using the API Reference, you can determine what additional properties you can build into your bean definitions in the Page Configuration file. In theory, any get() or set() method on a given bean can be implemented as an <init-property> or a <request-property> in the definition of a <web-bean> in the Page Configuration file. In practical use, any get() method that returns an integer or a string can be used and implemented as such (provided there is also a corresponding set() method).

For example, use the API Reference to look up the definition of methods in the ReportBean. Methods such as those listed below appear along with their corresponding property names:  

  • getExecutionFlags()/setExecutionFlags(): executionFlags  

  • getExpiration()/setExpiration(): expiration  

  • getMaxWait()/setMaxWait(): maxWait  

  • getMessageID()/setMessageID(): messageID  

  • getPollingFrequency()/setPollingFrequency(): pollingFrequency