From d0c6606e411f6a0a3e9d8063041109ed947178b7 Mon Sep 17 00:00:00 2001 From: Claudio Bonesana Date: Fri, 3 Dec 2021 10:13:37 +0100 Subject: [PATCH 1/6] Setup for new version 1.6-SNAPSHOT --- AdapQuestBackend/pom.xml | 2 +- AdapQuestExchange/pom.xml | 2 +- AdapQuestExperiments/pom.xml | 2 +- pom.xml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AdapQuestBackend/pom.xml b/AdapQuestBackend/pom.xml index 0049981..6654093 100644 --- a/AdapQuestBackend/pom.xml +++ b/AdapQuestBackend/pom.xml @@ -5,7 +5,7 @@ adapquest ch.idsia.adaptive - 1.5 + 1.6-SNAPSHOT 4.0.0 diff --git a/AdapQuestExchange/pom.xml b/AdapQuestExchange/pom.xml index f83daa1..e2a3b0a 100644 --- a/AdapQuestExchange/pom.xml +++ b/AdapQuestExchange/pom.xml @@ -5,7 +5,7 @@ adapquest ch.idsia.adaptive - 1.5 + 1.6-SNAPSHOT 4.0.0 diff --git a/AdapQuestExperiments/pom.xml b/AdapQuestExperiments/pom.xml index 76d705a..eb31306 100644 --- a/AdapQuestExperiments/pom.xml +++ b/AdapQuestExperiments/pom.xml @@ -5,7 +5,7 @@ adapquest ch.idsia.adaptive - 1.5 + 1.6-SNAPSHOT 4.0.0 diff --git a/pom.xml b/pom.xml index 2f920fc..8f1ebeb 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ ch.idsia.adaptive adapquest pom - 1.5 + 1.6-SNAPSHOT AdapQuestBackend AdapQuestExchange @@ -18,7 +18,7 @@ UTF-8 - 1.5 + 1.6-SNAPSHOT From 017fedfbb3429957ac2828436a0889597e746d52 Mon Sep 17 00:00:00 2001 From: Claudio Bonesana Date: Thu, 9 Dec 2021 13:19:50 +0100 Subject: [PATCH 2/6] Added flag to TemplateXLSX for inhibitor value override. --- .../adaptive.questionnaire.template.xlsx | Bin 30866 -> 31920 bytes .../services/templates/TemplateXLSX.java | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/AdapQuestBackend/data/templates/adaptive.questionnaire.template.xlsx b/AdapQuestBackend/data/templates/adaptive.questionnaire.template.xlsx index cd5db00023845d8097ced6c49fc61832c904ff05..ac62dd98bb12e468e2d9c9e1b2bca762654d2a3a 100644 GIT binary patch delta 5875 zcmZvgby!qe*T9Dv8l;gDk?vAjxhLRXSa_BiANJ@hsDcvO?DTAZ}(vp%R zNPOtM-+SNZe&6|HpS{lB>)Gd=wbyU2wU7rGRc9DfIvNm63J^937X$(^f=EqwV67M+ z(D!O8W-$D*rrW##VH@!bTmVLIUHDaiP$Bc~+-@VKJjt79_9v&d~WOBGd?> zci%wUeG$9|Z7S-Ms2%GSbFYNg&V+FiWyNp1$CYh*YIHkXJG9$N5Y(XFzk>v!GRClG5;9V`=!29=p9!m13ZDR?w6SVQdKd7n_o^ z9ek=P?I=hA8HEI_02%xz8Q>8Ed;)M>hOA_o>e zbDCKViw^KaCr#jpKaikRK2J2{O;V!v68VIqc1aTvw0c&4cRA=I)Yhr0Ibv9*Q)BPN z%5e@n&B#ZvVr%7|f`-1jfq&IET{P*{{ns$RtSn>I91D!QB`X(kn?HXl!vfB=C5&G% zc=^RI(qgTL$H}&OsTR9Ng3rl3acD+v4VBhNHU-106TaI|_kOxQ)iP6tXW8T(crCs> z^-Y^yz7l%~;WUN+;71i z(b+RkQAX`sK2_t>+Dz&K^^kI>Y(rLE_Pd*(7_7rFfKDrl+C9hv2pkE`u;dYaJLPK{?Zyigm>#y91Jny|GrY)*YBz54?C>zA7--G{}eH2x1jZzytKtC?Wc^CDv@jGt5^lB;TL zTRX`j0_XZ87tf&i6ueVZj!mU9U9K6QfwY3VL-Ms8r%S%AZDeDI9PC6(K2Mk78;^PRu8G-v{B(D= z8NH_%@4qHWA2EoF$g?xfWcM%KXBk_!)ifkRm;0iD@@D_?Jq$wej@SrUQ&VmX%zeQA zDm%kzVS&d%YdsEj>xm(8qt5G(n#}$3@%mh9w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ks|vAN!|qHkFz#)@2Z^ ztvN@K4ydb}l~uy#n%`+fJO#TLrp zJ%wotMSaBhQAd~TKCp|u$=E+av7tX6IL>vveGdHYugp8a`lonVY72{8>bk^Hr}B8Q zWFL`8=z`6p^y0c8{`X4VK}-$vc7tShF753ZePtYPXNb4@l3yYDuUhB1oEYgY=UU2s z#g^-y)#ZC1RRnOH)>oV|{8JhMcQH3A#`N02z-J>kP-Y-d!DK8C0Wu5)D#C1f@BqL7 z4s03;05b+{fU%80#h@V=kMN0wbYO9XuH7v>?BR{j-!c5T8)EDpK|ZUFZA2nnq0=If z8dXyX>_Xlbhrq8+l~8a)#8Qdo((Ph5^B*?@nZ`I?`~EK@ zBVF%qY^7I-s&yG%Fc0!?o;@GEt;vX$kY-sqDHdfoJ|ummex%nY^G*hmi7K6Q`iiK6}f_pM7+jpT;sl6-S0;u z^I7N|Xj*E;aPDF2#o7U`rammP65IvUJ8VP8**y%x#eMrrJY#XuX+&~q=z=BN&9Yq^ z%#mHdaDF*A+T3(yz?x6Bj&^r_uf(G~>MYA!_oMXwvFt}E=ERDR)X2PVcae#GhXglP z&D)-~*D)b8sBLWf&;x)gk6zAk*NW?`Y?xmV{;hw79AYRS|9)Knz1})_a{!AEoaNt| z7y<%OUO%w@(`W!aA1OS1Al^p+_MZnf2*mgwlWX*z0zmlE0oy*e!M#-1@IF{g70?Pi(U@|>m8iN8NuA!G10Qctw+OF-QEC5@7 z6afB5YYBYv=Y{frpz#AY1eq#?f1jvGaIs)>~=z*31 z5%7ZZUl{F93iJg)0n{^Q@S5wjN)`3T{qGrE?YyjPt-P$X9ugA$ settings) { final String K_EPS = "EPS"; final String K_INHIBITOR_MAX_VALUE = "INHIBITOR_MAX_VALUE"; final String K_INHIBITOR_MIN_VALUE = "INHIBITOR_MIN_VALUE"; + final String K_INHIBITOR_DEFAULT_VALUE = "INHIBITOR_DEFAULT_VALUE"; + final String K_OVERRIDE_INHIBITOR_VALUE_WITH_DEFAULT = "INHIBITOR_OVERRIDE_VALUE_WITH_DEFAULT"; if (settings.containsKey(K_EPS)) eps = settings.get(K_EPS).getNumericCellValue(); @@ -77,6 +82,10 @@ private void setSettings(Map settings) { INHIBITOR_MAX_VALUE = settings.get(K_INHIBITOR_MAX_VALUE).getNumericCellValue(); if (settings.containsKey(K_INHIBITOR_MIN_VALUE)) INHIBITOR_MIN_VALUE = settings.get(K_INHIBITOR_MIN_VALUE).getNumericCellValue(); + if (settings.containsKey(K_INHIBITOR_DEFAULT_VALUE)) + INHIBITOR_DEFAULT_VALUE = settings.get(K_INHIBITOR_DEFAULT_VALUE).getNumericCellValue(); + if (settings.containsKey(K_OVERRIDE_INHIBITOR_VALUE_WITH_DEFAULT)) + OVERRIDE_INHIBITOR_VALUE_WITH_DEFAULT = settings.get(K_OVERRIDE_INHIBITOR_VALUE_WITH_DEFAULT).getBooleanCellValue(); if (settings.containsKey(ACCESS_CODE)) survey.setAccessCode(settings.get(ACCESS_CODE).toString()); @@ -143,7 +152,12 @@ private void addAnswer(QuestionStructure question, int aid, String text, Map { if (v > 0) { - final double inh = min(INHIBITOR_MAX_VALUE, max(INHIBITOR_MIN_VALUE, 1.0 - v + eps)); + final double inh; + if (OVERRIDE_INHIBITOR_VALUE_WITH_DEFAULT) { + inh = INHIBITOR_DEFAULT_VALUE; + } else { + inh = min(INHIBITOR_MAX_VALUE, max(INHIBITOR_MIN_VALUE, 1.0 - v + eps)); + } parents.add(nameVariables.get(k)); inhibitors.add(inh); question.getSkills().add(k); From 5d675124999beae40597b350f9b91a0bfec522fc Mon Sep 17 00:00:00 2001 From: Claudio Bonesana Date: Tue, 30 Aug 2022 08:20:46 +0200 Subject: [PATCH 3/6] Updated libraries versions in pom files. --- AdapQuestBackend/pom.xml | 30 +++++++++++++++++------------- pom.xml | 21 ++++++++++----------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/AdapQuestBackend/pom.xml b/AdapQuestBackend/pom.xml index 6654093..5157a96 100644 --- a/AdapQuestBackend/pom.xml +++ b/AdapQuestBackend/pom.xml @@ -13,10 +13,6 @@ AdapQuestBackend - - 2.5.5 - - @@ -53,7 +49,15 @@ org.springframework.boot spring-boot-dependencies - ${spring.version} + 2.7.3 + pom + import + + + + org.keycloak.bom + keycloak-adapter-bom + 19.0.1 pom import @@ -119,12 +123,12 @@ org.hibernate hibernate-core - 5.5.7.Final + 5.6.10.Final org.hibernate hibernate-entitymanager - 5.5.7.Final + 5.6.10.Final org.postgresql postgresql - 42.3.1 + 42.5.0 mysql mysql-connector-java - 8.0.25 + 8.0.30 @@ -201,13 +205,13 @@ org.apache.poi poi - 5.0.0 + 5.2.2 org.apache.poi poi-ooxml - 5.0.0 + 5.2.2 - \ No newline at end of file + diff --git a/pom.xml b/pom.xml index 8f1ebeb..0304164 100644 --- a/pom.xml +++ b/pom.xml @@ -43,11 +43,10 @@ - - org.slf4j - slf4j-api - 1.7.32 + ch.qos.logback + logback-classic + 1.2.6 @@ -62,7 +61,7 @@ org.junit.jupiter junit-jupiter - 5.8.1 + 5.9.0 test @@ -70,38 +69,38 @@ com.fasterxml.jackson.core jackson-core - 2.13.0 + 2.13.3 com.fasterxml.jackson.core jackson-databind - 2.13.0 + 2.13.3 com.fasterxml.jackson.core jackson-annotations - 2.13.0 + 2.13.3 com.fasterxml.jackson.dataformat jackson-dataformat-yaml - 2.13.0 + 2.13.3 com.fasterxml.jackson.datatype jackson-datatype-jsr310 - 2.13.0 + 2.13.3 org.projectlombok lombok - 1.18.22 + 1.18.24 provided From 9d298069177606d47b121269699d360252da3171 Mon Sep 17 00:00:00 2001 From: Claudio Bonesana Date: Tue, 30 Aug 2022 08:24:09 +0200 Subject: [PATCH 4/6] Added blockers for not active features. --- .../config/ActiveRoutesInterceptor.java | 42 +++++++++++++++++++ .../adaptive/backend/config/WebConfig.java | 10 +++-- .../persistence/dao/SurveyRepository.java | 2 +- docker-compose.yaml | 8 ++++ 4 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 AdapQuestBackend/src/main/java/ch/idsia/adaptive/backend/config/ActiveRoutesInterceptor.java diff --git a/AdapQuestBackend/src/main/java/ch/idsia/adaptive/backend/config/ActiveRoutesInterceptor.java b/AdapQuestBackend/src/main/java/ch/idsia/adaptive/backend/config/ActiveRoutesInterceptor.java new file mode 100644 index 0000000..ff79774 --- /dev/null +++ b/AdapQuestBackend/src/main/java/ch/idsia/adaptive/backend/config/ActiveRoutesInterceptor.java @@ -0,0 +1,42 @@ +package ch.idsia.adaptive.backend.config; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.servlet.HandlerInterceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class ActiveRoutesInterceptor implements HandlerInterceptor { + private static final Logger logger = LoggerFactory.getLogger(ActiveRoutesInterceptor.class); + + @Value("${adapquest.controller.assistant}") + private boolean assistant = true; + @Value("${adapquest.controller.console}") + private boolean console = true; + @Value("${adapquest.controller.dashboard}") + private boolean dashboard = true; + @Value("${adapquest.controller.demo}") + private boolean demo = true; + @Value("${adapquest.controller.experiments}") + private boolean experiments = true; + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + final String path = request.getServletPath(); + + if (path.contains("/assistant")) + return assistant; + if (path.contains("/console")) + return console; + if (path.contains("/dashboard")) + return dashboard; + if (path.contains("/demo")) + return demo; + if (path.contains("/experiments")) + return experiments; + + return HandlerInterceptor.super.preHandle(request, response, handler); + } +} diff --git a/AdapQuestBackend/src/main/java/ch/idsia/adaptive/backend/config/WebConfig.java b/AdapQuestBackend/src/main/java/ch/idsia/adaptive/backend/config/WebConfig.java index c506900..1c08cc3 100644 --- a/AdapQuestBackend/src/main/java/ch/idsia/adaptive/backend/config/WebConfig.java +++ b/AdapQuestBackend/src/main/java/ch/idsia/adaptive/backend/config/WebConfig.java @@ -2,10 +2,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; -import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.web.servlet.config.annotation.*; /** * Author: Claudio "Dna" Bonesana @@ -34,4 +31,9 @@ public void configureContentNegotiation(ContentNegotiationConfigurer configurer) .defaultContentType(MediaType.APPLICATION_JSON) .mediaType("json", MediaType.APPLICATION_JSON); } + + @Override + public void addInterceptors(final InterceptorRegistry registry) { + registry.addInterceptor(new ActiveRoutesInterceptor()); + } } diff --git a/AdapQuestBackend/src/main/java/ch/idsia/adaptive/backend/persistence/dao/SurveyRepository.java b/AdapQuestBackend/src/main/java/ch/idsia/adaptive/backend/persistence/dao/SurveyRepository.java index e11d834..37c9e61 100644 --- a/AdapQuestBackend/src/main/java/ch/idsia/adaptive/backend/persistence/dao/SurveyRepository.java +++ b/AdapQuestBackend/src/main/java/ch/idsia/adaptive/backend/persistence/dao/SurveyRepository.java @@ -20,6 +20,6 @@ public interface SurveyRepository extends CrudRepository { @Query("SELECT accessCode FROM Survey") Collection findAllAccessCodes(); - @Query("SELECT accessCode FROM Survey WHERE isAdaptive = 1") + @Query("SELECT accessCode FROM Survey WHERE isAdaptive = true") Collection findAllAccessCodesAdaptive(); } diff --git a/docker-compose.yaml b/docker-compose.yaml index daa0397..9f41e5c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -18,12 +18,20 @@ services: context: . environment: MAGIC_API_KEY: "QWRhcHRpdmUgU3VydmV5" + DB_DBMS: "postgresql" DB_HOSTNAME: "db" DB_PORT: "5432" DB_SCHEMA: "adaptive" DB_USERNAME: "ada" DB_PASSWORD: "ada" + + ADAPQUEST_CONTROLLER_ASSISTANT: "false" + ADAPQUEST_CONTROLLER_CONSOLE: "false" + ADAPQUEST_CONTROLLER_DASHBOARD: "false" + ADAPQUEST_CONTROLLER_DEMO: "true" + ADAPQUEST_CONTROLLER_EXPERIMENTS: "false" + restart: unless-stopped ports: - "8080:8080" From 2fd0db3599ceccb2c37059b9b8b844581fac4201 Mon Sep 17 00:00:00 2001 From: Claudio Bonesana Date: Tue, 30 Aug 2022 16:10:43 +0200 Subject: [PATCH 5/6] Added support for Keycloak. --- AdapQuestBackend/pom.xml | 12 +++- .../backend/config/KeycloakConfig.java | 17 +++++ .../backend/config/SecurityConfig.java | 2 + .../config/SecurityKeycloakConfig.java | 62 +++++++++++++++++++ .../backend/controller/HomeController.java | 8 +-- .../backend/controller/SurveyController.java | 5 ++ .../backend/persistence/model/Session.java | 5 ++ .../backend/services/SessionService.java | 46 ++++++++++++-- .../src/main/resources/application.properties | 3 + README.md | 31 +++++++++- docker-compose.yaml | 11 +++- pom.xml | 2 +- 12 files changed, 187 insertions(+), 17 deletions(-) create mode 100644 AdapQuestBackend/src/main/java/ch/idsia/adaptive/backend/config/KeycloakConfig.java create mode 100644 AdapQuestBackend/src/main/java/ch/idsia/adaptive/backend/config/SecurityKeycloakConfig.java diff --git a/AdapQuestBackend/pom.xml b/AdapQuestBackend/pom.xml index 5157a96..1061be4 100644 --- a/AdapQuestBackend/pom.xml +++ b/AdapQuestBackend/pom.xml @@ -1,7 +1,7 @@ + xmlns="http://maven.apache.org/POM/4.0.0" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> adapquest ch.idsia.adaptive @@ -57,7 +57,7 @@ org.keycloak.bom keycloak-adapter-bom - 19.0.1 + 16.1.1 pom import @@ -131,6 +131,12 @@ 5.6.10.Final + + + org.keycloak + keycloak-spring-boot-starter + + From b1082b836b0ea8507550258f12ac3492ebcd1dc5 Mon Sep 17 00:00:00 2001 From: Claudio Bonesana Date: Tue, 30 Aug 2022 16:16:12 +0200 Subject: [PATCH 6/6] Update pom to 1.6. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 75ce59e..85ee8ed 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ ch.idsia.adaptive adapquest pom - 1.6-SNAPSHOT + 1.6 AdapQuestBackend AdapQuestExchange