Class SpringApplicationContextProxy

java.lang.Object
uk.ac.gda.ui.tool.spring.SpringApplicationContextProxy

public class SpringApplicationContextProxy extends Object
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 Details

    • publishEvent

      @Deprecated(since="GDA 9.19") public static final void publishEvent(org.springframework.context.ApplicationEvent event)
      Parameters:
      event -
    • getBean

      @Deprecated(since="GDA 9.19") public static <T> T getBean(Class<T> requiredType)
      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. null is disallowed.

      This method goes into ListableBeanFactory by-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, use ListableBeanFactory and/or BeanFactoryUtils.

      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 found
      org.springframework.beans.factory.NoUniqueBeanDefinitionException - if more than one bean of the given type was found
    • getBean

      @Deprecated(since="GDA 9.19") public static Object getBean(String name, Object... args)
      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 retrieve
      args - 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 definition
      org.springframework.beans.factory.BeanDefinitionStoreException - if arguments have been given but the affected bean isn't a prototype
    • getOptionalBean

      @Deprecated(since="GDA 9.19") public static <T> Optional<T> getOptionalBean(Class<T> bean)
      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 a listener and removes it when the related composite is disposed.
      Parameters:
      widget - the element publishing the dispose event which causes listener to be removed
      listener - the application lister to
      Throws:
      GDAClientException - if the widget is null or Widget.isDisposed() returns true
    • addDisposableApplicationListener

      @Deprecated(since="GDA 9.19") public static final void addDisposableApplicationListener(Object object, org.springframework.context.ApplicationListener<?> listener)
      Registers a listener and removes it when the related object became a PhantomReference.
      Parameters:
      object - the element publishing the dispose event which causes listener to be removed
      listener - the application lister to