public interface

LocalBeanFactory

com.microstrategy.web.beans.LocalBeanFactory
Known Indirect Subclasses

Class Overview

The LocalBeanFactory 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. The BeanFactory 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 the BeanFactory documentation.

Summary

Public Methods
abstract boolean canCreateBean(String beanName)
Check whether this factory can create a bean with a given type name.
abstract WebComponent newBean(String beanName)
Create a bean based on the bean type name.

Public Methods

public abstract boolean canCreateBean (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 calling newBean(String) with that bean type name will result in a BeanNotFoundException.

Parameters
beanName The type name of the bean to check.
Returns
  • true if this factory can create a bean for beanName; false otherwise.

public abstract WebComponent newBean (String beanName)

Create a bean based on the bean type name.

Parameters
beanName The type name of the desired bean (ex: "ReportBean").
Returns
Throws
BeanNotFoundException If beanName could not be resolved to a class (i.e. it is not supported by this factory).