org.apache.xbean.server.propertyeditor
Class URIEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.apache.xbean.server.propertyeditor.URIEditor
All Implemented Interfaces:
PropertyEditor

public class URIEditor
extends PropertyEditorSupport

URIEditor is a java beans property editor that can convert an URI to and from a String.

Since:
2.0
Author:
Dain Sundstrom

Constructor Summary
URIEditor()
           
 
Method Summary
 String getAsText()
          Converts the stored URI value into a String.
 void setAsText(String value)
          Converts the specified string value into an URI and stores the value in this instance.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URIEditor

public URIEditor()
Method Detail

setAsText

public void setAsText(String value)
               throws IllegalArgumentException
Converts the specified string value into an URI and stores the value in this instance.

Specified by:
setAsText in interface PropertyEditor
Overrides:
setAsText in class PropertyEditorSupport
Parameters:
value - the string to convert into an URI
Throws:
IllegalArgumentException - if the specified string value is not a valid URI

getAsText

public String getAsText()
Converts the stored URI value into a String.

Specified by:
getAsText in interface PropertyEditor
Overrides:
getAsText in class PropertyEditorSupport
Returns:
the string form of the current URI value
Throws:
NullPointerException - if the current URI is null


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.