Package uk.ac.gda.ui.tool.spring
Class SpringApplicationContextProxy
java.lang.Object
uk.ac.gda.ui.tool.spring.SpringApplicationContextProxy
This class uses the
SpringApplicationContextFacade to implements client specific methods.
These methods are not implementable by the SpringApplicationContextFacade as its package is supposed to not contain client libraries.-
Method Summary
Modifier and TypeMethodDescriptionstatic final voidaddDisposableApplicationListener(Object object, org.springframework.context.ApplicationListener<?> listener) Deprecated.static final voidaddDisposableApplicationListener(org.eclipse.swt.widgets.Widget widget, org.springframework.context.ApplicationListener<?> listener) Registers alistenerand removes it when the relatedcompositeis disposed.static <T> TDeprecated.static ObjectDeprecated.static <T> Optional<T> getOptionalBean(Class<T> bean) Deprecated.static final voidpublishEvent(org.springframework.context.ApplicationEvent event) Deprecated.
-
Method Details
-
publishEvent
@Deprecated(since="GDA 9.19") public static final void publishEvent(org.springframework.context.ApplicationEvent event) Deprecated.- Parameters:
event-
-
getBean
Deprecated.Return the bean instance that uniquely matches the given object type, if any.- Parameters:
requiredType- type the bean must match; can be an interface or superclass.nullis disallowed.This method goes into
ListableBeanFactoryby-type lookup territory but may also be translated into a conventional by-name lookup based on the name of the given type. For more extensive retrieval operations across sets of beans, useListableBeanFactoryand/orBeanFactoryUtils.- Returns:
- an instance of the single bean matching the required type
- Throws:
org.springframework.beans.factory.NoSuchBeanDefinitionException- if no bean of the given type was foundorg.springframework.beans.factory.NoUniqueBeanDefinitionException- if more than one bean of the given type was found
-
getBean
Deprecated.Return an instance, which may be shared or independent, of the specified bean.Allows for specifying explicit constructor arguments / factory method arguments, overriding the specified default arguments (if any) in the bean definition.
- Parameters:
name- the name of the bean to retrieveargs- arguments to use if creating a prototype using explicit arguments to a static factory method. It is invalid to use a non-null args value in any other case.- Returns:
- an instance of the bean
- Throws:
org.springframework.beans.factory.NoSuchBeanDefinitionException- if there is no such bean definitionorg.springframework.beans.factory.BeanDefinitionStoreException- if arguments have been given but the affected bean isn't a prototype
-
getOptionalBean
Deprecated.- Parameters:
bean-- Returns:
- an optional instance
-
addDisposableApplicationListener
public static final void addDisposableApplicationListener(org.eclipse.swt.widgets.Widget widget, org.springframework.context.ApplicationListener<?> listener) throws GDAClientException Registers alistenerand removes it when the relatedcompositeis disposed.- Parameters:
widget- the element publishing the dispose event which causeslistenerto be removedlistener- the application lister to- Throws:
GDAClientException- if the widget isnullorWidget.isDisposed()returnstrue
-
addDisposableApplicationListener
@Deprecated(since="GDA 9.19") public static final void addDisposableApplicationListener(Object object, org.springframework.context.ApplicationListener<?> listener) Deprecated.- Parameters:
object- the element publishing the dispose event which causeslistenerto be removedlistener- the application lister to
-
SpringApplicationContextFacade.addDisposableApplicationListener(Object, ApplicationListener)