Class SpringBeanReferenceResolver

  • All Implemented Interfaces:
    com.consol.citrus.spi.ReferenceRegistry, com.consol.citrus.spi.ReferenceResolver, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class SpringBeanReferenceResolver
    extends Object
    implements com.consol.citrus.spi.ReferenceResolver, org.springframework.context.ApplicationContextAware
    Spring bean reference resolver operates on given application context to resolve bean references.
    Since:
    2.5
    Author:
    Christoph Deppisch
    • Constructor Detail

      • SpringBeanReferenceResolver

        public SpringBeanReferenceResolver()
        Default constructor.
      • SpringBeanReferenceResolver

        public SpringBeanReferenceResolver​(org.springframework.context.ApplicationContext applicationContext)
        Constructor initializes with given application context.
        Parameters:
        applicationContext -
    • Method Detail

      • resolve

        public <T> T resolve​(Class<T> requiredType)
        Specified by:
        resolve in interface com.consol.citrus.spi.ReferenceResolver
      • resolve

        public <T> T resolve​(String name,
                             Class<T> type)
        Specified by:
        resolve in interface com.consol.citrus.spi.ReferenceResolver
      • resolve

        public Object resolve​(String name)
        Specified by:
        resolve in interface com.consol.citrus.spi.ReferenceResolver
      • resolveAll

        public <T> Map<String,​T> resolveAll​(Class<T> requiredType)
        Specified by:
        resolveAll in interface com.consol.citrus.spi.ReferenceResolver
      • isResolvable

        public boolean isResolvable​(String name)
        Specified by:
        isResolvable in interface com.consol.citrus.spi.ReferenceResolver
      • isResolvable

        public boolean isResolvable​(Class<?> type)
        Specified by:
        isResolvable in interface com.consol.citrus.spi.ReferenceResolver
      • isResolvable

        public boolean isResolvable​(String name,
                                    Class<?> type)
        Specified by:
        isResolvable in interface com.consol.citrus.spi.ReferenceResolver
      • withFallback

        public SpringBeanReferenceResolver withFallback​(com.consol.citrus.spi.ReferenceResolver fallback)
        Specifies the fallback.
        Parameters:
        fallback -
      • bind

        public void bind​(String name,
                         Object value)
        Specified by:
        bind in interface com.consol.citrus.spi.ReferenceRegistry
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException
      • setFallback

        public void setFallback​(com.consol.citrus.spi.ReferenceResolver fallback)
        Specifies the fallback.
        Parameters:
        fallback -
      • getApplicationContext

        public org.springframework.context.ApplicationContext getApplicationContext()
        Obtains the applicationContext.
        Returns: