org.springframework.richclient.application.support
Class BeanFactoryViewDescriptorRegistry
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.richclient.application.support.BeanFactoryViewDescriptorRegistry
- All Implemented Interfaces:
- ApplicationContextAware, ViewDescriptorRegistry
public class BeanFactoryViewDescriptorRegistry
- extends ApplicationObjectSupport
- implements ViewDescriptorRegistry
A simple ViewDescriptorRegistry
implementation that pulls singleton view definitions out
of a spring application context. This class is intended to be managed by a Spring IoC container.
If being created programatically, be sure to call the
ApplicationObjectSupport.setApplicationContext(org.springframework.context.ApplicationContext)
method.
- Author:
- Keith Donald, Kevin Stembridge
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanFactoryViewDescriptorRegistry
public BeanFactoryViewDescriptorRegistry()
getViewDescriptors
public ViewDescriptor[] getViewDescriptors()
- Returns an array of all the view descriptors in the registry.
- Specified by:
getViewDescriptors
in interface ViewDescriptorRegistry
- Returns:
- An array of all the view descriptors in the registry. The array may be empty but
will never be null.
getViewDescriptor
public ViewDescriptor getViewDescriptor(String viewName)
- Returns the view descriptor with the given identifier, or null if no such bean definition
with the given name exists in the current application context.
- Specified by:
getViewDescriptor
in interface ViewDescriptorRegistry
- Parameters:
viewName
- The bean name of the view descriptor that is to be retrieved from the
underlying application context. Must not be null.
- Returns:
- The view descriptor with the given id, or null.
- Throws:
IllegalArgumentException
- if viewName
is null.
BeanNotOfRequiredTypeException
- if the bean retrieved from the underlying application
context is not of type ViewDescriptor
.
Copyright © 2004-2009 The Spring Framework. All Rights Reserved.