T
- the configuration typepublic class YamlConfigurationFactory<T> extends Object implements FactoryBean<T>, MessageSourceAware, 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(MessageSource messageSource)
Set the message source.
|
void |
setPropertyAliases(Map<Class<?>,Map<String,String>> propertyAliases)
Set the property aliases.
|
void |
setResource(Resource resource)
Set the resource.
|
void |
setValidator(Validator validator)
Set the validator.
|
void |
setYaml(String yaml)
Set the YAML.
|
public YamlConfigurationFactory(Class<?> type)
type
- the root typepublic void setMessageSource(MessageSource messageSource)
setMessageSource
in interface MessageSourceAware
messageSource
- the message sourcepublic void setPropertyAliases(Map<Class<?>,Map<String,String>> propertyAliases)
propertyAliases
- the property aliasespublic void setYaml(String yaml)
yaml
- the YAMLpublic void setResource(Resource resource)
resource
- the resourcepublic void setValidator(Validator validator)
validator
- the validatorpublic void setExceptionIfInvalid(boolean exceptionIfInvalid)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public Class<?> getObjectType()
getObjectType
in interface FactoryBean<T>
public boolean isSingleton()
isSingleton
in interface FactoryBean<T>
Copyright © 2015 Pivotal Software, Inc.. All rights reserved.