Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » core » io » support » [javadoc | source]
org.springframework.core.io.support
public class: ResourceArrayPropertyEditor [javadoc | source]
java.lang.Object
   java.beans.PropertyEditorSupport
      org.springframework.core.io.support.ResourceArrayPropertyEditor

All Implemented Interfaces:
    PropertyEditor

Editor for org.springframework.core.io.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.

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

Delegates to a ResourcePatternResolver , by default using a PathMatchingResourcePatternResolver .

Constructor:
 public ResourceArrayPropertyEditor() 
 public ResourceArrayPropertyEditor(ResourcePatternResolver resourcePatternResolver) 
    Create a new ResourceArrayPropertyEditor with the given ResourcePatternResolver.
    Parameters:
    resourcePatternResolver - the ResourcePatternResolver to use
Method from org.springframework.core.io.support.ResourceArrayPropertyEditor Summary:
resolvePath,   setAsText,   setValue
Methods from java.beans.PropertyEditorSupport:
addPropertyChangeListener,   firePropertyChange,   getAsText,   getCustomEditor,   getJavaInitializationString,   getSource,   getTags,   getValue,   isPaintable,   paintValue,   removePropertyChangeListener,   setAsText,   setSource,   setValue,   supportsCustomEditor
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.core.io.support.ResourceArrayPropertyEditor Detail:
 protected String resolvePath(String path) 
    Resolve the given path, replacing placeholders with corresponding system property values if necessary.
 public  void setAsText(String text) 
    Treat the given text as location pattern and convert it to a Resource array.
 public  void setValue(Object value) throws IllegalArgumentException 
    Treat the given value as collection or array and convert it to a Resource array. Considers String elements as location patterns, and takes Resource elements as-is.