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. |
| 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) |
void |
setShouldCreateModuleClassLoader(boolean shouldCreateModuleClassLoader)
Set to true to create a new classloader (ParentLastURLClassLoader) when loading
the module options metadata classes.
|
public static final java.lang.String OPTIONS_CLASS
PojoModuleOptionsMetadata.public DefaultModuleOptionsMetadataResolver()
DefaultModuleOptionsMetadataResolver, using a
GenericConversionService which is augmented with a StringToEnumIgnoringCaseConverterFactory.
See also PojoModuleOptionsMetadata.public void setCompositeResolver(ModuleOptionsMetadataResolver compositeResolver)
public void setShouldCreateModuleClassLoader(boolean shouldCreateModuleClassLoader)
shouldCreateModuleClassLoader - public ModuleOptionsMetadata resolve(ModuleDefinition definition)
ModuleOptionsMetadataResolverresolve in interface ModuleOptionsMetadataResolverpublic void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader in interface org.springframework.context.ResourceLoaderAware