|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.beans.PropertyEditorSupport
org.springframework.core.io.support.ResourceArrayPropertyEditor
public class ResourceArrayPropertyEditor
Editor for 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 Environment properties:
e.g. ${user.dir}. Unresolvable placeholders are ignored by default.
Delegates to a ResourcePatternResolver,
by default using a PathMatchingResourcePatternResolver.
Resource,
ResourcePatternResolver,
PathMatchingResourcePatternResolver| Method Summary | |
|---|---|
protected String |
resolvePath(String path)
Resolve the given path, replacing placeholders with corresponding system property values if necessary. |
void |
setAsText(String text)
Treat the given text as a location pattern and convert it to a Resource array. |
void |
setValue(Object value)
Treat the given value as a collection or array and convert it to a Resource array. |
| Methods inherited from class java.beans.PropertyEditorSupport |
|---|
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceArrayPropertyEditor()
PathMatchingResourcePatternResolver and StandardEnvironment.
PathMatchingResourcePatternResolver,
Environment@Deprecated public ResourceArrayPropertyEditor(ResourcePatternResolver resourcePatternResolver)
ResourceArrayPropertyEditor(ResourcePatternResolver, PropertyResolver)
ResourcePatternResolver
and a StandardEnvironment.
resourcePatternResolver - the ResourcePatternResolver to use
public ResourceArrayPropertyEditor(ResourcePatternResolver resourcePatternResolver,
PropertyResolver propertyResolver)
ResourcePatternResolver
and PropertyResolver (typically an Environment).
resourcePatternResolver - the ResourcePatternResolver to usepropertyResolver - the PropertyResolver to use
@Deprecated
public ResourceArrayPropertyEditor(ResourcePatternResolver resourcePatternResolver,
boolean ignoreUnresolvablePlaceholders)
ResourceArrayPropertyEditor(ResourcePatternResolver, PropertyResolver, boolean)
ResourcePatternResolver
and a StandardEnvironment.
resourcePatternResolver - the ResourcePatternResolver to useignoreUnresolvablePlaceholders - whether to ignore unresolvable placeholders
if no corresponding system property could be found
public ResourceArrayPropertyEditor(ResourcePatternResolver resourcePatternResolver,
PropertyResolver propertyResolver,
boolean ignoreUnresolvablePlaceholders)
ResourcePatternResolver
and PropertyResolver (typically an Environment).
resourcePatternResolver - the ResourcePatternResolver to usepropertyResolver - the PropertyResolver to useignoreUnresolvablePlaceholders - whether to ignore unresolvable placeholders
if no corresponding system property could be found| Method Detail |
|---|
public void setAsText(String text)
setAsText in interface PropertyEditorsetAsText in class PropertyEditorSupport
public void setValue(Object value)
throws IllegalArgumentException
setValue in interface PropertyEditorsetValue in class PropertyEditorSupportIllegalArgumentExceptionprotected String resolvePath(String path)
path - the original file path
PropertyResolver.resolvePlaceholders(java.lang.String),
PropertyResolver.resolveRequiredPlaceholders(String)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||