org.springframework.richclient.application.support
Class BeanFactoryPageDescriptorRegistry
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.richclient.application.support.BeanFactoryPageDescriptorRegistry
- All Implemented Interfaces:
- ApplicationContextAware, PageDescriptorRegistry
public class BeanFactoryPageDescriptorRegistry
- extends ApplicationObjectSupport
- implements PageDescriptorRegistry
A simple PageDescriptorRegistry
implementation that pulls singleton page 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, Rogan Dawes
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanFactoryPageDescriptorRegistry
public BeanFactoryPageDescriptorRegistry()
getPageDescriptors
public PageDescriptor[] getPageDescriptors()
- Returns an array of all the page descriptors in the registry.
- Specified by:
getPageDescriptors
in interface PageDescriptorRegistry
- Returns:
- An array of all the page descriptors in the registry. The array may be empty but
will never be null.
getPageDescriptor
public PageDescriptor getPageDescriptor(String pageName)
- Returns the page descriptor with the given identifier, or null if no such bean definition
with the given name exists in the current application context.
- Specified by:
getPageDescriptor
in interface PageDescriptorRegistry
- Parameters:
pageName
- The bean name of the page descriptor that is to be retrieved from the
underlying application context. Must not be null.
- Returns:
- The page descriptor with the given id, or null.
- Throws:
IllegalArgumentException
- if pageName
is null.
BeanNotOfRequiredTypeException
- if the bean retrieved from the underlying application
context is not of type PageDescriptor
.
Copyright © 2004-2009 The Spring Framework. All Rights Reserved.