| java.lang.Object org.geoserver.platform.GeoServerExtensions
GeoServerExtensions | public class GeoServerExtensions implements ApplicationContextAware,ApplicationListener(Code) | | Utility class uses to process GeoServer extension points.
An instance of this class needs to be registered in spring context as follows.
<bean id="geoserverExtensions" class="org.geoserver.GeoServerExtensions"/>
It must be a singleton, and must not be loaded lazily. Furthermore, this
bean must be loaded before any beans that use it.
author: Justin Deoliveira, The Open Planning Project author: Andrea Aime, The Open Planning Project |
Field Summary | |
static ApplicationContext | context | static SoftValueHashMap | extensionsCache Caches the names of the beans for a particular type, so that the lookup (expensive)
wont' be needed. |
Method Summary | |
final public static Object | bean(String name) | final public static List | extensions(Class extensionPoint, ApplicationContext context) Loads all extensions implementing or extending extensionPoint .
Parameters: extensionPoint - The class or interface of the extensions. Parameters: context - The context in which to perform the lookup. | final public static List | extensions(Class extensionPoint) Loads all extensions implementing or extending extensionPoint .
This method uses the "default" application context to perform the lookup.
See
GeoServerExtensions.setApplicationContext(ApplicationContext) .
Parameters: extensionPoint - The class or interface of the extensions. | public void | onApplicationEvent(ApplicationEvent event) | public void | setApplicationContext(ApplicationContext context) Sets the web application context to be used for looking up extensions.
This method is called by the spring container, and should never be called
by client code. |
context | static ApplicationContext context(Code) | | A static application context
|
extensionsCache | static SoftValueHashMap extensionsCache(Code) | | Caches the names of the beans for a particular type, so that the lookup (expensive)
wont' be needed. We cache names instead of beans because doing the latter we would
break the "singleton=false" directive of some beans
|
bean | final public static Object bean(String name)(Code) | | Returns a specific bean given its name
Parameters: name - |
extensions | final public static List extensions(Class extensionPoint, ApplicationContext context)(Code) | | Loads all extensions implementing or extending extensionPoint .
Parameters: extensionPoint - The class or interface of the extensions. Parameters: context - The context in which to perform the lookup. A collection of the extensions, or an empty collection. |
extensions | final public static List extensions(Class extensionPoint)(Code) | | Loads all extensions implementing or extending extensionPoint .
This method uses the "default" application context to perform the lookup.
See
GeoServerExtensions.setApplicationContext(ApplicationContext) .
Parameters: extensionPoint - The class or interface of the extensions. A collection of the extensions, or an empty collection. |
onApplicationEvent | public void onApplicationEvent(ApplicationEvent event)(Code) | | |
setApplicationContext | public void setApplicationContext(ApplicationContext context) throws BeansException(Code) | | Sets the web application context to be used for looking up extensions.
This method is called by the spring container, and should never be called
by client code. If client needs to supply a particular context, methods
which take a context are available.
This is the context that is used for methods which dont supply their
own context.
|
|
|