org.openmrs.api.impl
Class AdministrationServiceImpl

java.lang.Object
  extended by org.openmrs.api.impl.BaseOpenmrsService
      extended by org.openmrs.api.impl.AdministrationServiceImpl
All Implemented Interfaces:
AdministrationService, OpenmrsService

public class AdministrationServiceImpl
extends BaseOpenmrsService
implements AdministrationService

Default implementation of the administration services. This class should not be used on its own. The current OpenMRS implementation should be fetched from the Context

See Also:
AdministrationService, Context

Field Summary
protected  AdministrationDAO dao
           
protected  org.apache.commons.logging.Log log
           
protected  java.util.SortedMap<java.lang.String,java.lang.String> systemVariables
          Static-ish variable used to cache the system variables.
 
Constructor Summary
AdministrationServiceImpl()
          Default empty constructor
 
Method Summary
 void addGlobalProperty(GlobalProperty gp)
          Deprecated.  
 void addGlobalProperty(java.lang.String propertyName, java.lang.String propertyValue)
          Deprecated.  
 void addGlobalPropertyListener(GlobalPropertyListener listener)
          Allows code to be notified when a global property is created/edited/deleted.
 void createConceptClass(ConceptClass cc)
          Deprecated. moved to ConceptService
 void createConceptDatatype(ConceptDatatype cd)
          Deprecated. moved to ConceptService
 void createConceptProposal(ConceptProposal cp)
          Deprecated. moved to ConceptService
 void createEncounterType(EncounterType encounterType)
          Deprecated.  
 void createFieldType(FieldType fieldType)
          Deprecated.  
 void createLocation(Location location)
          Deprecated.  
 void createMimeType(MimeType mimeType)
          Deprecated. use ObsService.saveMimeType(MimeType)
 void createPatientIdentifierType(PatientIdentifierType patientIdentifierType)
          Deprecated. replaced by PatientService.savePatientIdentifierType(PatientIdentifierType)
 void createPrivilege(Privilege privilege)
          Deprecated.  
 void createReport(Report report)
          Create a new Report
 void createReportObject(AbstractReportObject reportObject)
          Create a new Report Object
 void createRole(Role role)
          Deprecated.  
 void createTribe(Tribe tribe)
          Create a new Tribe
 void deleteConceptClass(ConceptClass cc)
          Deprecated. moved to ConceptService
 void deleteConceptDatatype(ConceptDatatype cd)
          Deprecated. moved to ConceptService
 void deleteEncounterType(EncounterType encounterType)
          Deprecated.  
 void deleteFieldType(FieldType fieldType)
          Deprecated.  
 void deleteGlobalProperty(java.lang.String propertyName)
          Deprecated.  
 void deleteLocation(Location location)
          Deprecated.  
 void deleteMimeType(MimeType mimeType)
          Deprecated. use ObsService.purgeMimeType(MimeType)
 void deletePatientIdentifierType(PatientIdentifierType patientIdentifierType)
          Deprecated. replaced by PatientService.purgePatientIdentifierType(PatientIdentifierType)
 void deletePrivilege(Privilege privilege)
          Deprecated.  
 void deleteReport(Report report)
          Delete Report
 void deleteReportObject(java.lang.Integer reportObjectId)
          Delete Report Object
 void deleteRole(Role role)
          Deprecated.  
 void deleteTribe(Tribe tribe)
          Delete Tribe
 java.util.List<java.util.List<java.lang.Object>> executeSQL(java.lang.String sql, boolean selectOnly)
          Runs the sql on the database.
 java.util.List<GlobalProperty> getAllGlobalProperties()
          Get a list of all global properties in the system
 java.util.List<DataEntryStatistic> getDataEntryStatistics(java.util.Date fromDate, java.util.Date toDate, java.lang.String encounterUserColumn, java.lang.String orderUserColumn, java.lang.String groupBy)
          Creates a list of data entry stats from fromDate to toDate EncounterUserColumn is a column in the encounter table like creator, provider, etc (defaults to creator) EncounterUserColumn is a column in the encounter table like creator, orderer, etc (defaults to orderer)
 java.util.List<GlobalProperty> getGlobalProperties()
          Deprecated.  
 java.lang.String getGlobalProperty(java.lang.String propertyName)
          Gets the global property that has the given propertyName If propertyName is not found in the list of Global Properties currently in the database, a null value is returned This method should not have any authorization check
 java.lang.String getGlobalProperty(java.lang.String propertyName, java.lang.String defaultValue)
          Gets the global property that has the given propertyName If propertyName is not found in the list of Global Properties currently in the database, a defaultValue is returned This method should not have any authorization check
 java.util.Collection<?> getMRNGeneratorLog()
          To be deprecated when the mrn generator module is completed
 java.util.SortedMap<java.lang.String,java.lang.String> getSystemVariables()
          Get a listing or important variables used in openmrs
 void mapConceptProposalToConcept(ConceptProposal cp, Concept mappedConcept)
          Deprecated. moved to ConceptService
 void mrnGeneratorLog(java.lang.String site, java.lang.Integer start, java.lang.Integer count)
          To be deprecated when mrn generator module is completed
 void purgeGlobalProperty(GlobalProperty globalProperty)
          Completely remove the given global property from the database
 void rejectConceptProposal(ConceptProposal cp)
          Deprecated. moved to ConceptService
 void removeGlobalPropertyListener(GlobalPropertyListener listener)
          Removes a GlobalPropertyListener previously registered by #addGlobalPropertyListener(String, GlobalPropertyListener)
 void retireTribe(Tribe tribe)
          Retire Tribe
 java.util.List<GlobalProperty> saveGlobalProperties(java.util.List<GlobalProperty> props)
          Save the given list of global properties to the database overwriting all values with the given values.
 GlobalProperty saveGlobalProperty(GlobalProperty gp)
          Save the given global property to the database
 void setAdministrationDAO(AdministrationDAO dao)
          Used by Spring to set the specific/chosen database access implementation
 void setEventListeners(EventListeners eventListeners)
           
 void setGlobalProperties(java.util.List<GlobalProperty> props)
          Deprecated.  
 void setGlobalProperty(GlobalProperty gp)
          Deprecated.  
 void setGlobalProperty(java.lang.String propertyName, java.lang.String propertyValue)
          Deprecated.  
 void unretireTribe(Tribe tribe)
          Unretire Tribe
 void updateConceptClass(ConceptClass cc)
          Deprecated. moved to ConceptService
 void updateConceptDatatype(ConceptDatatype cd)
          Deprecated. moved to ConceptService
 void updateConceptProposal(ConceptProposal cp)
          Deprecated. moved to ConceptService
 void updateConceptSetDerived()
          Deprecated. moved to ConceptService
 void updateConceptSetDerived(Concept concept)
          Deprecated. moved to ConceptService
 void updateConceptWord(Concept concept)
          Deprecated. moved to ConceptServiceImpl
 void updateConceptWords()
          Deprecated. moved to ConceptServiceImpl
 void updateConceptWords(java.lang.Integer conceptIdStart, java.lang.Integer conceptIdEnd)
          Deprecated. moved to ConceptService
 void updateEncounterType(EncounterType encounterType)
          Deprecated.  
 void updateFieldType(FieldType fieldType)
          Deprecated.  
 void updateLocation(Location location)
          Deprecated.  
 void updateMimeType(MimeType mimeType)
          Deprecated. use ObsService.saveMimeType(MimeType)
 void updatePatientIdentifierType(PatientIdentifierType patientIdentifierType)
          Deprecated. replaced by PatientService.savePatientIdentifierType(PatientIdentifierType)
 void updatePrivilege(Privilege privilege)
          Deprecated.  
 void updateReport(Report report)
          Update Report
 void updateReportObject(AbstractReportObject reportObject)
          Update Report Object
 void updateRole(Role role)
          Deprecated.  
 void updateTribe(Tribe tribe)
          Update Tribe
 
Methods inherited from class org.openmrs.api.impl.BaseOpenmrsService
onShutdown, onStartup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openmrs.api.OpenmrsService
onShutdown, onStartup
 

Field Detail

log

protected org.apache.commons.logging.Log log

dao

protected AdministrationDAO dao

systemVariables

protected java.util.SortedMap<java.lang.String,java.lang.String> systemVariables
Static-ish variable used to cache the system variables. This is not static so that every time a module is loaded or removed the variable is destroyed (along with the administration service) and recreated the next time it is called

Constructor Detail

AdministrationServiceImpl

public AdministrationServiceImpl()
Default empty constructor

Method Detail

setAdministrationDAO

public void setAdministrationDAO(AdministrationDAO dao)
Description copied from interface: AdministrationService
Used by Spring to set the specific/chosen database access implementation

Specified by:
setAdministrationDAO in interface AdministrationService
Parameters:
dao - The dao implementation to use
See Also:
AdministrationService.setAdministrationDAO(org.openmrs.api.db.AdministrationDAO)

setEventListeners

public void setEventListeners(EventListeners eventListeners)

createEncounterType

public void createEncounterType(EncounterType encounterType)
                         throws APIException
Deprecated. 

Specified by:
createEncounterType in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.createEncounterType(org.openmrs.EncounterType)

updateEncounterType

public void updateEncounterType(EncounterType encounterType)
                         throws APIException
Deprecated. 

Specified by:
updateEncounterType in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.updateEncounterType(org.openmrs.EncounterType)

deleteEncounterType

public void deleteEncounterType(EncounterType encounterType)
                         throws APIException
Deprecated. 

Specified by:
deleteEncounterType in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.deleteEncounterType(org.openmrs.EncounterType)

createPatientIdentifierType

public void createPatientIdentifierType(PatientIdentifierType patientIdentifierType)
                                 throws APIException
Deprecated. replaced by PatientService.savePatientIdentifierType(PatientIdentifierType)

Specified by:
createPatientIdentifierType in interface AdministrationService
Throws:
APIException
See Also:
PatientService.savePatientIdentifierType(PatientIdentifierType)

updatePatientIdentifierType

public void updatePatientIdentifierType(PatientIdentifierType patientIdentifierType)
                                 throws APIException
Deprecated. replaced by PatientService.savePatientIdentifierType(PatientIdentifierType)

Specified by:
updatePatientIdentifierType in interface AdministrationService
Throws:
APIException
See Also:
PatientService.savePatientIdentifierType(PatientIdentifierType)

deletePatientIdentifierType

public void deletePatientIdentifierType(PatientIdentifierType patientIdentifierType)
                                 throws APIException
Deprecated. replaced by PatientService.purgePatientIdentifierType(PatientIdentifierType)

Specified by:
deletePatientIdentifierType in interface AdministrationService
Throws:
APIException
See Also:
PatientService.purgePatientIdentifierType(PatientIdentifierType)

createTribe

public void createTribe(Tribe tribe)
                 throws APIException
Create a new Tribe

Specified by:
createTribe in interface AdministrationService
Parameters:
Tribe - to create
Throws:
APIException

updateTribe

public void updateTribe(Tribe tribe)
                 throws APIException
Update Tribe

Specified by:
updateTribe in interface AdministrationService
Parameters:
Tribe - to update
Throws:
APIException

deleteTribe

public void deleteTribe(Tribe tribe)
                 throws APIException
Delete Tribe

Specified by:
deleteTribe in interface AdministrationService
Parameters:
Tribe - to delete
Throws:
APIException

retireTribe

public void retireTribe(Tribe tribe)
                 throws APIException
Retire Tribe

Specified by:
retireTribe in interface AdministrationService
Parameters:
Tribe - to retire
Throws:
APIException

unretireTribe

public void unretireTribe(Tribe tribe)
                   throws APIException
Unretire Tribe

Specified by:
unretireTribe in interface AdministrationService
Parameters:
Tribe - to unretire
Throws:
APIException

createFieldType

public void createFieldType(FieldType fieldType)
                     throws APIException
Deprecated. 

Specified by:
createFieldType in interface AdministrationService
Throws:
APIException

updateFieldType

public void updateFieldType(FieldType fieldType)
                     throws APIException
Deprecated. 

Specified by:
updateFieldType in interface AdministrationService
Throws:
APIException

deleteFieldType

public void deleteFieldType(FieldType fieldType)
                     throws APIException
Deprecated. 

Specified by:
deleteFieldType in interface AdministrationService
Throws:
APIException

createMimeType

public void createMimeType(MimeType mimeType)
                    throws APIException
Deprecated. use ObsService.saveMimeType(MimeType)

Specified by:
createMimeType in interface AdministrationService
Throws:
APIException

updateMimeType

public void updateMimeType(MimeType mimeType)
                    throws APIException
Deprecated. use ObsService.saveMimeType(MimeType)

Specified by:
updateMimeType in interface AdministrationService
Throws:
APIException

deleteMimeType

public void deleteMimeType(MimeType mimeType)
                    throws APIException
Deprecated. use ObsService.purgeMimeType(MimeType)

Specified by:
deleteMimeType in interface AdministrationService
Throws:
APIException

createLocation

public void createLocation(Location location)
                    throws APIException
Deprecated. 

Specified by:
createLocation in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.createLocation(org.openmrs.Location)

updateLocation

public void updateLocation(Location location)
                    throws APIException
Deprecated. 

Specified by:
updateLocation in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.updateLocation(org.openmrs.Location)

deleteLocation

public void deleteLocation(Location location)
                    throws APIException
Deprecated. 

Specified by:
deleteLocation in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.deleteLocation(org.openmrs.Location)

createRole

public void createRole(Role role)
                throws APIException
Deprecated. 

Specified by:
createRole in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.createRole(org.openmrs.Role)

updateRole

public void updateRole(Role role)
                throws APIException
Deprecated. 

Specified by:
updateRole in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.updateRole(org.openmrs.Role)

deleteRole

public void deleteRole(Role role)
                throws APIException
Deprecated. 

Specified by:
deleteRole in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.deleteRole(org.openmrs.Role)

createPrivilege

public void createPrivilege(Privilege privilege)
                     throws APIException
Deprecated. 

Specified by:
createPrivilege in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.createPrivilege(org.openmrs.Privilege)

updatePrivilege

public void updatePrivilege(Privilege privilege)
                     throws APIException
Deprecated. 

Specified by:
updatePrivilege in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.updatePrivilege(org.openmrs.Privilege)

deletePrivilege

public void deletePrivilege(Privilege privilege)
                     throws APIException
Deprecated. 

Specified by:
deletePrivilege in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.deletePrivilege(org.openmrs.Privilege)

createConceptClass

public void createConceptClass(ConceptClass cc)
                        throws APIException
Deprecated. moved to ConceptService

Description copied from interface: AdministrationService
Create a new ConceptClass

Specified by:
createConceptClass in interface AdministrationService
Throws:
APIException

updateConceptClass

public void updateConceptClass(ConceptClass cc)
                        throws APIException
Deprecated. moved to ConceptService

Description copied from interface: AdministrationService
Update ConceptClass

Specified by:
updateConceptClass in interface AdministrationService
Throws:
APIException

deleteConceptClass

public void deleteConceptClass(ConceptClass cc)
                        throws APIException
Deprecated. moved to ConceptService

Description copied from interface: AdministrationService
Delete ConceptClass

Specified by:
deleteConceptClass in interface AdministrationService
Throws:
APIException

createConceptDatatype

public void createConceptDatatype(ConceptDatatype cd)
                           throws APIException
Deprecated. moved to ConceptService

Description copied from interface: AdministrationService
Create a new ConceptDatatype

Specified by:
createConceptDatatype in interface AdministrationService
Throws:
APIException

updateConceptDatatype

public void updateConceptDatatype(ConceptDatatype cd)
                           throws APIException
Deprecated. moved to ConceptService

Description copied from interface: AdministrationService
Update ConceptDatatype

Specified by:
updateConceptDatatype in interface AdministrationService
Throws:
APIException

deleteConceptDatatype

public void deleteConceptDatatype(ConceptDatatype cd)
                           throws APIException
Deprecated. moved to ConceptService

Description copied from interface: AdministrationService
Delete ConceptDatatype

Specified by:
deleteConceptDatatype in interface AdministrationService
Throws:
APIException

createReport

public void createReport(Report report)
                  throws APIException
Create a new Report

Specified by:
createReport in interface AdministrationService
Parameters:
Report - to create
Throws:
APIException

updateReport

public void updateReport(Report report)
                  throws APIException
Update Report

Specified by:
updateReport in interface AdministrationService
Parameters:
Report - to update
Throws:
APIException

deleteReport

public void deleteReport(Report report)
                  throws APIException
Delete Report

Specified by:
deleteReport in interface AdministrationService
Parameters:
Report - to delete
Throws:
APIException

createReportObject

public void createReportObject(AbstractReportObject reportObject)
                        throws APIException
Create a new Report Object

Specified by:
createReportObject in interface AdministrationService
Parameters:
Report - Object to create
Throws:
APIException

updateReportObject

public void updateReportObject(AbstractReportObject reportObject)
                        throws APIException
Update Report Object

Specified by:
updateReportObject in interface AdministrationService
Parameters:
Report - Object to update
Throws:
APIException

deleteReportObject

public void deleteReportObject(java.lang.Integer reportObjectId)
                        throws APIException
Delete Report Object

Specified by:
deleteReportObject in interface AdministrationService
Parameters:
Report - Object to delete
Throws:
APIException

updateConceptWord

public void updateConceptWord(Concept concept)
                       throws APIException
Deprecated. moved to ConceptServiceImpl

Description copied from interface: AdministrationService
Iterates over the words in names and synonyms (for each locale) and updates the concept word business table

Specified by:
updateConceptWord in interface AdministrationService
Throws:
APIException

updateConceptWords

public void updateConceptWords()
                        throws APIException
Deprecated. moved to ConceptServiceImpl

Description copied from interface: AdministrationService
Iterates over all concepts calling updateConceptWord(concept)

Specified by:
updateConceptWords in interface AdministrationService
Throws:
APIException

updateConceptWords

public void updateConceptWords(java.lang.Integer conceptIdStart,
                               java.lang.Integer conceptIdEnd)
                        throws APIException
Deprecated. moved to ConceptService

Description copied from interface: AdministrationService
Iterates over all concepts with conceptIds between conceptIdStart and conceptIdEnd (inclusive) calling updateConceptWord(concept)

Specified by:
updateConceptWords in interface AdministrationService
Throws:
APIException

updateConceptSetDerived

public void updateConceptSetDerived(Concept concept)
                             throws APIException
Deprecated. moved to ConceptService

Description copied from interface: AdministrationService
Updates the concept set derived business table for this concept (bursting the concept sets)

Specified by:
updateConceptSetDerived in interface AdministrationService
Throws:
APIException

updateConceptSetDerived

public void updateConceptSetDerived()
                             throws APIException
Deprecated. moved to ConceptService

Description copied from interface: AdministrationService
Iterates over all concepts calling updateConceptSetDerived(concept)

Specified by:
updateConceptSetDerived in interface AdministrationService
Throws:
APIException

createConceptProposal

public void createConceptProposal(ConceptProposal cp)
                           throws APIException
Deprecated. moved to ConceptService

Description copied from interface: AdministrationService
Create a concept proposal

Specified by:
createConceptProposal in interface AdministrationService
Throws:
APIException

updateConceptProposal

public void updateConceptProposal(ConceptProposal cp)
                           throws APIException
Deprecated. moved to ConceptService

Description copied from interface: AdministrationService
Update a concept proposal

Specified by:
updateConceptProposal in interface AdministrationService
Throws:
APIException

mapConceptProposalToConcept

public void mapConceptProposalToConcept(ConceptProposal cp,
                                        Concept mappedConcept)
                                 throws APIException
Deprecated. moved to ConceptService

Description copied from interface: AdministrationService
maps a concept proposal to a concept

Specified by:
mapConceptProposalToConcept in interface AdministrationService
Throws:
APIException

rejectConceptProposal

public void rejectConceptProposal(ConceptProposal cp)
Deprecated. moved to ConceptService

Description copied from interface: AdministrationService
rejects a concept proposal

Specified by:
rejectConceptProposal in interface AdministrationService
See Also:
AdministrationService.rejectConceptProposal(org.openmrs.ConceptProposal)

mrnGeneratorLog

public void mrnGeneratorLog(java.lang.String site,
                            java.lang.Integer start,
                            java.lang.Integer count)
                     throws APIException
Description copied from interface: AdministrationService
To be deprecated when mrn generator module is completed

Specified by:
mrnGeneratorLog in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.mrnGeneratorLog(java.lang.String, java.lang.Integer, java.lang.Integer)

getMRNGeneratorLog

public java.util.Collection<?> getMRNGeneratorLog()
                                           throws APIException
Description copied from interface: AdministrationService
To be deprecated when the mrn generator module is completed

Specified by:
getMRNGeneratorLog in interface AdministrationService
Returns:
Throws:
APIException
See Also:
AdministrationService.getMRNGeneratorLog()

getSystemVariables

public java.util.SortedMap<java.lang.String,java.lang.String> getSystemVariables()
                                                                          throws APIException
Description copied from interface: AdministrationService
Get a listing or important variables used in openmrs

Specified by:
getSystemVariables in interface AdministrationService
Returns:
a map from variable name to variable value
Throws:
APIException
See Also:
AdministrationService.getSystemVariables()

getGlobalProperty

public java.lang.String getGlobalProperty(java.lang.String propertyName)
                                   throws APIException
Description copied from interface: AdministrationService
Gets the global property that has the given propertyName If propertyName is not found in the list of Global Properties currently in the database, a null value is returned This method should not have any authorization check

Specified by:
getGlobalProperty in interface AdministrationService
Parameters:
propertyName - property key to look for
Returns:
value of property returned or null if none
Throws:
APIException
See Also:
AdministrationService.getGlobalProperty(java.lang.String)

getGlobalProperty

public java.lang.String getGlobalProperty(java.lang.String propertyName,
                                          java.lang.String defaultValue)
                                   throws APIException
Description copied from interface: AdministrationService
Gets the global property that has the given propertyName If propertyName is not found in the list of Global Properties currently in the database, a defaultValue is returned This method should not have any authorization check

Specified by:
getGlobalProperty in interface AdministrationService
Parameters:
propertyName - property key to look for
defaultValue - value to return if propertyName is not found
Returns:
value of propertyName property or defaultValue if none
Throws:
APIException
See Also:
AdministrationService.getGlobalProperty(java.lang.String, java.lang.String)

getGlobalProperties

public java.util.List<GlobalProperty> getGlobalProperties()
                                                   throws APIException
Deprecated. 

Specified by:
getGlobalProperties in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.getGlobalProperties()

setGlobalProperties

public void setGlobalProperties(java.util.List<GlobalProperty> props)
                         throws APIException
Deprecated. 

Specified by:
setGlobalProperties in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.setGlobalProperties(java.util.List)

deleteGlobalProperty

public void deleteGlobalProperty(java.lang.String propertyName)
                          throws APIException
Deprecated. 

Description copied from interface: AdministrationService
Use
purgeGlobalProperty(new GlobalProperty(propertyName));

Specified by:
deleteGlobalProperty in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.deleteGlobalProperty(java.lang.String)

setGlobalProperty

public void setGlobalProperty(java.lang.String propertyName,
                              java.lang.String propertyValue)
                       throws APIException
Deprecated. 

Description copied from interface: AdministrationService
Use
purgeGlobalProperty(new GlobalProperty(propertyName, propertyValue));

Specified by:
setGlobalProperty in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.setGlobalProperty(java.lang.String, java.lang.String)

setGlobalProperty

public void setGlobalProperty(GlobalProperty gp)
                       throws APIException
Deprecated. 

Specified by:
setGlobalProperty in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.setGlobalProperty(org.openmrs.GlobalProperty)

addGlobalProperty

public void addGlobalProperty(GlobalProperty gp)
Deprecated. 

Specified by:
addGlobalProperty in interface AdministrationService
See Also:
AdministrationService.addGlobalProperty(org.openmrs.GlobalProperty)

addGlobalProperty

public void addGlobalProperty(java.lang.String propertyName,
                              java.lang.String propertyValue)
                       throws APIException
Deprecated. 

Specified by:
addGlobalProperty in interface AdministrationService
Throws:
APIException
See Also:
AdministrationService.addGlobalProperty(java.lang.String, java.lang.String)

getAllGlobalProperties

public java.util.List<GlobalProperty> getAllGlobalProperties()
                                                      throws APIException
Description copied from interface: AdministrationService
Get a list of all global properties in the system

Specified by:
getAllGlobalProperties in interface AdministrationService
Returns:
list of global properties
Throws:
APIException
See Also:
AdministrationService.getAllGlobalProperties()

purgeGlobalProperty

public void purgeGlobalProperty(GlobalProperty globalProperty)
                         throws APIException
Description copied from interface: AdministrationService
Completely remove the given global property from the database

Specified by:
purgeGlobalProperty in interface AdministrationService
Parameters:
globalProperty - the global property to delete/remove from the database
Throws:
APIException
See Also:
AdministrationService.purgeGlobalProperty(org.openmrs.GlobalProperty)

saveGlobalProperties

public java.util.List<GlobalProperty> saveGlobalProperties(java.util.List<GlobalProperty> props)
                                                    throws APIException
Description copied from interface: AdministrationService
Save the given list of global properties to the database overwriting all values with the given values. If a value exists in the database that does not exist in the given list, that property is deleted from the database.

Specified by:
saveGlobalProperties in interface AdministrationService
Parameters:
props - GlobalProperty objects to save
Returns:
the saved global properties
Throws:
APIException
See Also:
AdministrationService.saveGlobalProperties(java.util.List)

saveGlobalProperty

public GlobalProperty saveGlobalProperty(GlobalProperty gp)
                                  throws APIException
Description copied from interface: AdministrationService
Save the given global property to the database

Specified by:
saveGlobalProperty in interface AdministrationService
Parameters:
gp - global property to save
Returns:
the saved global property
Throws:
APIException
See Also:
AdministrationService.saveGlobalProperty(org.openmrs.GlobalProperty)

getDataEntryStatistics

public java.util.List<DataEntryStatistic> getDataEntryStatistics(java.util.Date fromDate,
                                                                 java.util.Date toDate,
                                                                 java.lang.String encounterUserColumn,
                                                                 java.lang.String orderUserColumn,
                                                                 java.lang.String groupBy)
                                                          throws APIException
Description copied from interface: AdministrationService
Creates a list of data entry stats from fromDate to toDate EncounterUserColumn is a column in the encounter table like creator, provider, etc (defaults to creator) EncounterUserColumn is a column in the encounter table like creator, orderer, etc (defaults to orderer)

Specified by:
getDataEntryStatistics in interface AdministrationService
groupBy - (optional)
Returns:
Throws:
APIException
See Also:
AdministrationService.getDataEntryStatistics(java.util.Date, java.util.Date, java.lang