Class CompositeUtils
java.lang.Object
org.springframework.cloud.config.server.composite.CompositeUtils
- Author:
- Dylan Roberts
-
Method Summary
Modifier and TypeMethodDescriptiongetCompositeTypeList
(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.
-
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. SeegetCompositeTypeList(Environment)
- Parameters:
type
- type of a repositorybeanFactory
- 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 FactoryfactoryName
- name of the factory- Returns:
- generic type params of the factory
-