public class DefaultModuleOptionsMetadataResolver extends java.lang.Object implements ModuleOptionsMetadataResolver, org.springframework.context.ResourceLoaderAware
ModuleOptionsMetadataResolver
that deals with simple modules and reads the
companion .properties
file sitting next to the module definition.
The following strategies will be applied in turn:
<modulename>.properties
next to the module xml definition filePojoModuleOptionsMetadata
backed by that POJO class nameSimpleModuleOptionsMetadata
backed by keys of the form options.<name>.description
.
Additionally, one can provide options.<name>.default
and options.<name>.type
properties.PassthruModuleOptionsMetadata
.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OPTIONS_CLASS
Name of the property containing a POJO fully qualified classname, which will be used to create a
PojoModuleOptionsMetadata . |
Constructor and Description |
---|
DefaultModuleOptionsMetadataResolver()
Construct a new
DefaultModuleOptionsMetadataResolver , using a
GenericConversionService which is augmented with a StringToEnumIgnoringCaseConverterFactory . |
DefaultModuleOptionsMetadataResolver(org.springframework.core.convert.ConversionService conversionService)
Construct a new
DefaultModuleOptionsMetadataResolver that will use the provided conversion service when
converting from String to rich object (supported for PojoModuleOptionsMetadata only). |
Modifier and Type | Method and Description |
---|---|
ModuleOptionsMetadata |
resolve(ModuleDefinition definition)
Return metadata about a module, as identified by the given moduleDefinition.
|
void |
setCompositeResolver(ModuleOptionsMetadataResolver compositeResolver) |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) |
public static final java.lang.String OPTIONS_CLASS
PojoModuleOptionsMetadata
.public DefaultModuleOptionsMetadataResolver(org.springframework.core.convert.ConversionService conversionService)
DefaultModuleOptionsMetadataResolver
that will use the provided conversion service when
converting from String to rich object (supported for PojoModuleOptionsMetadata
only).conversionService
- Must not be nullpublic DefaultModuleOptionsMetadataResolver()
DefaultModuleOptionsMetadataResolver
, using a
GenericConversionService
which is augmented with a StringToEnumIgnoringCaseConverterFactory
.
See also PojoModuleOptionsMetadata
.public void setCompositeResolver(ModuleOptionsMetadataResolver compositeResolver)
public ModuleOptionsMetadata resolve(ModuleDefinition definition)
ModuleOptionsMetadataResolver
resolve
in interface ModuleOptionsMetadataResolver
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader
in interface org.springframework.context.ResourceLoaderAware