public 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) |
void |
setPropertyAliases(Map<Class<?>,Map<String,String>> propertyAliases) |
void |
setResource(org.springframework.core.io.Resource resource) |
void |
setValidator(org.springframework.validation.Validator validator) |
void |
setYaml(String yaml) |
public YamlConfigurationFactory(Class<?> type)
type
- the root typepublic void setMessageSource(org.springframework.context.MessageSource messageSource)
setMessageSource
in interface org.springframework.context.MessageSourceAware
messageSource
- the messageSource to setpublic void setPropertyAliases(Map<Class<?>,Map<String,String>> propertyAliases)
propertyAliases
- the propertyAliases to setpublic void setYaml(String yaml)
yaml
- the yaml to setpublic void setResource(org.springframework.core.io.Resource resource)
resource
- the resource to setpublic void setValidator(org.springframework.validation.Validator validator)
validator
- the validator to setpublic void setExceptionIfInvalid(boolean exceptionIfInvalid)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public Class<?> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<T>
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<T>
Copyright © 2014 Pivotal Software, Inc.. All rights reserved.