Package com.microstrategy.web.beans
Interface LocalBeanFactory
-
- All Known Implementing Classes:
AbstractLocalBeanFactory
,AdminBeanFactory
,AppBeanFactory
,WebBeanFactory
public interface LocalBeanFactory
TheLocalBeanFactory
interface specifies the contract that a package-level bean factory must implement--most importantly, the ability to create a bean based on its type name. TheBeanFactory
class will delegate to a package-level factory if one is specified in a given<bean-package>
node in beanFactoryConfig.xml. For more information, see theBeanFactory
documentation.- Since:
- MicroStrategy Web 9.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canCreateBean(java.lang.String beanName)
Check whether this factory can create a bean with a given type name.WebComponent
newBean(java.lang.String beanName)
Create a bean based on the bean type name.
-
-
-
Method Detail
-
newBean
WebComponent newBean(java.lang.String beanName) throws BeanNotFoundException
Create a bean based on the bean type name.- Parameters:
beanName
- The type name of the desired bean (ex: "ReportBean").- Returns:
- A new
WebComponent
instance that corresponds tobeanName
. - Throws:
BeanNotFoundException
- IfbeanName
could not be resolved to a class (i.e. it is not supported by this factory).
-
canCreateBean
boolean canCreateBean(java.lang.String beanName)
Check whether this factory can create a bean with a given type name. If this method returns false for a given bean type name, then callingnewBean(java.lang.String)
with that bean type name will result in aBeanNotFoundException
.- Parameters:
beanName
- The type name of the bean to check.- Returns:
- true if this factory can create a bean for
beanName
; false otherwise.
-
-