org.openmrs.api
Interface ReportService

All Known Implementing Classes:
ReportServiceImpl

@Transactional
public interface ReportService


Method Summary
 java.lang.String applyReportXmlMacros(java.lang.String input)
          Applies the report xml macros to the input, and returns it.
 void createReportSchemaXml(ReportSchemaXml reportSchemaXml)
          Create a new ReportSchemaXml object in the database.
 void deleteReportSchema(ReportSchema reportSchema)
          Auto generated method comment
 void deleteReportSchemaXml(ReportSchemaXml reportSchemaXml)
          Delete the given ReportSchemaXml class from the db
 ReportData evaluate(ReportSchema reportSchema, Cohort inputCohort, EvaluationContext context)
          Auto generated method comment
 java.util.Map<java.lang.Class<? extends ReportRenderer>,ReportRenderer> getRenderers()
          Gets the renderers map registered to this report service
 java.util.List<RenderingMode> getRenderingModes(ReportSchema schema)
           
 ReportRenderer getReportRenderer(java.lang.Class<? extends ReportRenderer> clazz)
          Auto generated method comment
 ReportRenderer getReportRenderer(java.lang.String className)
          Get the report renderer
 java.util.Collection<ReportRenderer> getReportRenderers()
           
 ReportSchema getReportSchema(java.lang.Integer reportSchemaId)
          Auto generated method comment
 ReportSchema getReportSchema(ReportSchemaXml reportSchemaXml)
          Returns a ReportSchema object from a ReportSchemaXml definition De-serialized the xml definition, applies macro definitions, and returns an expanded report schema object
 java.util.List<ReportSchema> getReportSchemas()
          Auto generated method comment
 ReportSchemaXml getReportSchemaXml(java.lang.Integer reportSchemaXmlId)
          Get the xmlified ReportSchema object that was saved previously
 java.util.List<ReportSchemaXml> getReportSchemaXmls()
          Get all saved ReportSchemaXml objects in the db
 java.util.Properties getReportXmlMacros()
          Gets the macros that will be used when deserializing ReportSchemaXML
 void registerRenderer(java.lang.Class<? extends ReportRenderer> rendererClass, ReportRenderer renderer)
          Registers the given renderer with the service
 void registerRenderer(java.lang.String rendererClass)
          Convenience method for registerRenderer(Class, ReportRenderer)
 void removeRenderer(java.lang.Class<? extends ReportRenderer> rendererClass)
          Remove the renderer associated with rendererClass from the list of available renderers
 void saveReportSchema(ReportSchema reportSchema)
          Auto generated method comment
 void saveReportXmlMacros(java.util.Properties macros)
          Saves the macros that will be used when deserializing ReportSchemaXML
 void setRenderers(java.util.Map<java.lang.Class<? extends ReportRenderer>,ReportRenderer> renderers)
          Add the given map to this service's renderers This map is set via spring, see the applicationContext-service.xml file
 void updateReportSchemaXml(ReportSchemaXml reportSchemaXml)
          Update the given ReportSchemaXml object in the database.
 

Method Detail

evaluate

ReportData evaluate(ReportSchema reportSchema,
                    Cohort inputCohort,
                    EvaluationContext context)
Auto generated method comment

Returns:

getReportSchemas

@Transactional(readOnly=true)
java.util.List<ReportSchema> getReportSchemas()
Auto generated method comment

Returns:

getReportSchema

@Transactional(readOnly=true)
ReportSchema getReportSchema(java.lang.Integer reportSchemaId)
Auto generated method comment

Returns:

getReportSchema

ReportSchema getReportSchema(ReportSchemaXml reportSchemaXml)
Returns a ReportSchema object from a ReportSchemaXml definition De-serialized the xml definition, applies macro definitions, and returns an expanded report schema object

Parameters:
reportSchemaXml - - the ReportSchemaXml to use to return a ReportSchema instance
Returns:
ReportSchema
Throws:
java.lang.Exception - if conversion fails

saveReportSchema

void saveReportSchema(ReportSchema reportSchema)
Auto generated method comment

Parameters:
reportSchema -

deleteReportSchema

void deleteReportSchema(ReportSchema reportSchema)
Auto generated method comment

Parameters:
reportSchema -

getReportRenderers

@Transactional(readOnly=true)
java.util.Collection<ReportRenderer> getReportRenderers()
Returns:
All registered report renderers

getRenderingModes

@Transactional(readOnly=true)
java.util.List<RenderingMode> getRenderingModes(ReportSchema schema)
Returns:
all rendering modes for the given schema, in their preferred order

getReportRenderer

@Transactional(readOnly=true)
ReportRenderer getReportRenderer(java.lang.Class<? extends ReportRenderer> clazz)
Auto generated method comment

Parameters:
key -
Returns:

getReportRenderer

@Transactional(readOnly=true)
ReportRenderer getReportRenderer(java.lang.String className)
Get the report renderer

Parameters:
key -
Returns:

setRenderers

void setRenderers(java.util.Map<java.lang.Class<? extends ReportRenderer>,ReportRenderer> renderers)
                  throws APIException
Add the given map to this service's renderers This map is set via spring, see the applicationContext-service.xml file

Parameters:
renderers - Map of class to renderer object
Throws:
APIException

getRenderers

java.util.Map<java.lang.Class<? extends ReportRenderer>,ReportRenderer> getRenderers()
                                                                                     throws APIException
Gets the renderers map registered to this report service

Returns:
Throws:
APIException

registerRenderer

void registerRenderer(java.lang.Class<? extends ReportRenderer> rendererClass,
                      ReportRenderer renderer)
                      throws APIException
Registers the given renderer with the service

Parameters:
rendererClass -
renderer -
Throws:
APIException

registerRenderer

void registerRenderer(java.lang.String rendererClass)
                      throws APIException
Convenience method for registerRenderer(Class, ReportRenderer)

Parameters:
rendererClass -
Throws:
APIException

removeRenderer

void removeRenderer(java.lang.Class<? extends ReportRenderer> rendererClass)
                    throws APIException
Remove the renderer associated with rendererClass from the list of available renderers

Parameters:
rendererClass -
Throws:
APIException

getReportSchemaXml

@Transactional(readOnly=true)
ReportSchemaXml getReportSchemaXml(java.lang.Integer reportSchemaXmlId)
Get the xmlified ReportSchema object that was saved previously

Returns:
ReportSchemaXml object that is associated with the given id

createReportSchemaXml

void createReportSchemaXml(ReportSchemaXml reportSchemaXml)
Create a new ReportSchemaXml object in the database.

Parameters:
reportSchemaXml - xml to save

updateReportSchemaXml

void updateReportSchemaXml(ReportSchemaXml reportSchemaXml)
Update the given ReportSchemaXml object in the database.

Parameters:
reportSchemaXml - xml to save

deleteReportSchemaXml

void deleteReportSchemaXml(ReportSchemaXml reportSchemaXml)
Delete the given ReportSchemaXml class from the db


getReportSchemaXmls

java.util.List<ReportSchemaXml> getReportSchemaXmls()
Get all saved ReportSchemaXml objects in the db

Returns:
List of ReportSchemaXml objects

getReportXmlMacros

java.util.Properties getReportXmlMacros()
Gets the macros that will be used when deserializing ReportSchemaXML

Returns:
macros

saveReportXmlMacros

void saveReportXmlMacros(java.util.Properties macros)
Saves the macros that will be used when deserializing ReportSchemaXML

Parameters:
macros - the macros to set

applyReportXmlMacros

java.lang.String applyReportXmlMacros(java.lang.String input)
Applies the report xml macros to the input, and returns it.

Parameters:
input - The text (presumably a report schema xml definition) that you want to apply macros to
Returns:
the result of applying macro substitutions to input

OpenMRS-trunk

Generated May 29 2008 02:01 AM. NOTE - these libraries are in active development and subject to change