1
package org.hisp.dhis.web.webservice.service;
3
import java.util.Collection;
7
import org.hisp.dhis.dataelement.DataElement;
8
import org.hisp.dhis.dataset.DataSet;
9
import org.hisp.dhis.organisationunit.OrganisationUnit;
10
import org.hisp.dhis.web.webservice.model.DataSetIdentifier;
11
import org.hisp.dhis.web.webservice.model.OrgUnitIdentifier;
14
* Interface for DataService used in DHIS Webservice
16
* @author Kristian Haga Karstensen <kristhk@ifi.uio.no>
20
public interface DataService {
23
* Get a Collection of DataElements for a specific DataSet
24
* @param ds - DataSet to get DataElements for
25
* @return Collection of DataElements
27
Collection <DataElement> getDataElementsForSet(DataSet ds);
30
* Get a Set of DataSets for the current logged in user
31
* @return a Set of DataSet
33
Set <DataSet> getDataSetsForUser();
36
* Get the names of the DataSets for the current logged in user
37
* @return List of DataSetIdentifier-objects
39
List<DataSetIdentifier> getDataSetIdentifiersForUser();
42
* Get all the root organisation units
43
* @return Collection of root Org.Units
45
Collection<OrganisationUnit> getRootOrgUnits();
48
* Get the children of a specified OrganisationUnit
49
* @param orgUnitId - the chosen OrganisationUnit
50
* @return Collection of OrganisationUnits (Children)
52
Collection<OrganisationUnit> getChildrenFromOrgUnit(int orgUnitId);
55
* Gets the names and ID's of the root OrganisationUnits
56
* @return List of OrgUnitIdentifiers
58
List<OrgUnitIdentifier> getRootOrgUnitIdentifiers();
61
* Gets the names and ID's of the children OrganisationUnits for a given ID
62
* @return List of OrgUnitIdentifiers (children of the given ID)
64
List<OrgUnitIdentifier> getChildrenOrgUnitIdentifiersFromOrgUnit(int orgUnitId);