← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13904: Improved ConfigurationController

 

------------------------------------------------------------
revno: 13904
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-01-31 09:50:07 +0200
message:
  Improved ConfigurationController
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ConfigurationController.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-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ConfigurationController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ConfigurationController.java	2014-01-30 17:08:10 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ConfigurationController.java	2014-01-31 07:50:07 +0000
@@ -54,6 +54,20 @@
         return "config";
     }
 
+    @RequestMapping( value = "/feedbackRecipients", method = RequestMethod.GET )
+    private String getFeedbackRecipients(  Model model, HttpServletRequest request )
+    {
+        setModel( model, configurationService.getConfiguration().getFeedbackRecipients() );
+        return "config";
+    }
+    
+    @RequestMapping( value = "/offlineOrganisationUnitLevel", method = RequestMethod.GET )
+    private String getOfflineOrganisationUnitLevel(  Model model, HttpServletRequest request )
+    {
+        setModel( model, configurationService.getConfiguration().getOfflineOrganisationUnitLevel() );
+        return "config";
+    }
+
     @RequestMapping( value = "/infrastructuralDataElements", method = RequestMethod.GET )
     private String getInfrastructuralDataElements( Model model, HttpServletRequest request )
     {
@@ -62,12 +76,26 @@
     }
 
     @RequestMapping( value = "/infrastructuralPeriodType", method = RequestMethod.GET )
-    private String getInfrastructuralPeriodType(  Model model, HttpServletRequest request )
+    private String getInfrastructuralPeriodType( Model model, HttpServletRequest request )
     {
         setModel( model, configurationService.getConfiguration().getInfrastructuralPeriodType() );
         return "config";
     }
-    
+
+    @RequestMapping( value = "/selfRegistrationRole", method = RequestMethod.GET )
+    private String getSelfRegistrationRole( Model model, HttpServletRequest request )
+    {
+        setModel( model, configurationService.getConfiguration().getSelfRegistrationRole() );
+        return "config";
+    }
+
+    @RequestMapping( value = "/selfRegistrationOrgUnit", method = RequestMethod.GET )
+    private String getSelfRegistrationOrgUnit( Model model, HttpServletRequest request )
+    {
+        setModel( model, configurationService.getConfiguration().getSelfRegistrationOrgUnit() );
+        return "config";
+    }
+
     private void setModel( Model model, Object entity )
     {
         model.addAttribute( "model", entity );