org.springframework.core.io
Class ResourceEditor

public class ResourceEditor
extends PropertyEditorSupport
Editor for Resource descriptors, to automatically convert String locations (e.g. "file:C:/myfile.txt" or "classpath:myfile.txt") to Resource properties instead of using a String location property.

The path may contain ${...} placeholders, to be resolved as system properties: e.g. ${user.dir}.

Delegates to a ResourceLoader, by default a DefaultResourceLoader.

Since28.12.2003
VersionNot specified.
AuthorJuergen Hoeller
Wiki javadoc Use textile entry format.
Add your comments here.
Constructor Summary
ResourceEditor()
Create a new ResourceEditor with a DefaultResourceLoader.
ResourceEditor( ResourceLoader resourceLoader )
Create a new ResourceEditor with the given ResourceLoader.
Method Summary
protected String resolvePath( String path )
Resolve the given path, replacing placeholders with corresponding system property values if necessary.
void setAsText( String text )
No description provided.
ResourceEditor
public ResourceEditor ( )
Create a new ResourceEditor with a DefaultResourceLoader.
Wiki javadoc Use textile entry format.
Add your comments here.
ResourceEditor
public ResourceEditor ( ResourceLoader resourceLoader )
Create a new ResourceEditor with the given ResourceLoader.
Parameters
TypeNameDescription
ResourceLoader resourceLoader the ResourceLoader to use
Wiki javadoc Use textile entry format.
Add your comments here.
resolvePath
protected String resolvePath ( String path )
Resolve the given path, replacing placeholders with corresponding system property values if necessary.
Parameters
TypeNameDescription
String path the original file path
Wiki javadoc Use textile entry format.
Add your comments here.
setAsText
public void setAsText ( String text )
No description provided.
Overrides method in PropertyEditorSupport
Parameters
TypeNameDescription
String text No description provided.
Returns void No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.