com.sun.faces.spi
Class ManagedBeanFactoryWrapper

java.lang.Object
  extended by com.sun.faces.spi.ManagedBeanFactory
      extended by com.sun.faces.spi.ManagedBeanFactoryWrapper

public abstract class ManagedBeanFactoryWrapper
extends ManagedBeanFactory

This is intended to be the main access point to the pluggable ManagedBeanFactory mechanism. Subclasses must provide a public constructor that takes a single ManagedBeanFactory argument and stores it as an ivar, returning it from the getWrapped() method.

Author:
edburns, rlubke

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.faces.spi.ManagedBeanFactory
ManagedBeanFactory.Scope
 
Constructor Summary
ManagedBeanFactoryWrapper()
           
 
Method Summary
 ManagedBeanBean getManagedBeanBean()
          Get the JavaBean that encapsulates the configuration data for the bean instance to be created by this factory.
 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).
 ManagedBeanFactory.Scope getScope()
          Return the ManagedBeanFactory.Scope of the managed-bean created by this factory.
abstract  ManagedBeanFactory getWrapped()
           
 boolean isInjectable()
           
 java.lang.Object newInstance(javax.faces.context.FacesContext context)
          Return a new instance of this managed-bean.
 void setManagedBeanBean(ManagedBeanBean bean)
          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> others)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedBeanFactoryWrapper

public ManagedBeanFactoryWrapper()
Method Detail

getWrapped

public abstract ManagedBeanFactory getWrapped()

getScope

public ManagedBeanFactory.Scope getScope()
Description copied from class: ManagedBeanFactory

Return the ManagedBeanFactory.Scope of the managed-bean created by this factory.

Specified by:
getScope in class ManagedBeanFactory
See Also:
ManagedBeanFactory.getScope()

newInstance

public java.lang.Object newInstance(javax.faces.context.FacesContext context)
Description copied from class: ManagedBeanFactory

Return a new instance of this managed-bean. It is the caller's responsibility to call ManagedBeanFactory.getScope() and store the returned managed-bean in the proper scope.

Specified by:
newInstance in class ManagedBeanFactory
See Also:
ManagedBeanFactory.newInstance(javax.faces.context.FacesContext)

setManagedBeanBean

public void setManagedBeanBean(ManagedBeanBean bean)
Description copied from class: ManagedBeanFactory

Set the JavaBean that encapsulates the configuration data for the bean instance to be created by this factory.

Specified by:
setManagedBeanBean in class ManagedBeanFactory
See Also:
ManagedBeanFactory.setManagedBeanBean(com.sun.faces.config.beans.ManagedBeanBean)

getManagedBeanBean

public ManagedBeanBean getManagedBeanBean()
Description copied from class: ManagedBeanFactory

Get the JavaBean that encapsulates the configuration data for the bean instance to be created by this factory.

Specified by:
getManagedBeanBean in class ManagedBeanFactory
See Also:
ManagedBeanFactory.getManagedBeanBean()

setManagedBeanFactoryMap

public void setManagedBeanFactoryMap(java.util.Map<java.lang.String,ManagedBeanFactory> others)
Description copied from class: ManagedBeanFactory

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.

Specified by:
setManagedBeanFactoryMap in class ManagedBeanFactory
See Also:
ManagedBeanFactory#setManagedBeanFactoryMap(java.util.Map)

getManagedBeanFactoryMap

public java.util.Map<java.lang.String,ManagedBeanFactory> getManagedBeanFactoryMap()
Description copied from class: ManagedBeanFactory

Get the Map of managed-bean-name to ManagedBeanFactory instances passed in a previous call to ManagedBeanFactory.setManagedBeanFactoryMap(java.util.Map).

Note that this property enables the factory to know the complete set of configured managed-beans in this application.

Specified by:
getManagedBeanFactoryMap in class ManagedBeanFactory
See Also:
ManagedBeanFactory.getManagedBeanFactoryMap()

isInjectable

public boolean isInjectable()
Specified by:
isInjectable in class ManagedBeanFactory
Returns:
true if the managed bean instance created by this factory is a candidate for resource injection otherwise, returns false
See Also:
ManagedBeanFactory.isInjectable()


Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.