|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.iplanet.jato.ViewBeanManager
A factory for the instantiation and retrieval of ViewBean
objects
within a request. This class guarantees that only a single instance of a
requested view bean is created during each request. View beans obtained via
this class are shared between all objects in the current request. This class
lazily instantiates objects as needed, but never creates more than a single
instance of a given type. This class can be used to obtain any of the
ViewBeans
in the application.
Developers need not create any instances of this class. A single instance is automatically created at the beginning of the request and stored in the request context.
RequestContext
,
ViewBean
Constructor Summary | |
ViewBeanManager(RequestContext requestContext,
java.lang.String basePackageName)
Create an instance with the specified request context and module package name |
Method Summary | |
java.lang.String |
getBasePackageName()
Return the name of the base package used for local ViewBean
lookups |
ViewBean |
getLocalViewBean(java.lang.String localViewBeanName)
Obtain a ViewBean instance that corresponds to the supplied
logical name (this name is also referred to as the ViewBean 's
local name). |
ViewBean |
getViewBean(java.lang.Class clazz)
Obtain a ViewBean instance by class |
ViewBean |
getViewBean(java.lang.String className)
Obtain a ViewBean instance by class name |
ViewBean |
getViewBeanByClassName(java.lang.String className)
Deprecated. Use the getViewBean(String) method instead |
ViewBean |
getViewBeanByName(java.lang.String localViewBeanName)
Deprecated. Use the getLocalViewBean() method
instead |
void |
notifyRequestCompletionListeners()
Deprecated. Code that calls this method is no longer required and may be removed. |
void |
registerInstance(ViewBean bean)
Register the specified view bean with the ViewBeanManager . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ViewBeanManager(RequestContext requestContext, java.lang.String basePackageName)
requestContext
- The request context for the current requestbasePackageName
- The fully qualified package name of the module servlet
creating this object. This package name is used to
later qualify local ViewBean
lookups.Method Detail |
public java.lang.String getBasePackageName()
ViewBean
lookupsViewBean
lookups.public ViewBean getViewBeanByName(java.lang.String localViewBeanName) throws java.lang.ClassNotFoundException
getLocalViewBean()
method
instead
public ViewBean getLocalViewBean(java.lang.String localViewBeanName) throws java.lang.ClassNotFoundException
ViewBean
instance that corresponds to the supplied
logical name (this name is also referred to as the ViewBean
's
local name). A local view bean name is the unqualified name of the
view bean class without the ViewBean
suffix. For example, if
a module has a view bean class com.foo.PageFooViewBean
,
the local view bean name is simply PageFoo
. Because the local
view bean name is automatically qualified by the base package name, local
names can only be used to obtain references to view beans within the module
whose servlet initially handled the current request.localViewBeanName
- The logical, or local, name of the desired view beanViewBean
that corresponds to the
supplied namepublic ViewBean getViewBeanByClassName(java.lang.String className) throws java.lang.ClassNotFoundException
getViewBean(String)
method instead
public ViewBean getViewBean(java.lang.String className) throws java.lang.ClassNotFoundException
ViewBean
instance by class nameclassName
- The ViewBean
class nameViewBean
that corresponds to the
supplied class namepublic ViewBean getViewBean(java.lang.Class clazz)
ViewBean
instance by classclazz
- The ViewBean
class nameViewBean
that corresponds to the
supplied classpublic void registerInstance(ViewBean bean)
ViewBeanManager
.
Subsequent requests for the same view bean within the current request
will return the registered instance.bean
- The ViewBean
to registerpublic final void notifyRequestCompletionListeners()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |