| java.lang.Object uk.org.ponder.rsf.view.support.AutoComponentProducerManager
AutoComponentProducerManager | public class AutoComponentProducerManager implements ComponentProducerWrapper,ApplicationContextAware(Code) | | Manages a set of beans representing view producers. The slightly unusual
approach adopted for request-scope producers is recommended by all sorts of
considerations of user convenience - we would like implementors of request
scope view producers to i) simply implement normal request-scope beans ii)
not have any of them instantiated except for the ones required for a request,
and iii) signal their capabilities through the selection of interfaces they
implement.
All of these considerations militate against the use of some kind of AOP
technique, which would become quite cumbersome, and also tedious to make
efficient.
Instead, this class internally maintains a hash of application-scope "blank"
producers that are dispensed to users (the framework) - these will answer to
all application-scope and other static queries per contract - however, when
the users want to invoke the production method, they must first make a call
to wrapProducer - for an application scope producer, this simply returns the
original bean.
This bean ALSO scours the application context similarly for application
scope ViewProducers in the straightforward way.
author: Antranig Basman (amb26@ponder.org.uk) |
getProducers | public Collection getProducers()(Code) | | Returns the list of "advertised" producers. These will be the ones of type
ViewComponentProducer found at either application or request scope. This
differs from the set which can be "translated" by wrapProducer, which is
the set of ALL producers found at request scope.
The producers available for this request cycle. |
setApplicationContext | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException(Code) | | |
wrapProducer | public ComponentProducer wrapProducer(ComponentProducer towrap)(Code) | | For a request-scope "blank" producer, fetches and returns the corresponding
request-scope bean. For any other producer, returns the argument unchanged.
|
|
|