Package com.microstrategy.web.app
Class WebBeanInfo
- java.lang.Object
-
- com.microstrategy.utils.config.AbstractConfigurationElement
-
- com.microstrategy.web.app.WebBeanInfo
-
- All Implemented Interfaces:
ConfigurationElement
,ConfigurationFile
,java.lang.Cloneable
public class WebBeanInfo extends AbstractConfigurationElement
- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
AbstractConfigurationElement.FilteredList
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATT_BEAN_CLASS
static java.lang.String
ATT_BEAN_CONSTRUCTOR
static java.lang.String
ATT_BEAN_TYPE
static java.lang.String
ATT_EVENT_HANDLER
static java.lang.String
ATT_FACTORY_CLASS
static java.lang.String
ATT_FACTORY_CONSTRUCTOR
static java.lang.String
ATT_FEATURE_ID
static java.lang.String
ATT_NAME
static java.lang.String
ATT_PERSIST_MODE
static java.lang.String
ATT_SESSION
static java.lang.String
ATT_SYS_BEAN
static java.lang.String
NODE_WEB_BEAN
-
Fields inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
ATT_CONFIG_SRC, ATT_DELETED, ATT_POSITION, ATT_PROTOTYPE, ATT_USE_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description WebBeanInfo()
Class constructor.WebBeanInfo(java.lang.String name)
Class constructor.WebBeanInfo(org.w3c.dom.Node root)
Class constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description WebComponent
createBeanInstance()
Get the WebComponent corresponding to the information available on this WebBeanInfo instance and initialize it.java.lang.String
getBeanClass()
Get the name of the bean class for the WebBeanInfo instancejava.lang.String
getBeanConstructor()
Get the name of the bean constructor for the WebBeanInfo instancestatic 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 instanceWebBeanInfoList
getChildrenBeans()
Get the WebBeanInfoList of WebBeans children of this beanint
getConfigType()
Deprecated.With the introduction of the centralizedBeanFactory
class, bean configuration type distinctions are no longer relevant.java.lang.String
getEventHandler()
Get the event handler for this WebBeanInfo instanceEventHandlerList
getEventHandlerList()
Get the collection of bean event handlers for the WebBeanInfo instancejava.lang.String
getFactoryClass()
Get the name of the factory class for the WebBeanInfo instancejava.lang.String
getFactoryConstructor()
Get the name of the factory constructor for the WebBeanInfo instancejava.lang.String
getFeatureId()
Get the feature Id associated with this page.WebBeanPropertyList
getInitPropertyList()
Get the collection of bean init-properties for the WebBeanInfo instance.protected java.lang.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 thegetKey
andsetKey
methods.java.lang.String
getName()
Get the name of the WebBeanInfo instanceint
getPersistMode()
Get the persist mode of this WebBeanInfo instanceWebBeanPropertyList
getRequestPropertyList()
Get the collection of bean request-properties for the WebBeanInfo instance.java.lang.String
getSessionName()
Get the session name for this WebBeanInfo instanceint
getSysBean()
Deprecated.UsegetSysBeanName()
instead.java.lang.String
getSysBeanName()
void
initBeanInstance(AppContext appContext, WebComponent beanInstance, ComponentInitializationContext initContext)
protected void
initDefaultAttributes()
This method can be overridden to set default values for attributes.void
setBeanClass(java.lang.String beanClass)
Set the name of the bean class for the WebBeanInfo instancevoid
setBeanConstructor(java.lang.String beanConstructor)
Set the name of the bean constructor for the WebBeanInfo instancevoid
setBeanProperties(WebComponent beanInstance, WebBeanPropertyList properties, AppContext appContext)
Set the properties of the bean instance given the parameters available on the RequestKeys.void
setBeanStyles(java.lang.Object beanInstance, AppContext appContext)
Set the styles of the bean instance given the parameters available on the RequestKeys.void
setConfigType(int configType)
Deprecated.With the introduction of the centralizedBeanFactory
class, bean configuration type distinctions are no longer relevant.void
setEventHandler(java.lang.String eventHandler)
Set the event handler for this WebBeanInfo instancevoid
setFactoryClass(java.lang.String factoryClass)
Set the name of the factory class for the WebBeanInfo instancevoid
setFactoryConstructor(java.lang.String factoryConstructor)
Set the name of the factory constructor for the WebBeanInfo instancevoid
setFeatureId(java.lang.String featureId)
Sets the name of the class for the event handler of this page.void
setName(java.lang.String name)
Set the name of the WebBeanInfo instancevoid
setPersistMode(int persistMode)
Set the persist mode of this WebBeanInfo instancevoid
setSessionName(java.lang.String session)
Set the session name for this WebBeanInfo instancevoid
setSysBean(int sysBean)
Deprecated.UsesetSysBeanName(java.lang.String)
instead.void
setSysBeanName(java.lang.String value)
-
Methods inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
addFileSource, applyCustomization, applyCustomizations, cleanUpDeletedElements, clone, delete, deltas, deltas, equalAtts, equalElements, equalNodeValues, equals, equalsIncludingDeletedElements, exportAttributesToXML, exportElementsToXML, exportNodeValueToXML, getAttribute, getAttributes, getBoolAttribute, getChildKey, getConfigSrc, getDTDFileName, getElement, getElement, getElements, getFileLoader, getIntAttribute, getIntAttribute, getKey, getLineNumber, getList, getNextKey, getNodeName, getNodeValue, getNodeValue, getOrCreateElement, getParent, getPosition, getPrototype, getRegisteredClass, getSelfInitPath, getSource, getStrAttribute, getUseDefault, getXMLParserParameters, getXMLSerializerParameters, hashCode, hashCodeAtts, hashCodeElements, hashCodeNodeValues, hasRegisteredClass, initAttributesFromXML, initElementFromXML, initElementsFromXML, initFromFile, initFromResource, initFromXML, initFromXML, initNodeValueFromXML, initPrototype, isActive, isCustomized, isDeleted, isDirty, isInSource, isKeyAttribute, load, mergeChanges, newChildInstance, newSource, original, populate, printAttributes, printElements, printNodeValue, refreshLists, registerClass, registerElement, registerElement, registerElementList, reload, reloadPrototype, removeAttribute, removeDefaults, replaceList, restore, save, save, saveChangesAs, saveConfig, saveFlatXML, saveNode, saveSource, setAttribute, setBoolAttribute, setChildOriginals, setConfigSrc, setCustomized, setElement, setFileLoader, setIntAttribute, setKey, setLineNumber, setNodeName, setNodeValue, setPosition, setPrototype, setSelfInitPath, setStrAttribute, setUseDefault, setUseValidation, throwConfigParseException, toString, toXML, toXML, toXML, toXML, useNodeValue, useValidation
-
-
-
-
Field Detail
-
NODE_WEB_BEAN
public static final java.lang.String NODE_WEB_BEAN
- See Also:
- Constant Field Values
-
ATT_NAME
public static final java.lang.String ATT_NAME
- See Also:
- Constant Field Values
-
ATT_SYS_BEAN
public static final java.lang.String ATT_SYS_BEAN
- See Also:
- Constant Field Values
-
ATT_BEAN_TYPE
public static final java.lang.String ATT_BEAN_TYPE
- See Also:
- Constant Field Values
-
ATT_FACTORY_CLASS
public static final java.lang.String ATT_FACTORY_CLASS
- See Also:
- Constant Field Values
-
ATT_FACTORY_CONSTRUCTOR
public static final java.lang.String ATT_FACTORY_CONSTRUCTOR
- See Also:
- Constant Field Values
-
ATT_BEAN_CLASS
public static final java.lang.String ATT_BEAN_CLASS
- See Also:
- Constant Field Values
-
ATT_BEAN_CONSTRUCTOR
public static final java.lang.String ATT_BEAN_CONSTRUCTOR
- See Also:
- Constant Field Values
-
ATT_FEATURE_ID
public static final java.lang.String ATT_FEATURE_ID
- See Also:
- Constant Field Values
-
ATT_SESSION
public static final java.lang.String ATT_SESSION
- See Also:
- Constant Field Values
-
ATT_PERSIST_MODE
public static final java.lang.String ATT_PERSIST_MODE
- See Also:
- Constant Field Values
-
ATT_EVENT_HANDLER
public static final java.lang.String ATT_EVENT_HANDLER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WebBeanInfo
public WebBeanInfo()
Class constructor. Initializes a new -empty- instance of the WebBeanInfo class.
-
WebBeanInfo
public WebBeanInfo(java.lang.String name)
Class constructor. Initializes a new instance of the WebBeanProperty with the values passed as parameters- Parameters:
name
-String
name of the bean.
-
WebBeanInfo
public WebBeanInfo(org.w3c.dom.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.
-
-
Method Detail
-
getKeyAttribute
protected java.lang.String getKeyAttribute()
Description copied from class:AbstractConfigurationElement
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 thegetKey
andsetKey
methods.- Specified by:
getKeyAttribute
in classAbstractConfigurationElement
- Since:
- MicroStrategy Web 9.0.0
-
initDefaultAttributes
protected void initDefaultAttributes()
Description copied from class:AbstractConfigurationElement
This method can be overridden to set default values for attributes. Simply extend this method and callAbstractConfigurationElement.setAttribute(java.lang.String, java.lang.Object)
- Overrides:
initDefaultAttributes
in classAbstractConfigurationElement
- Since:
- MicroStrategy Web 9.0.0
-
getBeanInstance
public WebComponent getBeanInstance(AppContext appContext) throws WebAppException
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 theBeanFactory
, 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
-
getBeanInstance
public WebComponent getBeanInstance(AppContext appContext, ComponentInitializationContext initContext) throws WebAppException
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 theBeanFactory
, 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
instanceinitContext
- theComponentInitializationContext
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- Since:
- MicroStrategy Web 8.0.0
-
initBeanInstance
public void initBeanInstance(AppContext appContext, WebComponent beanInstance, ComponentInitializationContext initContext) throws WebAppException
- Throws:
WebAppException
- Since:
- MicroStrategy Web 8.0.0
-
createBeanInstance
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
-
setBeanStyles
public void setBeanStyles(java.lang.Object beanInstance, AppContext appContext) throws WebAppException
Set the styles of the bean instance given the parameters available on the RequestKeys.- Parameters:
beanInstance
- instance of the bean to be initializedappContext
-AppContext
instance- Throws:
WebAppException
- if an error is generated while initializing the bean
-
setBeanProperties
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 initializedproperties
- WebBeanPropertyList object witht he information about the bean's properties to setappContext
-AppContext
instance.
-
setName
public void setName(java.lang.String name)
Set the name of the WebBeanInfo instance- Parameters:
name
- theString
value of the name property - unique identifier of the WebBeanInfo instance.
-
getName
public java.lang.String getName()
Get the name of the WebBeanInfo instance- Returns:
- the
String
value of the name property
-
setSysBeanName
public void setSysBeanName(java.lang.String value)
- Since:
- MicroStrategy Web 9.0.0
-
setSysBean
@Deprecated public void setSysBean(int sysBean)
Deprecated.UsesetSysBeanName(java.lang.String)
instead. With the introduction of the centralizedBeanFactory
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
- theint
value of the sysBean property
-
getSysBean
@Deprecated public int getSysBean()
Deprecated.UsegetSysBeanName()
instead. With the introduction of the centralizedBeanFactory
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
-
setFactoryConstructor
public void setFactoryConstructor(java.lang.String factoryConstructor)
Set the name of the factory constructor for the WebBeanInfo instance- Parameters:
factoryConstructor
-String
name of the factory constructor for the bean
-
getFactoryConstructor
public java.lang.String getFactoryConstructor()
Get the name of the factory constructor for the WebBeanInfo instance- Returns:
- the
String
name of the factory constructor for the bean
-
setFactoryClass
public void setFactoryClass(java.lang.String factoryClass)
Set the name of the factory class for the WebBeanInfo instance- Parameters:
factoryClass
-String
name of the factory class for the bean
-
getFactoryClass
public java.lang.String getFactoryClass()
Get the name of the factory class for the WebBeanInfo instance- Returns:
- the
String
name of the factory class for the bean
-
setBeanConstructor
public void setBeanConstructor(java.lang.String beanConstructor)
Set the name of the bean constructor for the WebBeanInfo instance- Parameters:
beanConstructor
-String
name of the bean constructor
-
getBeanConstructor
public java.lang.String getBeanConstructor()
Get the name of the bean constructor for the WebBeanInfo instance- Returns:
- the
String
name of the bean constructor
-
setBeanClass
public void setBeanClass(java.lang.String beanClass)
Set the name of the bean class for the WebBeanInfo instance- Parameters:
beanClass
-String
name of the bean class
-
getBeanClass
public java.lang.String getBeanClass()
Get the name of the bean class for the WebBeanInfo instance- Returns:
- the
String
name of the bean class
-
getInitPropertyList
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
-
getRequestPropertyList
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
-
setPersistMode
public void setPersistMode(int persistMode)
Set the persist mode of this WebBeanInfo instance- Parameters:
persistMode
-boolean
value of the persist property of this WebBeanInfo
-
getPersistMode
public int getPersistMode()
Get the persist mode of this WebBeanInfo instance- Returns:
- the
boolean
value of the persist property of this WebBeanInfo
-
setSessionName
public void setSessionName(java.lang.String session)
Set the session name for this WebBeanInfo instance- Parameters:
session
-String
name of the session this bean will use when executing
-
getSessionName
public java.lang.String getSessionName()
Get the session name for this WebBeanInfo instance- Returns:
- the
String
name of the session this bean will use when executing
-
setEventHandler
public void setEventHandler(java.lang.String eventHandler)
Set the event handler for this WebBeanInfo instance- Parameters:
eventHandler
-String
value of the event handler property of this WebBeanInfo
-
getEventHandler
public java.lang.String getEventHandler()
Get the event handler for this WebBeanInfo instance- Returns:
- the
String
value of the event handler property of this WebBeanInfo
-
getBeanStyleList
public WebBeanStyleList getBeanStyleList()
Get the collection of bean styles for the WebBeanInfo instance- Returns:
- the
WebBeanStyleList
associated with this WebBeanInfo
-
getEventHandlerList
public EventHandlerList getEventHandlerList()
Get the collection of bean event handlers for the WebBeanInfo instance- Returns:
- the
EventHandlerList
associated with this WebBeanInfo - Since:
- MicroStrategy Web 8.0.0
-
setConfigType
@Deprecated public void setConfigType(int configType)
Deprecated.With the introduction of the centralizedBeanFactory
class, bean configuration type distinctions are no longer relevant.Sets the corresponding configuration type of this bean- Parameters:
configType
- the configuration type from EnumWebConfigBeanType
-
getConfigType
@Deprecated public int getConfigType()
Deprecated.With the introduction of the centralizedBeanFactory
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
-
getFeatureId
public java.lang.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.
-
setFeatureId
public void setFeatureId(java.lang.String featureId)
Sets the name of the class for the event handler of this page.- Parameters:
featureId
- the feature Id associated with this page.
-
getChildrenBeans
public WebBeanInfoList getChildrenBeans()
Get the WebBeanInfoList of WebBeans children of this bean- Returns:
- the list of beans children of this WebBeanInfo
-
getBeanInfo
public static WebBeanInfo getBeanInfo(WebComponent component, AppContext context)
- Parameters:
component
-WebComponent
instance to be used for searching its correspondingWebBeanInfo
instancecontext
-AppContext
initialized instance- Returns:
- the
WebBeanInfo
instance corresponding to theWebComponent
argument - Since:
- MicroStrategy Web 8.0.0
-
getSysBeanName
public java.lang.String getSysBeanName()
- Since:
- MicroStrategy Web 9.0.0
-
-