public class AbstractHandler
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
log |
protected java.text.SimpleDateFormat |
longfmt |
protected java.text.NumberFormat |
nf |
Constructor and Description |
---|
AbstractHandler()
Constructor initializes formats for alternative file names to protect from unintentionally
overwriting existing files.
|
Modifier and Type | Method and Description |
---|---|
static java.io.File |
getComplexDataFile(Obs obs)
Convenience method to create and return a file for the stored ComplexData.data Object
|
java.lang.String |
getExtension(java.lang.String filename)
Get the extension for a given filename.
|
Obs |
getObs(Obs obs,
java.lang.String view) |
java.io.File |
getOutputFileToWrite(Obs obs)
Returns a
File for the given obs complex data to be written to. |
boolean |
purgeComplexData(Obs obs) |
public static final org.apache.commons.logging.Log log
protected java.text.NumberFormat nf
protected java.text.SimpleDateFormat longfmt
public AbstractHandler()
public java.io.File getOutputFileToWrite(Obs obs) throws java.io.IOException
File
for the given obs complex data to be written to. The output file
location is determined off of the OpenmrsConstants.GLOBAL_PROPERTY_COMPLEX_OBS_DIR
and the file name is determined off the current obs.getComplexData().getTitle().obs
- the Obs with a non-null complex data on itjava.io.IOException
public java.lang.String getExtension(java.lang.String filename)
filename
- public Obs getObs(Obs obs, java.lang.String view)
ComplexObsHandler.getObs(Obs, String)
public boolean purgeComplexData(Obs obs)
public static java.io.File getComplexDataFile(Obs obs)
obs
- Copyright © 2018 OpenMRS Inc.. All Rights Reserved.