org.springframework.core.io
Class ResourceEditor

java.lang.Object
  extended byjava.beans.PropertyEditorSupport
      extended byorg.springframework.core.io.AbstractPathResolvingPropertyEditor
          extended byorg.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)

Field Summary
 
Fields inherited from class org.springframework.core.io.AbstractPathResolvingPropertyEditor
logger, PLACEHOLDER_PREFIX, PLACEHOLDER_SUFFIX
 
Constructor Summary
ResourceEditor()
          Create a new ResourceEditor with a DefaultResourceLoader.
ResourceEditor(ResourceLoader resourceLoader)
          Create a new ResourceEditor with the given ResourceLoader.
 
Method Summary
 void setAsText(String text)
           
 
Methods inherited from class org.springframework.core.io.AbstractPathResolvingPropertyEditor
resolvePath
 
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
 

Constructor Detail

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
Method Detail

setAsText

public void setAsText(String text)


Copyright (C) 2003-2004 The Spring Framework Project.