JBoss Common Beans 1.1.0.Final-redhat-1

org.jboss.common.beans.property
Class XMLEditorSupport<T>

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.jboss.common.beans.property.PropertyEditorSupport<T>
          extended by org.jboss.common.beans.property.XMLEditorSupport<T>
All Implemented Interfaces:
PropertyEditor
Direct Known Subclasses:
DocumentEditor, ElementEditor

public abstract class XMLEditorSupport<T>
extends PropertyEditorSupport<T>

A property editor for Document.

Author:
Elias Ross, baranowb

Constructor Summary
XMLEditorSupport(Class<T> type)
           
 
Method Summary
protected  Document getAsDocument(String text)
           
 String getAsText()
          Returns the property as a String.
 
Methods inherited from class org.jboss.common.beans.property.PropertyEditorSupport
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getType, getValue, removePropertyChangeListener, removePropertyChangeListener, setAsText, setValue
 
Methods inherited from class java.beans.PropertyEditorSupport
firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, setSource, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLEditorSupport

public XMLEditorSupport(Class<T> type)
Parameters:
type -
Method Detail

getAsText

public String getAsText()
Returns the property as a String.

Specified by:
getAsText in interface PropertyEditor
Overrides:
getAsText in class PropertyEditorSupport<T>
Returns:
The property value as a human editable string.

Returns null if the value can't be expressed as an editable string.

If a non-null value is returned, then the PropertyEditor should be prepared to parse that string back in setAsText().


getAsDocument

protected Document getAsDocument(String text)

JBoss Common Beans 1.1.0.Final-redhat-1

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.