public class DefaultBeanConfigurationRequest extends Object implements BeanConfigurationRequest
Constructor and Description |
---|
DefaultBeanConfigurationRequest() |
Modifier and Type | Method and Description |
---|---|
Object |
getBean()
Gets the bean to configure.
|
ClassLoader |
getClassLoader()
Gets the class loader from which to load any types referenced by the configuration.
|
Object |
getConfiguration()
Gets the configuration to unmarshal into the bean.
|
String |
getConfigurationElement()
Returns configuration element name or
null . |
BeanConfigurationPathTranslator |
getPathTranslator()
Gets the optional path translator for configuration values unmarshalled to files.
|
BeanConfigurationValuePreprocessor |
getValuePreprocessor()
Gets the optional preprocessor for configuration values.
|
DefaultBeanConfigurationRequest |
setBean(Object bean)
Sets the bean to configure.
|
DefaultBeanConfigurationRequest |
setClassLoader(ClassLoader classLoader)
Sets the class loader from which to load any types referenced by the configuration.
|
DefaultBeanConfigurationRequest |
setConfiguration(Model model,
String pluginGroupId,
String pluginArtifactId,
String pluginExecutionId)
Sets the configuration to the configuration taken from the specified build plugin in the POM.
|
DefaultBeanConfigurationRequest |
setConfiguration(Object configuration)
Sets the configuration to unmarshal into the bean.
|
DefaultBeanConfigurationRequest |
setConfiguration(Object configuration,
String element)
Sets the configuration to unmarshal into the bean.
|
DefaultBeanConfigurationRequest |
setPathTranslator(BeanConfigurationPathTranslator pathTranslator)
Sets the optional path translator for configuration values unmarshalled to files.
|
DefaultBeanConfigurationRequest |
setValuePreprocessor(BeanConfigurationValuePreprocessor valuePreprocessor)
Sets the optional preprocessor for configuration values.
|
public Object getBean()
BeanConfigurationRequest
getBean
in interface BeanConfigurationRequest
null
if none.public DefaultBeanConfigurationRequest setBean(Object bean)
BeanConfigurationRequest
setBean
in interface BeanConfigurationRequest
bean
- The bean to configure, may be null
.null
.public Object getConfiguration()
BeanConfigurationRequest
getConfiguration
in interface BeanConfigurationRequest
null
if none.public String getConfigurationElement()
BeanConfigurationRequest
null
.getConfigurationElement
in interface BeanConfigurationRequest
null
BeanConfigurationRequest.setConfiguration(Object, String)
public DefaultBeanConfigurationRequest setConfiguration(Object configuration)
BeanConfigurationRequest
ConfigurationContainer.getConfiguration()
or a similar source.
Fully equivalent to setConfiguration(configuration, null)
.setConfiguration
in interface BeanConfigurationRequest
configuration
- The configuration to unmarshal, may be null
.null
.public DefaultBeanConfigurationRequest setConfiguration(Object configuration, String element)
BeanConfigurationRequest
ConfigurationContainer.getConfiguration()
or a similar source.
If element
is not null
, child configuration element with the specified name will
be unmarshaled.setConfiguration
in interface BeanConfigurationRequest
configuration
- The configuration to unmarshal, may be null
.element
- Configuration element name to unmarshal or null
to unmarshal entire configuration.null
.public DefaultBeanConfigurationRequest setConfiguration(Model model, String pluginGroupId, String pluginArtifactId, String pluginExecutionId)
model
- The POM to extract the plugin configuration from, may be null
.pluginGroupId
- The group id of the plugin whose configuration should be used, must not be null
or
empty.pluginArtifactId
- The artifact id of the plugin whose configuration should be used, must not be
null
or empty.pluginExecutionId
- The id of a plugin execution whose configuration should be used, may be null
or
empty to use the general plugin configuration.null
.public ClassLoader getClassLoader()
BeanConfigurationRequest
getClassLoader
in interface BeanConfigurationRequest
null
if unset.public DefaultBeanConfigurationRequest setClassLoader(ClassLoader classLoader)
BeanConfigurationRequest
setClassLoader
in interface BeanConfigurationRequest
classLoader
- The class loader to load referenced types from, may be null
.null
.public BeanConfigurationValuePreprocessor getValuePreprocessor()
BeanConfigurationRequest
getValuePreprocessor
in interface BeanConfigurationRequest
null
if none.public DefaultBeanConfigurationRequest setValuePreprocessor(BeanConfigurationValuePreprocessor valuePreprocessor)
BeanConfigurationRequest
setValuePreprocessor
in interface BeanConfigurationRequest
valuePreprocessor
- The preprocessor for configuration values, may be null
if unneeded.null
.public BeanConfigurationPathTranslator getPathTranslator()
BeanConfigurationRequest
getPathTranslator
in interface BeanConfigurationRequest
null
if none.public DefaultBeanConfigurationRequest setPathTranslator(BeanConfigurationPathTranslator pathTranslator)
BeanConfigurationRequest
setPathTranslator
in interface BeanConfigurationRequest
pathTranslator
- The path translator for files, may be null
if unneeded.null
.Copyright © 2001–2021 The Apache Software Foundation. All rights reserved.