org.springframework.core.io.Resource arrays, to
automatically convert String location patterns
(e.g. "file:C:/my*.txt" or "classpath*:myfile.txt")
to Resource array properties. Can also translate a collection
or array of location patterns into a merged Resource array.
A path may contain ${...} placeholders, to be
resolved as org. properties:
e.g. ${user.dir}. Unresolvable placeholders are ignored by default.
Delegates to a ResourcePatternResolver,
by default using a PathMatchingResourcePatternResolver.
org.springframework.core.io.Resource , ResourcePatternResolver, PathMatchingResourcePatternResolver
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private static final Log | |
| private PropertyResolver | |
| private final ResourcePatternResolver |
| Access | Constructor and Description |
|---|---|
| public | ResourceArrayPropertyEditor()
Create a new ResourceArrayPropertyEditor with a default
|
| public | ResourceArrayPropertyEditor(ResourcePatternResolver
the ResourcePatternResolver to use resourcePatternResolver, PropertyResolver the PropertyResolver to use propertyResolver)Create a new ResourceArrayPropertyEditor with the given |
| public | ResourceArrayPropertyEditor(ResourcePatternResolver
the ResourcePatternResolver to use resourcePatternResolver, PropertyResolver the PropertyResolver to use propertyResolver, boolean whether to ignore unresolvable placeholders
if no corresponding system property could be found ignoreUnresolvablePlaceholders)Create a new ResourceArrayPropertyEditor with the given |
| Modifier and Type | Method and Description |
|---|---|
| private Resource[] | |
| protected String | Returns: the resolved file paththe original file path path)Resolve the given path, replacing placeholders with corresponding system property values if necessary. |
| public void | setAsText(String
The string to be parsed. text)Overrides java. Implements java. Treat the given text as a location pattern or comma delimited location patterns and convert it to a Resource array. |
| public void | setValue(Object
The new target object to be edited. Note that this
object should not be modified by the PropertyEditor, rather
the PropertyEditor should create a new object to hold any
modified value. value)Overrides java. Implements java. Treat the given value as a collection or array and convert it to a Resource array. |
| ignoreUnresolvablePlaceholders | back to summary |
|---|---|
| private final boolean ignoreUnresolvablePlaceholders | |
| logger | back to summary |
|---|---|
| private static final Log logger | |
| propertyResolver | back to summary |
|---|---|
| private PropertyResolver propertyResolver
| |
| resourcePatternResolver | back to summary |
|---|---|
| private final ResourcePatternResolver resourcePatternResolver | |
| ResourceArrayPropertyEditor | back to summary |
|---|---|
| public ResourceArrayPropertyEditor() Create a new ResourceArrayPropertyEditor with a default
| |
| ResourceArrayPropertyEditor | back to summary |
|---|---|
| public ResourceArrayPropertyEditor(ResourcePatternResolver resourcePatternResolver, PropertyResolver propertyResolver) Create a new ResourceArrayPropertyEditor with the given
| |
| ResourceArrayPropertyEditor | back to summary |
|---|---|
| public ResourceArrayPropertyEditor(ResourcePatternResolver resourcePatternResolver, PropertyResolver propertyResolver, boolean ignoreUnresolvablePlaceholders) Create a new ResourceArrayPropertyEditor with the given
| |
| getResources | back to summary |
|---|---|
| private Resource[] getResources(String locationPattern) | |
| resolvePath | back to summary |
|---|---|
| protected String resolvePath(String path) Resolve the given path, replacing placeholders with corresponding system property values if necessary.
| |
| setAsText | back to summary |
|---|---|
| public void setAsText(String text) Overrides java. Implements java. Treat the given text as a location pattern or comma delimited location patterns and convert it to a Resource array.
| |
| setValue | back to summary |
|---|---|
| public void setValue(Object value) throws IllegalArgumentException Overrides java. Implements java. Treat the given value as a collection or array and convert it to a Resource array. Considers String elements as location patterns and takes Resource elements as-is.
| |