dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #37018
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18941: Missing javadoc
------------------------------------------------------------
revno: 18941
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-04-17 16:36:52 +0200
message:
Missing javadoc
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalLevelService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalLevelService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalLevelService.java 2015-04-07 12:03:39 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalLevelService.java 2015-04-17 14:36:52 +0000
@@ -247,5 +247,13 @@
*/
Map<OrganisationUnit, Integer> getUserReadApprovalLevels();
+ /**
+ * Gets a map of organisation units by the given approval level. The organisation
+ * units are the data view organisation units of the current user, or if user
+ * has no data view organisation units then the hierarchy root organisation units.
+ *
+ * @param approvalLevel the approval level.
+ * @return a mapping of organisation units and approval levels.
+ */
Map<OrganisationUnit, Integer> getUserReadApprovalLevels( DataApprovalLevel approvalLevel );
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java 2015-03-26 14:25:02 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java 2015-04-17 14:36:52 +0000
@@ -568,14 +568,14 @@
User user = currentUserService.getCurrentUser();
- Collection<OrganisationUnit> dataViewOrgUnits = user.getDataViewOrganisationUnits();
+ Collection<OrganisationUnit> orgUnits = user.getDataViewOrganisationUnits();
- if ( dataViewOrgUnits == null || dataViewOrgUnits.isEmpty() )
+ if ( orgUnits == null || orgUnits.isEmpty() )
{
- dataViewOrgUnits = organisationUnitService.getRootOrganisationUnits();
+ orgUnits = organisationUnitService.getRootOrganisationUnits();
}
- for ( OrganisationUnit orgUnit : dataViewOrgUnits )
+ for ( OrganisationUnit orgUnit : orgUnits )
{
map.put( orgUnit, approvalLevel.getLevel() );
}