org.springframework.beans.propertyeditors
Class PropertiesEditor

java.lang.Object
  extended byjava.beans.PropertyEditorSupport
      extended byorg.springframework.beans.propertyeditors.PropertiesEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class PropertiesEditor
extends java.beans.PropertyEditorSupport

Editor for java.util.Properties objects. Handles conversion from String to Properties object. Also handles Map to Properties conversion, for populating a Properties object via XML "map" entries.

This editor must be registered before it will be available. Standard editors in this package are automatically registered by BeanWrapperImpl.

The required format is defined in java.util.Properties documentation. Each property must be on a new line.

Author:
Rod Johnson, Juergen Hoeller
See Also:
BeanWrapperImpl, Properties.load(java.io.InputStream)

Field Summary
static java.lang.String COMMENT_MARKERS
          Any of these characters, if they're first after whitespace or first on a line, mean that the line is a comment and should be ignored.
 
Constructor Summary
PropertiesEditor()
           
 
Method Summary
 void setAsText(java.lang.String text)
          Convert String into Properties.
 void setValue(java.lang.Object value)
          Convert Map into Properties.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMENT_MARKERS

public static final java.lang.String COMMENT_MARKERS
Any of these characters, if they're first after whitespace or first on a line, mean that the line is a comment and should be ignored.

See Also:
Constant Field Values
Constructor Detail

PropertiesEditor

public PropertiesEditor()
Method Detail

setAsText

public void setAsText(java.lang.String text)
               throws java.lang.IllegalArgumentException
Convert String into Properties.

Throws:
java.lang.IllegalArgumentException

setValue

public void setValue(java.lang.Object value)
Convert Map into Properties.



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