public class

WebBeanInfo

extends AbstractConfigurationElement
java.lang.Object
   ↳ com.microstrategy.utils.config.AbstractConfigurationElement
     ↳ com.microstrategy.web.app.WebBeanInfo

Summary

Constants
String ATT_BEAN_CLASS
String ATT_BEAN_CONSTRUCTOR
String ATT_BEAN_TYPE
String ATT_EVENT_HANDLER
String ATT_FACTORY_CLASS
String ATT_FACTORY_CONSTRUCTOR
String ATT_FEATURE_ID
String ATT_NAME
String ATT_PERSIST_MODE
String ATT_SESSION
String ATT_SYS_BEAN
String NODE_WEB_BEAN
[Expand]
Inherited Constants
From class com.microstrategy.utils.config.AbstractConfigurationElement
Public Constructors
WebBeanInfo()
Class constructor.
WebBeanInfo(String name)
Class constructor.
WebBeanInfo(Node root)
Class constructor.
Public Methods
WebComponent createBeanInstance()
Get the WebComponent corresponding to the information available on this WebBeanInfo instance and initialize it.
String getBeanClass()
Get the name of the bean class for the WebBeanInfo instance
String getBeanConstructor()
Get the name of the bean constructor for the WebBeanInfo instance
static WebBeanInfo getBeanInfo(WebComponent component, AppContext context)
WebComponent getBeanInstance(AppContext appContext)
Get the WebComponent corresponding to the information available on this WebBeanInfo instance and initialize it.
WebComponent getBeanInstance(AppContext appContext, ComponentInitializationContext initContext)
Get the WebComponent corresponding to the information available on this WebBeanInfo instance and initialize it.
WebBeanStyleList getBeanStyleList()
Get the collection of bean styles for the WebBeanInfo instance
WebBeanInfoList getChildrenBeans()
Get the WebBeanInfoList of WebBeans children of this bean
int getConfigType()
This method is deprecated. With the introduction of the centralized BeanFactory class, bean configuration type distinctions are no longer relevant.
String getEventHandler()
Get the event handler for this WebBeanInfo instance
EventHandlerList getEventHandlerList()
Get the collection of bean event handlers for the WebBeanInfo instance
String getFactoryClass()
Get the name of the factory class for the WebBeanInfo instance
String getFactoryConstructor()
Get the name of the factory constructor for the WebBeanInfo instance
String getFeatureId()
Get the feature Id associated with this page.
WebBeanPropertyList getInitPropertyList()
Get the collection of bean init-properties for the WebBeanInfo instance.
String getName()
Get the name of the WebBeanInfo instance
int getPersistMode()
Get the persist mode of this WebBeanInfo instance
WebBeanPropertyList getRequestPropertyList()
Get the collection of bean request-properties for the WebBeanInfo instance.
String getSessionName()
Get the session name for this WebBeanInfo instance
int getSysBean()
This method is deprecated. Use getSysBeanName() instead. With the introduction of the centralized BeanFactory class, the String type name is now the recommended way to refer to a bean's type.
String getSysBeanName()
void initBeanInstance(AppContext appContext, WebComponent beanInstance, ComponentInitializationContext initContext)
void setBeanClass(String beanClass)
Set the name of the bean class for the WebBeanInfo instance
void setBeanConstructor(String beanConstructor)
Set the name of the bean constructor for the WebBeanInfo instance
void setBeanProperties(WebComponent beanInstance, WebBeanPropertyList properties, AppContext appContext)
Set the properties of the bean instance given the parameters available on the RequestKeys.
void setBeanStyles(Object beanInstance, AppContext appContext)
Set the styles of the bean instance given the parameters available on the RequestKeys.
void setConfigType(int configType)
This method is deprecated. With the introduction of the centralized BeanFactory class, bean configuration type distinctions are no longer relevant.
void setEventHandler(String eventHandler)
Set the event handler for this WebBeanInfo instance
void setFactoryClass(String factoryClass)
Set the name of the factory class for the WebBeanInfo instance
void setFactoryConstructor(String factoryConstructor)
Set the name of the factory constructor for the WebBeanInfo instance
void setFeatureId(String featureId)
Sets the name of the class for the event handler of this page.
void setName(String name)
Set the name of the WebBeanInfo instance
void setPersistMode(int persistMode)
Set the persist mode of this WebBeanInfo instance
void setSessionName(String session)
Set the session name for this WebBeanInfo instance
void setSysBean(int sysBean)
This method is deprecated. Use setSysBeanName(String) instead. With the introduction of the centralized BeanFactory class, the String type name is now the recommended way to refer to a bean's type.
void setSysBeanName(String value)
Protected Methods
String getKeyAttribute()
This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override the getKey and setKey methods.
void initDefaultAttributes()
This method can be overridden to set default values for attributes.
[Expand]
Inherited Methods
From class com.microstrategy.utils.config.AbstractConfigurationElement
From class java.lang.Object
From interface com.microstrategy.utils.config.ConfigurationElement
From interface com.microstrategy.utils.config.ConfigurationFile

Constants

public static final String ATT_BEAN_CLASS

Constant Value: "bean-class"

public static final String ATT_BEAN_CONSTRUCTOR

Constant Value: "bean-constructor"

public static final String ATT_BEAN_TYPE

Constant Value: "bean-type"

public static final String ATT_EVENT_HANDLER

Constant Value: "event-handler"

public static final String ATT_FACTORY_CLASS

Constant Value: "factory-class"

public static final String ATT_FACTORY_CONSTRUCTOR

Constant Value: "factory-constructor"

public static final String ATT_FEATURE_ID

Constant Value: "feature-id"

public static final String ATT_NAME

Constant Value: "name"

public static final String ATT_PERSIST_MODE

Constant Value: "persist-mode"

public static final String ATT_SESSION

Constant Value: "session"

public static final String ATT_SYS_BEAN

Constant Value: "sys-bean"

public static final String NODE_WEB_BEAN

Constant Value: "web-bean"

Public Constructors

public WebBeanInfo ()

Class constructor. Initializes a new -empty- instance of the WebBeanInfo class.

public WebBeanInfo (String name)

Class constructor. Initializes a new instance of the WebBeanProperty with the values passed as parameters

Parameters
name String name of the bean.

public WebBeanInfo (Node root)

Class constructor. Initializes a WebBeanInfo instance based on the information included on the XML Node

Parameters
root Node instance representing the web bean information.

Public Methods

public WebComponent createBeanInstance ()

Get the WebComponent corresponding to the information available on this WebBeanInfo instance and initialize it.
This bean gets created and the corresponding event handler is set. If values are not specified, default values are used.

Returns
  • A bean instance with the event handler

public String getBeanClass ()

Get the name of the bean class for the WebBeanInfo instance

Returns
  • the String name of the bean class

public String getBeanConstructor ()

Get the name of the bean constructor for the WebBeanInfo instance

Returns
  • the String name of the bean constructor

public static WebBeanInfo getBeanInfo (WebComponent component, AppContext context)

Parameters
component WebComponent instance to be used for searching its corresponding WebBeanInfo instance
context AppContext initialized instance
Returns

public WebComponent getBeanInstance (AppContext appContext)

Get the WebComponent corresponding to the information available on this WebBeanInfo instance and initialize it.
This method returns an instance of the bean by creating it from the BeanFactory, or from the classes specified in the config file.
This bean gets initialized its properties, session and eventHandler based again, on the properties in the config file. If values are not specified, default values are used.

Parameters
appContext AppContext instance
Returns
  • an WebComponent instance of the bean initialized
Throws
WebAppException if an error is generated while initializing the bean

public WebComponent getBeanInstance (AppContext appContext, ComponentInitializationContext initContext)

Get the WebComponent corresponding to the information available on this WebBeanInfo instance and initialize it.
This method returns an instance of the bean by creating it from the BeanFactory, or from the classes specified in the config file.
This bean gets initialized its properties, session and eventHandler based again, on the properties in the config file. If values are not specified, default values are used.

Parameters
appContext AppContext instance
initContext the ComponentInitializationContext object with initialization information the beans will require to initialize
Returns
  • an WebComponent instance of the bean initialized
Throws
WebAppException if an error is generated while initializing the bean

public WebBeanStyleList getBeanStyleList ()

Get the collection of bean styles for the WebBeanInfo instance

Returns
  • the WebBeanStyleList associated with this WebBeanInfo

public WebBeanInfoList getChildrenBeans ()

Get the WebBeanInfoList of WebBeans children of this bean

Returns
  • the list of beans children of this WebBeanInfo

public int getConfigType ()

This method is deprecated.
With the introduction of the centralized BeanFactory class, bean configuration type distinctions are no longer relevant.

Get the corresponding configuration type of this bean

Returns
  • the configuration type for this bean, a value from EnumWebConfigBeanType

public String getEventHandler ()

Get the event handler for this WebBeanInfo instance

Returns
  • the String value of the event handler property of this WebBeanInfo

public EventHandlerList getEventHandlerList ()

Get the collection of bean event handlers for the WebBeanInfo instance

Returns
  • the EventHandlerList associated with this WebBeanInfo

public String getFactoryClass ()

Get the name of the factory class for the WebBeanInfo instance

Returns
  • the String name of the factory class for the bean

public String getFactoryConstructor ()

Get the name of the factory constructor for the WebBeanInfo instance

Returns
  • the String name of the factory constructor for the bean

public String getFeatureId ()

Get the feature Id associated with this page. The feature Id controls whether the page is visible or not depending on user privileges and application settings.

Returns
  • the feature Id associated with this page.

public WebBeanPropertyList getInitPropertyList ()

Get the collection of bean init-properties for the WebBeanInfo instance. This properties are applied to a bean instance when the beans gets initialized.

Returns
  • the WebBeanPropertyList associated with this WebBeanInfo

public String getName ()

Get the name of the WebBeanInfo instance

Returns
  • the String value of the name property

public int getPersistMode ()

Get the persist mode of this WebBeanInfo instance

Returns
  • the boolean value of the persist property of this WebBeanInfo

public WebBeanPropertyList getRequestPropertyList ()

Get the collection of bean request-properties for the WebBeanInfo instance. This properties are applied to a bean instance when the request is handled.

Returns
  • the WebBeanPropertyList associated with this WebBeanInfo

public String getSessionName ()

Get the session name for this WebBeanInfo instance

Returns
  • the String name of the session this bean will use when executing

public int getSysBean ()

This method is deprecated.
Use getSysBeanName() instead. With the introduction of the centralized BeanFactory class, the String type name is now the recommended way to refer to a bean's type.

Get the sysBean property value of the WebBeanInfo instance

Returns
  • the int value of the sysBean property

public String getSysBeanName ()

public void initBeanInstance (AppContext appContext, WebComponent beanInstance, ComponentInitializationContext initContext)

public void setBeanClass (String beanClass)

Set the name of the bean class for the WebBeanInfo instance

Parameters
beanClass String name of the bean class

public void setBeanConstructor (String beanConstructor)

Set the name of the bean constructor for the WebBeanInfo instance

Parameters
beanConstructor String name of the bean constructor

public void setBeanProperties (WebComponent beanInstance, WebBeanPropertyList properties, AppContext appContext)

Set the properties of the bean instance given the parameters available on the RequestKeys.

Parameters
beanInstance instance of the bean to be initialized
properties WebBeanPropertyList object witht he information about the bean's properties to set
appContext AppContext instance.

public void setBeanStyles (Object beanInstance, AppContext appContext)

Set the styles of the bean instance given the parameters available on the RequestKeys.

Parameters
beanInstance instance of the bean to be initialized
appContext AppContext instance
Throws
WebAppException if an error is generated while initializing the bean

public void setConfigType (int configType)

This method is deprecated.
With the introduction of the centralized BeanFactory class, bean configuration type distinctions are no longer relevant.

Sets the corresponding configuration type of this bean

Parameters
configType the configuration type from EnumWebConfigBeanType

public void setEventHandler (String eventHandler)

Set the event handler for this WebBeanInfo instance

Parameters
eventHandler String value of the event handler property of this WebBeanInfo

public void setFactoryClass (String factoryClass)

Set the name of the factory class for the WebBeanInfo instance

Parameters
factoryClass String name of the factory class for the bean

public void setFactoryConstructor (String factoryConstructor)

Set the name of the factory constructor for the WebBeanInfo instance

Parameters
factoryConstructor String name of the factory constructor for the bean

public void setFeatureId (String featureId)

Sets the name of the class for the event handler of this page.

Parameters
featureId the feature Id associated with this page.

public void setName (String name)

Set the name of the WebBeanInfo instance

Parameters
name the String value of the name property - unique identifier of the WebBeanInfo instance.

public void setPersistMode (int persistMode)

Set the persist mode of this WebBeanInfo instance

Parameters
persistMode boolean value of the persist property of this WebBeanInfo

public void setSessionName (String session)

Set the session name for this WebBeanInfo instance

Parameters
session String name of the session this bean will use when executing

public void setSysBean (int sysBean)

This method is deprecated.
Use setSysBeanName(String) instead. With the introduction of the centralized BeanFactory class, the String type name is now the recommended way to refer to a bean's type.

Set the sysBean property value of the WebBeanInfo instance

Parameters
sysBean the int value of the sysBean property

public void setSysBeanName (String value)

Protected Methods

protected String getKeyAttribute ()

This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override the getKey and setKey methods.

protected void initDefaultAttributes ()

This method can be overridden to set default values for attributes. Simply extend this method and call setAttribute(String, Object)