public class AbstractHandler extends Object
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
log |
protected SimpleDateFormat |
longfmt |
protected 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 File |
getComplexDataFile(Obs obs)
Convenience method to create and return a file for the stored ComplexData.data Object
|
String |
getExtension(String filename)
Get the extension for a given filename.
|
Obs |
getObs(Obs obs,
String view) |
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 NumberFormat nf
protected SimpleDateFormat longfmt
public AbstractHandler()
public File getOutputFileToWrite(Obs obs) throws 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 itIOException
public String getExtension(String filename)
filename
- public Obs getObs(Obs obs, String view)
ComplexObsHandler.getObs(Obs, String)
public boolean purgeComplexData(Obs obs)
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.