dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40757
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20727: Web APU, system controller, added api/system/flags and api/system/styles.
------------------------------------------------------------
revno: 20727
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-10-15 17:48:11 +0200
message:
Web APU, system controller, added api/system/flags and api/system/styles.
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemController.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/webapi/controller/SystemController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemController.java 2015-09-14 17:57:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemController.java 2015-10-15 15:48:11 +0000
@@ -39,6 +39,8 @@
import org.hisp.dhis.node.types.SimpleNode;
import org.hisp.dhis.scheduling.TaskCategory;
import org.hisp.dhis.scheduling.TaskId;
+import org.hisp.dhis.setting.StyleManager;
+import org.hisp.dhis.setting.SystemSettingManager;
import org.hisp.dhis.system.SystemInfo;
import org.hisp.dhis.system.SystemService;
import org.hisp.dhis.system.notification.Notification;
@@ -60,6 +62,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import java.util.SortedMap;
import java.util.UUID;
/**
@@ -75,7 +78,13 @@
private CurrentUserService currentUserService;
@Autowired
- private SystemService systemService;
+ private SystemService systemService;
+
+ @Autowired
+ private StyleManager styleManager;
+
+ @Autowired
+ private SystemSettingManager systemSettingManager;
@Autowired
private Notifier notifier;
@@ -188,4 +197,16 @@
{
return "pong";
}
+
+ @RequestMapping( value = "/flags", method = RequestMethod.GET, produces = { "application/json" } )
+ public @ResponseBody List<String> getFlags()
+ {
+ return systemSettingManager.getFlags();
+ }
+
+ @RequestMapping( value = "/styles", method = RequestMethod.GET, produces = { "application/json" } )
+ public @ResponseBody SortedMap<String, String> getStyles()
+ {
+ return styleManager.getStyles();
+ }
}