getConfigurationsForYearMonth(
@PathVariable("yearMonthNumber") String yearMonth) {
- return new ArrayList<>();
+ return service.getConfigurationsForYearMonth(yearMonth);
+ }
+
+ @RequestMapping(value="/{yearMonthNumber}", method={ RequestMethod.POST, RequestMethod.PUT})
+ public void addConfigurationForYearMonth(
+ @PathVariable("yearMonthNumber") String yearMonth,
+ @RequestBody ConfigValue value) {
+
+ service.addConfiguration(yearMonth, value);
+
}
@RequestMapping(value="/{yearMonthNumber}", method=RequestMethod.DELETE)
public void deleteConfigurationsForYearMonth(@PathVariable("yearMonthNumber") String yearMonth) {
- try {
-
- } catch (Exception ex) {
-
- }
+
+ service.removeAllConfigurationsForYearMonth(yearMonth);
}
-
- @RequestMapping(value="/{yearMonthNumber}", method={ RequestMethod.POST, RequestMethod.PUT })
- public void addConfigurationForYearMonth(
+
+ @RequestMapping(value="/{yearMonthNumber}/{configId}", method={ RequestMethod.DELETE})
+ public void deleteConfigurationForYearMonth(
@PathVariable("yearMonthNumber") String yearMonth,
- @RequestBody ConfigValue value) {
+ @PathVariable("configId") int configId) {
+
+ service.removeSingleConfigurationForYearMonth(yearMonth, configId);
}
}
diff --git a/configurationapp/src/main/resources/static/index.html b/configurationapp/src/main/resources/static/index.html
index 7cd14ba..8c66779 100644
--- a/configurationapp/src/main/resources/static/index.html
+++ b/configurationapp/src/main/resources/static/index.html
@@ -2,10 +2,11 @@
Configuration App
-
+
+
Welcome To The Configuration App
@@ -35,7 +36,9 @@ Welcome To The Configuration App
-
+
+
+