T - the configuration typepublic class YamlConfigurationFactory<T> extends Object implements org.springframework.beans.factory.FactoryBean<T>, org.springframework.context.MessageSourceAware, org.springframework.beans.factory.InitializingBean
Validator over it.| Constructor and Description |
|---|
YamlConfigurationFactory(Class<?> type)
Sets a validation constructor which will be applied to the YAML doc to see whether
it matches the expected JavaBean.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
T |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setExceptionIfInvalid(boolean exceptionIfInvalid) |
void |
setMessageSource(org.springframework.context.MessageSource messageSource)
Set the message source.
|
void |
setPropertyAliases(Map<Class<?>,Map<String,String>> propertyAliases)
Set the property aliases.
|
void |
setResource(org.springframework.core.io.Resource resource)
Set the resource.
|
void |
setValidator(org.springframework.validation.Validator validator)
Set the validator.
|
void |
setYaml(String yaml)
Set the YAML.
|
public YamlConfigurationFactory(Class<?> type)
type - the root typepublic void setMessageSource(org.springframework.context.MessageSource messageSource)
setMessageSource in interface org.springframework.context.MessageSourceAwaremessageSource - the message sourcepublic void setPropertyAliases(Map<Class<?>,Map<String,String>> propertyAliases)
propertyAliases - the property aliasespublic void setYaml(String yaml)
yaml - the YAMLpublic void setResource(org.springframework.core.io.Resource resource)
resource - the resourcepublic void setValidator(org.springframework.validation.Validator validator)
validator - the validatorpublic void setExceptionIfInvalid(boolean exceptionIfInvalid)
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<T>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<T>Copyright © 2016 Pivotal Software, Inc.. All rights reserved.