@Transactional public interface AdministrationService extends OpenmrsService
Use:
List<GlobalProperty> globalProperties = Context.getAdministrationService().getGlobalProperties();
Context
Modifier and Type | Method and Description |
---|---|
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.
|
void |
createConceptDatatype(ConceptDatatype cd)
Deprecated.
|
void |
createConceptProposal(ConceptProposal cp)
Deprecated.
|
void |
createEncounterType(EncounterType encounterType)
Deprecated.
|
void |
createFieldType(FieldType fieldType)
Deprecated.
|
void |
createLocation(Location location)
Deprecated.
|
void |
createMimeType(MimeType mimeType)
Deprecated.
|
void |
createPatientIdentifierType(PatientIdentifierType patientIdentifierType)
Deprecated.
|
void |
createPrivilege(Privilege privilege)
Deprecated.
|
void |
createReport(Report report)
Deprecated.
see reportingcompatibility module
|
void |
createReportObject(AbstractReportObject reportObject)
Deprecated.
see reportingcompatibility module
|
void |
createRole(Role role)
Deprecated.
|
void |
createTribe(Tribe tribe)
Deprecated.
The Tribe object is no longer supported. Install the Tribe module
|
void |
deleteConceptClass(ConceptClass cc)
Deprecated.
|
void |
deleteConceptDatatype(ConceptDatatype cd)
Deprecated.
use
org.openmrs.api |
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.
|
void |
deletePatientIdentifierType(PatientIdentifierType patientIdentifierType)
Deprecated.
|
void |
deletePrivilege(Privilege privilege)
Deprecated.
|
void |
deleteReport(Report report)
Deprecated.
see reportingcompatibility module
|
void |
deleteReportObject(java.lang.Integer reportObjectId)
Deprecated.
see reportingcompatibility module
|
void |
deleteRole(Role role)
Deprecated.
|
void |
deleteTribe(Tribe tribe)
Deprecated.
The Tribe object is no longer supported. Install the Tribe module
|
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<java.util.Locale> |
getAllowedLocales()
Gets the list of locales which the administrator has allowed for use on the system.
|
java.util.List<GlobalProperty> |
getGlobalProperties()
Deprecated.
|
java.util.List<GlobalProperty> |
getGlobalPropertiesByPrefix(java.lang.String prefix)
Gets all global properties that begin with
prefix . |
java.util.List<GlobalProperty> |
getGlobalPropertiesBySuffix(java.lang.String suffix)
Gets all global properties that end with
suffix . |
java.lang.String |
getGlobalProperty(java.lang.String propertyName)
Gets the global property that has the given
propertyName . |
java.lang.String |
getGlobalProperty(java.lang.String propertyName,
java.lang.String defaultValue)
Gets the global property that has the given
propertyName |
GlobalProperty |
getGlobalPropertyByUuid(java.lang.String uuid)
Get a global property by its uuid.
|
GlobalProperty |
getGlobalPropertyObject(java.lang.String propertyName)
Gets the global property that has the given
propertyName |
<T> T |
getGlobalPropertyValue(java.lang.String propertyName,
T defaultValue)
Returns a global property according to the type specified
|
ImplementationId |
getImplementationId()
Get the implementation id stored for this server Returns null if no implementation id has
been successfully set yet
|
int |
getMaximumPropertyLength(java.lang.Class<? extends OpenmrsObject> aClass,
java.lang.String fieldName) |
java.util.Collection<?> |
getMRNGeneratorLog()
Deprecated.
use the mrngen module instead
|
java.util.Set<java.util.Locale> |
getPresentationLocales()
Gets the list of locales for which localized messages are available for the user interface
(presentation layer).
|
java.util.List<java.util.Locale> |
getSearchLocales()
Returns a list of locales used by the user when searching.
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
getSystemInformation()
Get a map of all the System Information.
|
java.util.SortedMap<java.lang.String,java.lang.String> |
getSystemVariables()
Get a listing or important variables used in openmrs
|
boolean |
isDatabaseStringComparisonCaseSensitive()
Reads a GP which specifies if database string comparison is case sensitive.
|
void |
mapConceptProposalToConcept(ConceptProposal cp,
Concept mappedConcept)
Deprecated.
|
void |
mrnGeneratorLog(java.lang.String site,
java.lang.Integer start,
java.lang.Integer count)
Deprecated.
use the mrngen module instead
|
void |
purgeGlobalProperties(java.util.List<GlobalProperty> globalProperties)
Completely remove the given global properties from the database
|
void |
purgeGlobalProperty(GlobalProperty globalProperty)
Completely remove the given global property from the database
|
void |
rejectConceptProposal(ConceptProposal cp)
Deprecated.
|
void |
removeGlobalPropertyListener(GlobalPropertyListener listener)
Removes a GlobalPropertyListener previously registered by
addGlobalPropertyListener(GlobalPropertyListener) |
void |
retireTribe(Tribe tribe)
Deprecated.
The Tribe object is no longer supported. Install the Tribe module
|
java.util.List<GlobalProperty> |
saveGlobalProperties(java.util.List<GlobalProperty> props)
Save the given list of global properties to the database.
|
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 |
setGlobalProperties(java.util.List<GlobalProperty> props)
Deprecated.
|
void |
setGlobalProperty(GlobalProperty gp)
Deprecated.
|
void |
setGlobalProperty(java.lang.String propertyName,
java.lang.String propertyValue)
Deprecated.
use #saveGlobalProperty(GlobalProperty)
|
void |
setImplementationId(ImplementationId implementationId)
Set the given
implementationId as this implementation's unique id |
void |
setImplementationIdHttpClient(HttpClient implementationHttpClient)
Used by Spring to set the http client for accessing the openmrs implementation service
|
void |
unretireTribe(Tribe tribe)
Deprecated.
The Tribe object is no longer supported. Install the Tribe module
|
void |
updateConceptClass(ConceptClass cc)
Deprecated.
|
void |
updateConceptDatatype(ConceptDatatype cd)
Deprecated.
|
void |
updateConceptProposal(ConceptProposal cp)
Deprecated.
|
void |
updateConceptSetDerived()
Deprecated.
|
void |
updateConceptSetDerived(Concept concept)
Deprecated.
|
void |
updateConceptWord(Concept concept)
Deprecated.
|
void |
updateConceptWords()
Deprecated.
moved to
ConceptService.updateConceptWords() |
void |
updateConceptWords(java.lang.Integer conceptIdStart,
java.lang.Integer conceptIdEnd)
Deprecated.
|
void |
updateEncounterType(EncounterType encounterType)
Deprecated.
|
void |
updateFieldType(FieldType fieldType)
Deprecated.
|
void |
updateLocation(Location location)
Deprecated.
|
void |
updateMimeType(MimeType mimeType)
Deprecated.
|
void |
updatePatientIdentifierType(PatientIdentifierType patientIdentifierType)
Deprecated.
|
void |
updatePrivilege(Privilege privilege)
Deprecated.
|
void |
updateReport(Report report)
Deprecated.
see reportingcompatibility module
|
void |
updateReportObject(AbstractReportObject reportObject)
Deprecated.
see reportingcompatibility module
|
void |
updateRole(Role role)
Deprecated.
|
void |
updateTribe(Tribe tribe)
Deprecated.
The Tribe object is no longer supported. Install the Tribe module
|
void |
validate(java.lang.Object object,
org.springframework.validation.Errors errors)
Performs validation in the manual flush mode to prevent any premature flushes.
|
onShutdown, onStartup
void setAdministrationDAO(AdministrationDAO dao)
dao
- The dao implementation to usevoid createEncounterType(EncounterType encounterType) throws APIException
EncounterService.saveEncounterType(EncounterType)
APIException
void updateEncounterType(EncounterType encounterType) throws APIException
EncounterService.saveEncounterType(EncounterType)
APIException
void deleteEncounterType(EncounterType encounterType) throws APIException
EncounterService.purgeEncounterType(EncounterType)
APIException
void createPatientIdentifierType(PatientIdentifierType patientIdentifierType) throws APIException
PatientService.savePatientIdentifierType(PatientIdentifierType)
APIException
PatientService.savePatientIdentifierType(PatientIdentifierType)
void updatePatientIdentifierType(PatientIdentifierType patientIdentifierType) throws APIException
PatientService.savePatientIdentifierType(PatientIdentifierType)
APIException
PatientService.savePatientIdentifierType(PatientIdentifierType)
void deletePatientIdentifierType(PatientIdentifierType patientIdentifierType) throws APIException
PatientService.purgePatientIdentifierType(PatientIdentifierType)
APIException
PatientService.purgePatientIdentifierType(PatientIdentifierType)
void createTribe(Tribe tribe) throws APIException
APIException
void updateTribe(Tribe tribe) throws APIException
APIException
void deleteTribe(Tribe tribe) throws APIException
APIException
void retireTribe(Tribe tribe) throws APIException
APIException
void unretireTribe(Tribe tribe) throws APIException
APIException
void createFieldType(FieldType fieldType) throws APIException
FormService.saveFieldType(FieldType)
APIException
void updateFieldType(FieldType fieldType) throws APIException
FormService.saveFieldType(FieldType)
APIException
void deleteFieldType(FieldType fieldType) throws APIException
FormService.purgeFieldType(FieldType)
APIException
@Authorized(value="Manage Mime Types") void createMimeType(MimeType mimeType) throws APIException
ObsService.saveMimeType(MimeType)
APIException
@Authorized(value="Manage Mime Types") void updateMimeType(MimeType mimeType) throws APIException
ObsService.saveMimeType(MimeType)
APIException
@Authorized(value="Manage Mime Types") void deleteMimeType(MimeType mimeType) throws APIException
ObsService.purgeMimeType(MimeType)
APIException
void createLocation(Location location) throws APIException
LocationService.saveLocation(Location)
APIException
void updateLocation(Location location) throws APIException
LocationService.saveLocation(Location)
APIException
void deleteLocation(Location location) throws APIException
LocationService.purgeLocation(Location)
APIException
void createRole(Role role) throws APIException
UserService.saveRole(Role)
APIException
void updateRole(Role role) throws APIException
UserService.saveRole(Role)
APIException
void deleteRole(Role role) throws APIException
UserService.purgeRole(Role)
APIException
void createPrivilege(Privilege privilege) throws APIException
UserService.savePrivilege(Privilege)
APIException
void updatePrivilege(Privilege privilege) throws APIException
UserService.savePrivilege(Privilege)
APIException
void deletePrivilege(Privilege privilege) throws APIException
UserService.purgePrivilege(Privilege)
APIException
void createConceptClass(ConceptClass cc) throws APIException
ConceptService.saveConceptClass(ConceptClass)
cc
- ConceptClass to createAPIException
void updateConceptClass(ConceptClass cc) throws APIException
ConceptService.saveConceptClass(ConceptClass)
cc
- ConceptClass to updateAPIException
void deleteConceptClass(ConceptClass cc) throws APIException
ConceptService.purgeConceptClass(ConceptClass)
cc
- ConceptClass to deleteAPIException
void createConceptDatatype(ConceptDatatype cd) throws APIException
ConceptService.saveConceptDatatype(ConceptDatatype)
cd
- ConceptDatatype to createAPIException
void updateConceptDatatype(ConceptDatatype cd) throws APIException
ConceptService.saveConceptDatatype(ConceptDatatype)
cd
- ConceptDatatype to updateAPIException
void deleteConceptDatatype(ConceptDatatype cd) throws APIException
org.openmrs.api
cd
- ConceptDatatype to deleteAPIException
@Deprecated void createReport(Report report) throws APIException
report
- Report to createAPIException
@Deprecated void updateReport(Report report) throws APIException
report
- Report to updateAPIException
@Deprecated void deleteReport(Report report) throws APIException
report
- Report to deleteAPIException
@Deprecated void createReportObject(AbstractReportObject reportObject) throws APIException
reportObject
- Report Object to createAPIException
@Deprecated void updateReportObject(AbstractReportObject reportObject) throws APIException
reportObject
- the Report Object to updateAPIException
@Deprecated void deleteReportObject(java.lang.Integer reportObjectId) throws APIException
reportObjectId
- Internal identifier for the Report Object to deleteAPIException
void updateConceptWord(Concept concept) throws APIException
ConceptService.updateConceptWord(Concept)
concept
- APIException
void updateConceptWords() throws APIException
ConceptService.updateConceptWords()
APIException
void updateConceptWords(java.lang.Integer conceptIdStart, java.lang.Integer conceptIdEnd) throws APIException
ConceptService.updateConceptWords(Integer, Integer)
conceptIdStart
and
conceptIdEnd
(inclusive) calling updateConceptWord(concept)APIException
void updateConceptSetDerived(Concept concept) throws APIException
ConceptService.updateConceptSetDerived(Concept)
;concept
- APIException
void updateConceptSetDerived() throws APIException
ConceptService.updateConceptSetDerived()
APIException
void createConceptProposal(ConceptProposal cp) throws APIException
ConceptService.saveConceptProposal(ConceptProposal)
cp
- APIException
void updateConceptProposal(ConceptProposal cp) throws APIException
ConceptService.saveConceptProposal(ConceptProposal)
cp
- APIException
void mapConceptProposalToConcept(ConceptProposal cp, Concept mappedConcept) throws APIException
ConceptService.mapConceptProposalToConcept(ConceptProposal, Concept)
cp
- mappedConcept
- APIException
void rejectConceptProposal(ConceptProposal cp)
ConceptService.rejectConceptProposal(ConceptProposal)
cp
- void mrnGeneratorLog(java.lang.String site, java.lang.Integer start, java.lang.Integer count)
site
- start
- count
- @Transactional(readOnly=true) java.util.Collection<?> getMRNGeneratorLog()
@Transactional(readOnly=true) GlobalProperty getGlobalPropertyByUuid(java.lang.String uuid) throws APIException
APIException
@Transactional(readOnly=true) @Authorized(value="View Administration Functions") java.util.SortedMap<java.lang.String,java.lang.String> getSystemVariables() throws APIException
APIException
@Transactional(readOnly=true) @Authorized(value="View Administration Functions") java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getSystemInformation() throws APIException
APIException
@Transactional(readOnly=true) java.lang.String getGlobalProperty(java.lang.String propertyName) throws APIException
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.
propertyName
- property key to look forAPIException
getGlobalProperty(String, String)
@Transactional(readOnly=true) java.lang.String getGlobalProperty(java.lang.String propertyName, java.lang.String defaultValue) throws APIException
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
propertyName
- property key to look fordefaultValue
- value to return if propertyName is not foundAPIException
@Transactional(readOnly=true) GlobalProperty getGlobalPropertyObject(java.lang.String propertyName)
propertyName
propertyName
- property key to look forpropertyName
@Transactional(readOnly=true) java.util.List<GlobalProperty> getGlobalPropertiesByPrefix(java.lang.String prefix)
prefix
.prefix
- The beginning of the property name to match.List
of GlobalProperty
s that match prefix
@Transactional(readOnly=true) java.util.List<GlobalProperty> getGlobalPropertiesBySuffix(java.lang.String suffix)
suffix
.prefix
- The end of the property name to match.List
of GlobalProperty
s that match .*suffix
@Transactional(readOnly=true) @Authorized(value="View Global Properties") java.util.List<GlobalProperty> getAllGlobalProperties() throws APIException
APIException
@Transactional(readOnly=true) java.util.List<GlobalProperty> getGlobalProperties()
getAllGlobalProperties()
@Authorized(value="Manage Global Properties") java.util.List<GlobalProperty> saveGlobalProperties(java.util.List<GlobalProperty> props) throws APIException
props
- list of GlobalProperty objects to saveAPIException
void setGlobalProperties(java.util.List<GlobalProperty> props)
saveGlobalProperties(List)
@Authorized(value="Purge Global Properties") void purgeGlobalProperty(GlobalProperty globalProperty) throws APIException
globalProperty
- the global property to delete/remove from the databaseAPIException
@Authorized(value="Purge Global Properties") void purgeGlobalProperties(java.util.List<GlobalProperty> globalProperties) throws APIException
globalProperties
- the global properties to delete/remove from the databaseAPIException
void deleteGlobalProperty(java.lang.String propertyName)
purgeGlobalProperty(GlobalProperty)
purgeGlobalProperty(new GlobalProperty(propertyName));
void setGlobalProperty(java.lang.String propertyName, java.lang.String propertyValue)
saveGlobalProperty(new GlobalProperty(propertyName, propertyValue));
@Authorized(value="Manage Global Properties") GlobalProperty saveGlobalProperty(GlobalProperty gp) throws APIException
gp
- global property to saveAPIException
void setGlobalProperty(GlobalProperty gp)
saveGlobalProperty(GlobalProperty)
void addGlobalProperty(java.lang.String propertyName, java.lang.String propertyValue)
saveGlobalProperty(GlobalProperty)
void addGlobalProperty(GlobalProperty gp)
saveGlobalProperty(GlobalProperty)
void addGlobalPropertyListener(GlobalPropertyListener listener)
listener
- The listener to registerGlobalPropertyListener
void removeGlobalPropertyListener(GlobalPropertyListener listener)
addGlobalPropertyListener(GlobalPropertyListener)
listener
- @Authorized(value="SQL Level Access") java.util.List<java.util.List<java.lang.Object>> executeSQL(java.lang.String sql, boolean selectOnly) throws APIException
sql
on the database. If selectOnly
is flagged then any
non-select sql statements will be rejected.sql
- selectOnly
- APIException
@Transactional(readOnly=true) @Authorized(value="Manage Implementation Id") ImplementationId getImplementationId() throws APIException
APIException
@Authorized(value="Manage Implementation Id") void setImplementationId(ImplementationId implementationId) throws APIException
implementationId
as this implementation's unique idimplementationId
- the ImplementationId to saveAPIException
- if implementationId is empty or is invalid according to central id
server@Transactional(readOnly=true) java.util.List<java.util.Locale> getAllowedLocales()
OpenmrsConstants.GLOBAL_PROPERTY_LOCALE_ALLOWED_LIST
.@Transactional(readOnly=true) java.util.Set<java.util.Locale> getPresentationLocales()
<T> T getGlobalPropertyValue(java.lang.String propertyName, T defaultValue) throws APIException
T
- propertyName
- APIException
@Transactional(readOnly=true) int getMaximumPropertyLength(java.lang.Class<? extends OpenmrsObject> aClass, java.lang.String fieldName)
aClass
- class of object getting length forfieldName
- name of the field to get the length for@Transactional(readOnly=true) void validate(java.lang.Object object, org.springframework.validation.Errors errors) throws APIException
Used by ValidateUtil.validate(Object)
.
object
- errors
- APIException
FlushMode
java.util.List<java.util.Locale> getSearchLocales() throws APIException
The list is constructed from a currently selected locale and allowed user proficient locales.
APIException
void setImplementationIdHttpClient(HttpClient implementationHttpClient)
implementationHttpClient
- The implementation http clientboolean isDatabaseStringComparisonCaseSensitive()
It is an optimisation parameter for MySQL, which can speed up searching if set to false. See http://dev.mysql.com/doc/refman/5.7/en/case-sensitivity.html
It is set to true by default.
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.