Merge branch 'DEVELOP_BE' of ssh://172.18.22.160:29418/oK/PlannedGridMeasures/mics-backend into DEVELOP_BE
diff --git a/src/main/java/org/eclipse/openk/api/BackendSettings.java b/src/main/java/org/eclipse/openk/api/BackendSettings.java
index 9337cf2..5a87a32 100644
--- a/src/main/java/org/eclipse/openk/api/BackendSettings.java
+++ b/src/main/java/org/eclipse/openk/api/BackendSettings.java
@@ -78,6 +78,31 @@
}
}
+ public static class AppointmentRepetition {
+
+ @JsonProperty
+ private Integer id;
+
+ @JsonProperty
+ private String name;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+ }
+
@JsonProperty
private Integer reminderPeriod;
@@ -89,6 +114,9 @@
private BpmnGridConfig bpmnGridConfig;
+ @JsonProperty
+ private AppointmentRepetition[] appointmentRepetition;
+
public Integer getReminderPeriod() {
return reminderPeriod;
}
@@ -112,4 +140,12 @@
public String getEmailTemplateAddressesForNotification() { return emailTemplateAddressesForNotification; }
public void setEmailTemplateAddressesForNotification(String emailTemplateAddressesForNotification) { this.emailTemplateAddressesForNotification = emailTemplateAddressesForNotification; }
+
+ public AppointmentRepetition[] getAppointmentRepetition() {
+ return appointmentRepetition;
+ }
+
+ public void setAppointmentRepetition(AppointmentRepetition[] appointmentRepetition) {
+ this.appointmentRepetition = appointmentRepetition;
+ }
}
diff --git a/src/main/java/org/eclipse/openk/core/controller/InitRabbitMqSetup.java b/src/main/java/org/eclipse/openk/core/controller/InitRabbitMqSetup.java
index a1235aa..05f104a 100644
--- a/src/main/java/org/eclipse/openk/core/controller/InitRabbitMqSetup.java
+++ b/src/main/java/org/eclipse/openk/core/controller/InitRabbitMqSetup.java
@@ -35,6 +35,10 @@
public void init() {
LOGGER.debug("InitRabbitMqSetup called");
RabbitmqConfiguration rabbitmqConfiguration = BackendConfig.getInstance().getRabbitmqConfiguration();
+ if (rabbitmqConfiguration == null) {
+ LOGGER.warn("InitRabbitMqSetup: No RabbitmqConfiguration found!");
+ return;
+ }
if (!rabbitmqConfiguration.isAutoSetup()) {
LOGGER.debug("InitRabbitMqSetup canceled > Autosetup is off");
return;
diff --git a/src/test/java/org/eclipse/openk/api/BackendSettingsTest.java b/src/test/java/org/eclipse/openk/api/BackendSettingsTest.java
index 27ba9bf..31d71f5 100644
--- a/src/test/java/org/eclipse/openk/api/BackendSettingsTest.java
+++ b/src/test/java/org/eclipse/openk/api/BackendSettingsTest.java
@@ -101,6 +101,41 @@
assertEquals(backendSettings.isSkipInWork(), backendSettings2.isSkipInWork());
}
+ ///////////////////////////
+
+
+ @Test
+ public void testGetIdForAppointmentRepetition()throws IOException {
+ BackendSettings.AppointmentRepetition backendSettings = new BackendSettings.AppointmentRepetition();
+ backendSettings.setId(1);
+
+ ObjectMapper om = new ObjectMapper();
+ String jsonString = om.writeValueAsString(backendSettings);
+
+ BackendSettings.AppointmentRepetition backendSettings2 = om.readValue(jsonString, BackendSettings.AppointmentRepetition.class);
+
+ assertEquals(backendSettings.getId(), backendSettings2.getId());
+ }
+
+ @Test
+ public void testGetNameForAppointmentRepetition()throws IOException {
+ BackendSettings.AppointmentRepetition backendSettings = new BackendSettings.AppointmentRepetition();
+ backendSettings.setName("täglich");
+
+ ObjectMapper om = new ObjectMapper();
+ String jsonString = om.writeValueAsString(backendSettings);
+
+ BackendSettings.AppointmentRepetition backendSettings2 = om.readValue(jsonString, BackendSettings.AppointmentRepetition.class);
+
+ assertEquals(backendSettings.getName(), backendSettings2.getName());
+ }
+
+
+ ////////////////////////
+
+
+
+
public static BackendSettings getBackendSettings() {
ResourceLoaderBase loaderBase = new ResourceLoaderBase();
String backendSettingsString = loaderBase.loadFromPath("./backendSettings.json");