public class ManagedBeanFactoryImpl extends ManagedBeanFactory
This class creates a managed bean instance. It has a contract with the ManagedBeanBean class which is populated from the config file. The bean instance is created lazily so a deep copy of the ManagedBeanBean is required.
The Application implementation instantiated the beans as required and stores them in the appropriate scope.
ManagedBeanFactory.Scope| Constructor and Description |
|---|
ManagedBeanFactoryImpl(ManagedBeanBean managedBean)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Class |
copyListEntriesFromConfigToList(ListEntriesBean listEntries,
java.util.List<?> valuesForBean) |
java.lang.String |
getBeanDescription(java.lang.String lang) |
protected int |
getBeanType(java.lang.Object bean)
determine the nature of the bean
|
ManagedBeanBean |
getManagedBeanBean()
Get the JavaBean that encapsulates the configuration data for
the bean instance to be created by this factory.
|
java.lang.Class |
getManagedBeanClass() |
java.util.Map<java.lang.String,ManagedBeanFactory> |
getManagedBeanFactoryMap()
Get the
Map of managed-bean-name to
ManagedBeanFactory instances passed in a previous
call to ManagedBeanFactory.setManagedBeanFactoryMap(java.util.Map<java.lang.String, com.sun.faces.spi.ManagedBeanFactory>). |
protected int |
getPropertyType(ManagedPropertyBean bean)
determine the nature of the property
|
ManagedBeanFactory.Scope |
getScope()
Return the
ManagedBeanFactory.Scope of the managed-bean created by this
factory. |
boolean |
isInjectable() |
static boolean |
isMixedVBExpression(java.lang.String expression) |
static boolean |
isVBExpression(java.lang.String expression) |
java.lang.Object |
newInstance(javax.faces.context.FacesContext context)
Attempt to instantiate the JavaBean and set its properties.
|
void |
setComponentAttribute(java.lang.Object component,
java.lang.String propName,
java.lang.Object propValue)
Sets the passed in property name and value as an attribute on
|
void |
setManagedBeanBean(ManagedBeanBean newBean)
Set the JavaBean that encapsulates the configuration data for
the bean instance to be created by this factory.
|
void |
setManagedBeanFactoryMap(java.util.Map<java.lang.String,ManagedBeanFactory> newManagedBeanFactoryMap)
Set the
Map of managed-bean-name to
ManagedBeanFactory instances into this factory
instance so that properties that are managed beans may be
instantiated if necessary. |
protected void |
setPropertiesIntoBean(java.lang.Object bean,
int beanType,
ManagedBeanBean managedBean) |
public ManagedBeanFactoryImpl(ManagedBeanBean managedBean)
public boolean isInjectable()
isInjectable in class ManagedBeanFactorytrue if the managed bean instance created
by this factory is a candidate for resource injection otherwise,
returns falsepublic void setManagedBeanBean(ManagedBeanBean newBean)
ManagedBeanFactorySet the JavaBean that encapsulates the configuration data for the bean instance to be created by this factory.
setManagedBeanBean in class ManagedBeanFactorypublic ManagedBeanBean getManagedBeanBean()
ManagedBeanFactoryGet the JavaBean that encapsulates the configuration data for the bean instance to be created by this factory.
getManagedBeanBean in class ManagedBeanFactorypublic java.util.Map<java.lang.String,ManagedBeanFactory> getManagedBeanFactoryMap()
ManagedBeanFactoryGet the Map of managed-bean-name to
ManagedBeanFactory instances passed in a previous
call to ManagedBeanFactory.setManagedBeanFactoryMap(java.util.Map<java.lang.String, com.sun.faces.spi.ManagedBeanFactory>).
Note that this property enables the factory to know the complete set of configured managed-beans in this application.
getManagedBeanFactoryMap in class ManagedBeanFactorypublic void setManagedBeanFactoryMap(java.util.Map<java.lang.String,ManagedBeanFactory> newManagedBeanFactoryMap)
ManagedBeanFactorySet the Map of managed-bean-name to
ManagedBeanFactory instances into this factory
instance so that properties that are managed beans may be
instantiated if necessary.
setManagedBeanFactoryMap in class ManagedBeanFactorypublic java.lang.String getBeanDescription(java.lang.String lang)
public final java.lang.Class getManagedBeanClass()
public java.lang.Object newInstance(javax.faces.context.FacesContext context)
throws javax.faces.FacesException
newInstance in class ManagedBeanFactoryjavax.faces.FacesExceptionprotected int getBeanType(java.lang.Object bean)
protected int getPropertyType(ManagedPropertyBean bean)
protected java.lang.Class copyListEntriesFromConfigToList(ListEntriesBean listEntries, java.util.List<?> valuesForBean) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionprotected void setPropertiesIntoBean(java.lang.Object bean,
int beanType,
ManagedBeanBean managedBean)
public ManagedBeanFactory.Scope getScope()
ManagedBeanFactoryReturn the ManagedBeanFactory.Scope of the managed-bean created by this
factory.
getScope in class ManagedBeanFactorypublic void setComponentAttribute(java.lang.Object component,
java.lang.String propName,
java.lang.Object propValue)
public static boolean isVBExpression(java.lang.String expression)
public static boolean isMixedVBExpression(java.lang.String expression)
Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.