public class Dhis2 extends Object
| Constructor and Description |
|---|
Dhis2(Dhis2Config dhis2Config) |
Dhis2(Dhis2Config dhis2Config,
org.springframework.web.client.RestTemplate restTemplate) |
public Dhis2(Dhis2Config dhis2Config)
public Dhis2(Dhis2Config dhis2Config, org.springframework.web.client.RestTemplate restTemplate)
public org.springframework.http.HttpStatus getStatus()
HttpStatus.OK
if available and everything is okay. Returns HttpStatus.NOT_FOUND if the
URL to the DHIS 2 instance is invalid or the DHIS 2 instance is not available. Returns
a 500 series error if the DHIS 2 instance had an internal error.HttpStatus of the response from DHIS 2.public <T> ResponseMessage saveMetadataObject(String path, T object)
T - type.path - the URL path relative to the API end point.object - the object to save.ResponseMessage holding information about the operation.Dhis2ClientException - if the save operation failed due to client side error.public <T> ResponseMessage updateObject(String path, T object)
T - type.path - the URL path relative to the API end point.object - the object to save.ResponseMessage holding information about the operation.public <T> T getObject(String path, Class<T> klass)
T - type.path - the URL path relative to the API end point.klass - the class type of the object.public boolean objectExists(String path)
path - the URL path relative to the API end point.public ResponseMessage saveOrgUnit(OrgUnit orgUnit)
OrgUnit.orgUnit - the object to save.ResponseMessage holding information about the operation.public ResponseMessage updateOrgUnit(OrgUnit orgUnit)
OrgUnit.orgUnit - the object to update.ResponseMessage holding information about the operation.public OrgUnit getOrgUnit(String id)
OrgUnit.id - the object identifier.OrgUnit.public ResponseMessage saveOrgUnitGroup(OrgUnitGroup orgUnitGroup)
OrgUnitGroup.orgUnitGroup - the object to save.ResponseMessage holding information about the operation.public ResponseMessage updateOrgUnitGroup(OrgUnitGroup orgUnitGroup)
OrgUnitGroup.orgUnitGroup - the object to update.ResponseMessage holding information about the operation.public OrgUnitGroup getOrgUnitGroup(String id)
OrgUnitGroup.id - the object identifier.OrgUnitGroup.public List<OrgUnitGroup> getOrgUnitGroups(Query query)
OrgUnitGroup.query - the Query.OrgUnitGroup.public ResponseMessage saveOrgUnitGroupSet(OrgUnitGroupSet orgUnitGroupSet)
OrgUnitGroupSet.orgUnitGroupSet - the object to save.ResponseMessage holding information about the operation.public ResponseMessage updateOrgUnitGroupSet(OrgUnitGroupSet orgUnitGroupSet)
OrgUnitGroupSet.orgUnitGroupSet - the object to update.ResponseMessage holding information about the operation.public OrgUnitGroupSet getOrgUnitGroupSet(String id)
OrgUnitGroupSet.id - the object identifier.OrgUnitGroupSet.public List<OrgUnitGroupSet> getOrgUnitGroupSets(Query query)
OrgUnitGroupSet.query - the Query.OrgUnitGroupSet.public OrgUnitLevel getOrgUnitLevel(String id)
OrgUnitLevel.id - the object identifier.OrgUnitLevel.public List<OrgUnitLevel> getOrgUnitLevels(Query query)
OrgUnitGroupSet.query - the Query.OrgUnitGroupSet.public Category getCategory(String id)
Category.id - the object identifier.Category.public CategoryCombo getCategoryCombo(String id)
CategoryCombo.id - the object identifier.CategoryCombo.public List<CategoryCombo> getCategoryCombos(Query query)
CategoryCombo.query - the Query.CategoryCombo.public DataElement getDataElement(String id)
DataElement.id - the object identifier.DataElement.public List<DataElement> getDataElements(Query query)
DataElement.query - the Query.DataElement.public DataElementGroupSet getDataElementGroupSet(String id)
DataElementGroupSet.id - the object identifier.DataElementGroupSet.public List<DataElementGroupSet> getDataElementGroupSets(Query query)
DataElementGroupSet.query - the Query.DataElementGroupSet.public Program getProgram(String id)
Program.id - the object identifier.Program.public CategoryOptionGroupSet getCategoryOptionGroupSet(String id)
CategoryOptionGroupSet.id - the object identifier.CategoryOptionGroupSet.public List<CategoryOptionGroupSet> getCategoryOptionGroupSets(Query query)
CategoryOptionGroupSet.query - the Query.CategoryOptionGroupSet.public ResponseMessage saveTableHook(TableHook tableHook)
TableHook.tableHook - the object to save.ResponseMessage holding information about the operation.public ResponseMessage updateTableHook(TableHook tableHook)
TableHook.tableHook - the object to update.ResponseMessage holding information about the operation.public TableHook getTableHook(String id)
TableHook.id - the identifier of the table hook.TableHook.public Dimension getDimension(String id)
Dimension.id - the identifier of the dimension.Dimension.public List<PeriodType> getPeriodTypes(Query query)
PeriodType.query - the Query.PeriodType.public DataValueSetResponseMessage saveDataValueSet(DataValueSet dataValueSet)
DataValueSet.dataValueSet - the DataValueSet to save.DataValueSetResponseMessage holding information about the operation.Dhis2ClientException - if the save operation failed due to a client side error.public List<JobNotification> getJobNotifications(JobCategory category, String id)
JobNotification.category - the JobCategory.id - the job identifier.JobNotification.Copyright © 2019 UiO. All rights reserved.