org.openmrs.obs.handler
Class TextHandler

java.lang.Object
  extended by org.openmrs.obs.handler.AbstractHandler
      extended by org.openmrs.obs.handler.TextHandler
All Implemented Interfaces:
ComplexObsHandler

public class TextHandler
extends AbstractHandler
implements ComplexObsHandler

Handler for storing files for complex obs to the file system. Files are stored in the location specified by the global property: "obs.complex_obs_dir"

Since:
1.5

Field Summary
static org.apache.commons.logging.Log log
           
 
Fields inherited from class org.openmrs.obs.handler.AbstractHandler
longfmt, nf
 
Constructor Summary
TextHandler()
          Constructor initializes formats for alternative file names to protect from unintentionally overwriting existing files.
 
Method Summary
 Obs getObs(Obs obs, java.lang.String view)
          Currently supports all views
 Obs saveObs(Obs obs)
          TODO should this support a StringReader too?
 
Methods inherited from class org.openmrs.obs.handler.AbstractHandler
getComplexDataFile, getExtension, getOutputFileToWrite, purgeComplexData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openmrs.obs.ComplexObsHandler
purgeComplexData
 

Field Detail

log

public static final org.apache.commons.logging.Log log
Constructor Detail

TextHandler

public TextHandler()
Constructor initializes formats for alternative file names to protect from unintentionally overwriting existing files.

Method Detail

getObs

public Obs getObs(Obs obs,
                  java.lang.String view)
Currently supports all views

Specified by:
getObs in interface ComplexObsHandler
Overrides:
getObs in class AbstractHandler
Parameters:
obs - an obs without complex data filled in
view - nullable view type. This is defined by the ui and view/handler
Returns:
the obs with complex data filled in
See Also:
ComplexObsHandler.getObs(org.openmrs.Obs, java.lang.String)

saveObs

public Obs saveObs(Obs obs)
            throws APIException
TODO should this support a StringReader too?

Specified by:
saveObs in interface ComplexObsHandler
Returns:
the Obs with the ComplexData nullified
Throws:
APIException
See Also:
ComplexObsHandler.saveObs(org.openmrs.Obs)

OpenMRS-1.7.x

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