org.openmrs.propertyeditor
Class WorkflowCollectionEditor

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

public class WorkflowCollectionEditor
extends java.beans.PropertyEditorSupport

Class to convert the "programid: workflowoneid workflow2id" strings to actual workflows on a program


Constructor Summary
WorkflowCollectionEditor()
           
WorkflowCollectionEditor(Program program)
           
 
Method Summary
 java.lang.String getAsText()
          Convert this program's workflows into "id: wkflowid wkflowid wkflowid"
 void setAsText(java.lang.String text)
          Takes a "program_id:list" where program_id is the id of the program that this collection is for (or not present, if it's a new program) and list is a space-separated list of concept ids.
 
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

WorkflowCollectionEditor

public WorkflowCollectionEditor()

WorkflowCollectionEditor

public WorkflowCollectionEditor(Program program)
Parameters:
program -
Method Detail

setAsText

public void setAsText(java.lang.String text)
               throws java.lang.IllegalArgumentException
Takes a "program_id:list" where program_id is the id of the program that this collection is for (or not present, if it's a new program) and list is a space-separated list of concept ids. This class is a bit of a hack, because I don't know a better way to do this. -DJ The purpose is to retire and un-retire workflows where possible rather than deleting and creating them.

Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class java.beans.PropertyEditorSupport
Throws:
java.lang.IllegalArgumentException

getAsText

public java.lang.String getAsText()
Convert this program's workflows into "id: wkflowid wkflowid wkflowid"

Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class java.beans.PropertyEditorSupport
See Also:
PropertyEditorSupport.getAsText()

OpenMRS-1.7.x

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