org.springframework.core.io
Class AbstractPathResolvingPropertyEditor

java.lang.Object
  extended byjava.beans.PropertyEditorSupport
      extended byorg.springframework.core.io.AbstractPathResolvingPropertyEditor
All Implemented Interfaces:
PropertyEditor
Direct Known Subclasses:
ResourceArrayPropertyEditor, ResourceEditor

public class AbstractPathResolvingPropertyEditor
extends PropertyEditorSupport

Abstract base class for PropertyEditors that need to resolve placeholders in paths.

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

Since:
1.1.2
Author:
Juergen Hoeller
See Also:
PLACEHOLDER_PREFIX, PLACEHOLDER_SUFFIX, System.getProperty(String)

Field Summary
protected static Log logger
           
static String PLACEHOLDER_PREFIX
           
static String PLACEHOLDER_SUFFIX
           
 
Constructor Summary
AbstractPathResolvingPropertyEditor()
           
 
Method Summary
protected  String resolvePath(String path)
          Resolve the given path, replacing ${...} placeholders with corresponding system property values if necessary.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLACEHOLDER_PREFIX

public static final String PLACEHOLDER_PREFIX
See Also:
Constant Field Values

PLACEHOLDER_SUFFIX

public static final String PLACEHOLDER_SUFFIX
See Also:
Constant Field Values

logger

protected static final Log logger
Constructor Detail

AbstractPathResolvingPropertyEditor

public AbstractPathResolvingPropertyEditor()
Method Detail

resolvePath

protected String resolvePath(String path)
Resolve the given path, replacing ${...} placeholders with corresponding system property values if necessary.

Parameters:
path - the original file path
Returns:
the resolved file path
See Also:
PLACEHOLDER_PREFIX, PLACEHOLDER_SUFFIX


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