org.openmrs.propertyeditor
Class DrugEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.openmrs.propertyeditor.DrugEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class DrugEditor
extends java.beans.PropertyEditorSupport

Behaviors: Group vetted on 22/Aug/2008 at 2:22pm


Constructor Summary
DrugEditor()
           
 
Method Summary
 java.lang.String getAsText()
          Gets the drug identifier associated with this property editor.
 void setAsText(java.lang.String text)
          Sets the value of the property editor given the drug identifier.
 
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

DrugEditor

public DrugEditor()
Method Detail

setAsText

public void setAsText(java.lang.String text)
               throws java.lang.IllegalArgumentException
Sets the value of the property editor given the drug identifier.

Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class java.beans.PropertyEditorSupport
Throws:
java.lang.IllegalArgumentException
See Also:
PropertyEditorSupport.setAsText(java.lang.String)
Expected behavior:
set value to the drug with the specified identifier, set value to null if given empty string, set value to null if given null value, fail if drug does not exist with non-empty identifier

getAsText

public java.lang.String getAsText()
Gets the drug identifier associated with this property editor.

Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class java.beans.PropertyEditorSupport
See Also:
PropertyEditorSupport.getAsText()
Expected behavior:
return drug identifier as string when editor has a value, return empty string when editor has a null value

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change