MicroStrategy ONE

Accessing Web Beans API

The Web Beans API has a single entry point, through the WebBeanFactory class and its static method, getInstance(). All objects in the Web Beans API are instantiated through this WebBeanFactory class.

The classes of the Web Beans API are accessed as follows:

WebBeanFactory factory = WebBeanFactory.getInstance();

The  WebBeanFactory is one of the public classes in this package. It is a singleton that implies that only a single instance of this object is ever given out. Thus, the constructor is not public.

This object is responsible for giving out all of the Web Beans. This can be directly done using specific create methods  such as newFolderBean(), or indirectly by using the newWebBean() method and passing the type of bean required. The integer values to specify for the newWebBean method come from the interface EnumWebTransformableType.

In this section, the following topics are discussed:

  • Web Beans Characteristics

    Discusses the fundamental characteristics that define what a Web Bean is, including its ability to be defined in the context of a hierarchy of WebComponents, its ability to handle event-based requests, and its ability to render its underlying data.  

  • Types of Web Beans

    Provides more detailed information on commonly encountered types of Web Beans, including ObjectBean, ReportBean and PromptsBean. Includes code samples to more clearly describe how to program against the Web Beans API.

The Web Beans API primarily contains JavaBeans. However, in addition to these objects, it also contains a select number of objects such as PromptObject and ExpressionObject that implement the Transformable interface.