java.lang.Object
org.springframework.cloud.config.server.composite.CompositeUtils

public final class CompositeUtils extends Object
Author:
Dylan Roberts
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<String>
    getCompositeTypeList(org.springframework.core.env.Environment environment)
    Returns list of values of the `type` field from the `spring.cloud.config.server.composite` collection.
    static Type[]
    getEnvironmentRepositoryFactoryTypeParams(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, String factoryName)
    Given a Factory Name return the generic type parameters of the factory (The actual repository class, and its properties class).
    static String
    getFactoryName(String type, org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
    Given a type of EnvironmentRepository (git, svn, native, etc...) returns the name of the factory bean.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getCompositeTypeList

      public static List<String> getCompositeTypeList(org.springframework.core.env.Environment environment)
      Returns list of values of the `type` field from the `spring.cloud.config.server.composite` collection.
      Parameters:
      environment - Spring Environment
      Returns:
      list of matching types
    • getFactoryName

      public static String getFactoryName(String type, org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
      Given a type of EnvironmentRepository (git, svn, native, etc...) returns the name of the factory bean. See getCompositeTypeList(Environment)
      Parameters:
      type - type of a repository
      beanFactory - Spring Bean Factory
      Returns:
      name of the factory bean
    • getEnvironmentRepositoryFactoryTypeParams

      public static Type[] getEnvironmentRepositoryFactoryTypeParams(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, String factoryName)
      Given a Factory Name return the generic type parameters of the factory (The actual repository class, and its properties class).
      Parameters:
      beanFactory - Spring Bean Factory
      factoryName - name of the factory
      Returns:
      generic type params of the factory