org.springframework.context.support
Class ContextResourceEditor

java.lang.Object
  extended byjava.beans.PropertyEditorSupport
      extended byorg.springframework.core.io.ResourceEditor
          extended byorg.springframework.context.support.ContextResourceEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class ContextResourceEditor
extends ResourceEditor

ApplicationContext-aware PropertyEditor for Resource descriptors.

Delegates to the ApplicationContext's getResource method for resolving resource locations to Resource descriptors. Resource loading behavior is specific to the context implementation.

Since:
28.12.2003
Author:
Juergen Hoeller
See Also:
ResourceLoader.getResource(java.lang.String)

Field Summary
 
Fields inherited from class org.springframework.core.io.ResourceEditor
logger, PLACEHOLDER_PREFIX, PLACEHOLDER_SUFFIX
 
Constructor Summary
ContextResourceEditor(ApplicationContext applicationContext)
          Create a new ContextResourceEditor for the given context.
 
Method Summary
 void setAsText(java.lang.String text)
           
 
Methods inherited from class org.springframework.core.io.ResourceEditor
getResourceLoader, 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

ContextResourceEditor

public ContextResourceEditor(ApplicationContext applicationContext)
Create a new ContextResourceEditor for the given context.

Parameters:
applicationContext - context to resolve resources with
Method Detail

setAsText

public void setAsText(java.lang.String text)
               throws java.lang.IllegalArgumentException
Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class ResourceEditor
Throws:
java.lang.IllegalArgumentException


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