|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.obs.handler.AbstractHandler
public class AbstractHandler
Abstract handler for some convenience methods Files are stored in the location specified by the global property: "obs.complex_obs_dir"
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
log
|
protected java.text.SimpleDateFormat |
longfmt
|
protected java.text.NumberFormat |
nf
|
Constructor Summary | |
---|---|
AbstractHandler()
Constructor initializes formats for alternative file names to protect from unintentionally overwriting existing files. |
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log log
protected java.text.NumberFormat nf
protected java.text.SimpleDateFormat longfmt
Constructor Detail |
---|
public AbstractHandler()
Method Detail |
---|
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 it
java.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)
ComplexObsHandler.purgeComplexData(org.openmrs.Obs)
public static java.io.File getComplexDataFile(Obs obs)
obs
-
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |