org.springframework.core.io
Class ResourceEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.springframework.core.io.AbstractPathResolvingPropertyEditor
org.springframework.core.io.ResourceEditor
- All Implemented Interfaces:
- PropertyEditor
- public class ResourceEditor
- extends AbstractPathResolvingPropertyEditor
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.
- Since:
- 28.12.2003
- Author:
- Juergen Hoeller
- See Also:
AbstractPathResolvingPropertyEditor.PLACEHOLDER_PREFIX
,
AbstractPathResolvingPropertyEditor.PLACEHOLDER_SUFFIX
,
Resource
,
ResourceLoader
,
DefaultResourceLoader
,
System.getProperty(String)
Methods inherited from class java.beans.PropertyEditorSupport |
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setValue, supportsCustomEditor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceEditor
public ResourceEditor()
- Create a new ResourceEditor with a DefaultResourceLoader.
- See Also:
DefaultResourceLoader
ResourceEditor
public ResourceEditor(ResourceLoader resourceLoader)
- Create a new ResourceEditor with the given ResourceLoader.
- Parameters:
resourceLoader
- the ResourceLoader to use
setAsText
public void setAsText(String text)
Copyright (C) 2003-2004 The Spring Framework Project.