From 83f8b636b9e6183ee7295f6115b67d0bee983c70 Mon Sep 17 00:00:00 2001 From: toskrip Date: Tue, 2 Apr 2019 18:21:08 +0200 Subject: [PATCH 01/28] Initial setup for LibreClinica-odm module --- .gitignore | 7 +- .hgignore | 10 - core/pom.xml | 25 +- odm/pom.xml | 76 + odm/src/main/schemas/ODM1-2-1-foundation.xsd | 1826 ++++++++++++ odm/src/main/schemas/ODM1-2-1.xsd | 26 + .../main/schemas/ODM1-3-0-api-foundation.xsd | 2648 +++++++++++++++++ odm/src/main/schemas/ODM1-3-0-api.xsd | 26 + odm/src/main/schemas/ODM1-3-0-foundation.xsd | 2648 +++++++++++++++++ odm/src/main/schemas/ODM1-3-0.xsd | 26 + .../OpenClinica-ODM1-2-1-OC1-foundation.xsd | 261 ++ .../main/schemas/OpenClinica-ODM1-2-1-OC1.xsd | 8 + .../OpenClinica-ODM1-3-0-OC2-0-foundation.xsd | 620 ++++ .../schemas/OpenClinica-ODM1-3-0-OC2-0.xsd | 8 + .../OpenClinica-ODM1-3-0-OC3-0-foundation.xsd | 627 ++++ .../schemas/OpenClinica-ODM1-3-0-OC3-0.xsd | 8 + .../schemas/OpenClinica-ToODM1-2-1-OC1.xsd | 90 + .../schemas/OpenClinica-ToODM1-3-0-OC2-0.xsd | 124 + .../schemas/OpenClinica-ToODM1-3-0-OC3-0.xsd | 133 + odm/src/main/schemas/response.xsd | 29 + odm/src/main/schemas/rules-ODM.xsd | 210 ++ odm/src/main/schemas/rules-test.xsd | 42 + odm/src/main/schemas/xml.xsd | 121 + odm/src/main/schemas/xmldsig-core-schema.xsd | 308 ++ odm/src/main/xjb/binding-customization.xjb | 51 + pom.xml | 7 +- web/pom.xml | 18 +- 27 files changed, 9945 insertions(+), 38 deletions(-) delete mode 100644 .hgignore create mode 100644 odm/pom.xml create mode 100644 odm/src/main/schemas/ODM1-2-1-foundation.xsd create mode 100644 odm/src/main/schemas/ODM1-2-1.xsd create mode 100644 odm/src/main/schemas/ODM1-3-0-api-foundation.xsd create mode 100644 odm/src/main/schemas/ODM1-3-0-api.xsd create mode 100644 odm/src/main/schemas/ODM1-3-0-foundation.xsd create mode 100644 odm/src/main/schemas/ODM1-3-0.xsd create mode 100644 odm/src/main/schemas/OpenClinica-ODM1-2-1-OC1-foundation.xsd create mode 100644 odm/src/main/schemas/OpenClinica-ODM1-2-1-OC1.xsd create mode 100644 odm/src/main/schemas/OpenClinica-ODM1-3-0-OC2-0-foundation.xsd create mode 100644 odm/src/main/schemas/OpenClinica-ODM1-3-0-OC2-0.xsd create mode 100644 odm/src/main/schemas/OpenClinica-ODM1-3-0-OC3-0-foundation.xsd create mode 100644 odm/src/main/schemas/OpenClinica-ODM1-3-0-OC3-0.xsd create mode 100644 odm/src/main/schemas/OpenClinica-ToODM1-2-1-OC1.xsd create mode 100644 odm/src/main/schemas/OpenClinica-ToODM1-3-0-OC2-0.xsd create mode 100644 odm/src/main/schemas/OpenClinica-ToODM1-3-0-OC3-0.xsd create mode 100644 odm/src/main/schemas/response.xsd create mode 100644 odm/src/main/schemas/rules-ODM.xsd create mode 100644 odm/src/main/schemas/rules-test.xsd create mode 100644 odm/src/main/schemas/xml.xsd create mode 100644 odm/src/main/schemas/xmldsig-core-schema.xsd create mode 100644 odm/src/main/xjb/binding-customization.xjb diff --git a/.gitignore b/.gitignore index 582d7e4dcea..916007cf762 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ target/ +odm/src/main/java/ +odm/target/ pom.xml.tag pom.xml.releaseBackup pom.xml.versionsBackup @@ -11,6 +13,7 @@ release.properties OpenClinica.iml web/src/main/resources/datainfo.properties core/*.iml +odm/*.iml web/*.iml ws/*.iml .DS_Store @@ -20,10 +23,6 @@ ws/.DS_Store # git *.orig -/ws/*.iml -/web/OpenClinica-web.iml -/core/OpenClinica-core.iml -/core/OpenClinica-core.iml # netbeans nb-configuration.xml diff --git a/.hgignore b/.hgignore deleted file mode 100644 index 2d08fc4b306..00000000000 --- a/.hgignore +++ /dev/null @@ -1,10 +0,0 @@ -syntax: glob -*target/* -*.project* -*.classpath -*.settings/* -*.externalToolBuilders/* -*.springBeans -*.pmd -.idea/* -*.iml diff --git a/core/pom.xml b/core/pom.xml index df8ea0aff15..ba11308fc11 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -231,10 +231,11 @@ 1.4 - org.akaza.openclinica.odm - openclinica-odm + org.libreclinica.odm + LibreClinica-odm + 2.2 - + org.mvel mvel2 2.0.19 @@ -254,16 +255,16 @@ - org.codehaus.jackson - jackson-core-lgpl - 1.8.1 - + org.codehaus.jackson + jackson-core-lgpl + 1.8.1 + - - org.codehaus.jackson - jackson-mapper-lgpl - 1.8.1 - + + org.codehaus.jackson + jackson-mapper-lgpl + 1.8.1 + diff --git a/odm/pom.xml b/odm/pom.xml new file mode 100644 index 00000000000..6e0fd04016f --- /dev/null +++ b/odm/pom.xml @@ -0,0 +1,76 @@ + + + 4.0.0 + org.libreclinica.odm + LibreClinica-odm + jar + 2.2 + LibreClinica ODM + + UTF-8 + + + + + + + org.codehaus.mojo + jaxb2-maven-plugin + 2.3 + + + schemas-generate + + xjc + + + src/main/schemas + src/main/java + src/main/xjb + src/main/xjb/binding-customization.xjb + false + + src/main/schemas + + + + + + + + org.codehaus.mojo + properties-maven-plugin + 1.0.0 + + + set-additional-system-properties + + set-system-properties + + + + + + + javax.xml.accessExternalSchema + all + + + javax.xml.accessExternalDTD + all + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.1 + + 1.8 + 1.8 + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/ODM1-2-1-foundation.xsd b/odm/src/main/schemas/ODM1-2-1-foundation.xsd new file mode 100644 index 00000000000..2fe36509943 --- /dev/null +++ b/odm/src/main/schemas/ODM1-2-1-foundation.xsd @@ -0,0 +1,1826 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/ODM1-2-1.xsd b/odm/src/main/schemas/ODM1-2-1.xsd new file mode 100644 index 00000000000..dc5daa49e07 --- /dev/null +++ b/odm/src/main/schemas/ODM1-2-1.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/ODM1-3-0-api-foundation.xsd b/odm/src/main/schemas/ODM1-3-0-api-foundation.xsd new file mode 100644 index 00000000000..05db35a64c1 --- /dev/null +++ b/odm/src/main/schemas/ODM1-3-0-api-foundation.xsd @@ -0,0 +1,2648 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/ODM1-3-0-api.xsd b/odm/src/main/schemas/ODM1-3-0-api.xsd new file mode 100644 index 00000000000..224f7f6e28f --- /dev/null +++ b/odm/src/main/schemas/ODM1-3-0-api.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/ODM1-3-0-foundation.xsd b/odm/src/main/schemas/ODM1-3-0-foundation.xsd new file mode 100644 index 00000000000..c0cb6471b8d --- /dev/null +++ b/odm/src/main/schemas/ODM1-3-0-foundation.xsd @@ -0,0 +1,2648 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/ODM1-3-0.xsd b/odm/src/main/schemas/ODM1-3-0.xsd new file mode 100644 index 00000000000..6afd157667c --- /dev/null +++ b/odm/src/main/schemas/ODM1-3-0.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/OpenClinica-ODM1-2-1-OC1-foundation.xsd b/odm/src/main/schemas/OpenClinica-ODM1-2-1-OC1-foundation.xsd new file mode 100644 index 00000000000..59c4a1234f3 --- /dev/null +++ b/odm/src/main/schemas/OpenClinica-ODM1-2-1-OC1-foundation.xsd @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/OpenClinica-ODM1-2-1-OC1.xsd b/odm/src/main/schemas/OpenClinica-ODM1-2-1-OC1.xsd new file mode 100644 index 00000000000..50f7a636b65 --- /dev/null +++ b/odm/src/main/schemas/OpenClinica-ODM1-2-1-OC1.xsd @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/OpenClinica-ODM1-3-0-OC2-0-foundation.xsd b/odm/src/main/schemas/OpenClinica-ODM1-3-0-OC2-0-foundation.xsd new file mode 100644 index 00000000000..9f74a177762 --- /dev/null +++ b/odm/src/main/schemas/OpenClinica-ODM1-3-0-OC2-0-foundation.xsd @@ -0,0 +1,620 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/OpenClinica-ODM1-3-0-OC2-0.xsd b/odm/src/main/schemas/OpenClinica-ODM1-3-0-OC2-0.xsd new file mode 100644 index 00000000000..f8f0255e22c --- /dev/null +++ b/odm/src/main/schemas/OpenClinica-ODM1-3-0-OC2-0.xsd @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/OpenClinica-ODM1-3-0-OC3-0-foundation.xsd b/odm/src/main/schemas/OpenClinica-ODM1-3-0-OC3-0-foundation.xsd new file mode 100644 index 00000000000..966c43b3400 --- /dev/null +++ b/odm/src/main/schemas/OpenClinica-ODM1-3-0-OC3-0-foundation.xsd @@ -0,0 +1,627 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/OpenClinica-ODM1-3-0-OC3-0.xsd b/odm/src/main/schemas/OpenClinica-ODM1-3-0-OC3-0.xsd new file mode 100644 index 00000000000..87f515dd7d5 --- /dev/null +++ b/odm/src/main/schemas/OpenClinica-ODM1-3-0-OC3-0.xsd @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/OpenClinica-ToODM1-2-1-OC1.xsd b/odm/src/main/schemas/OpenClinica-ToODM1-2-1-OC1.xsd new file mode 100644 index 00000000000..c8ef4f8cd39 --- /dev/null +++ b/odm/src/main/schemas/OpenClinica-ToODM1-2-1-OC1.xsd @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/OpenClinica-ToODM1-3-0-OC2-0.xsd b/odm/src/main/schemas/OpenClinica-ToODM1-3-0-OC2-0.xsd new file mode 100644 index 00000000000..23c00a19ddd --- /dev/null +++ b/odm/src/main/schemas/OpenClinica-ToODM1-3-0-OC2-0.xsd @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odm/src/main/schemas/OpenClinica-ToODM1-3-0-OC3-0.xsd b/odm/src/main/schemas/OpenClinica-ToODM1-3-0-OC3-0.xsd new file mode 100644 index 00000000000..0059b689138 --- /dev/null +++ b/odm/src/main/schemas/OpenClinica-ToODM1-3-0-OC3-0.xsd @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odm/src/main/schemas/response.xsd b/odm/src/main/schemas/response.xsd new file mode 100644 index 00000000000..040fe613a2d --- /dev/null +++ b/odm/src/main/schemas/response.xsd @@ -0,0 +1,29 @@ + + + + + + + The top level root element. Allows the definition of default values + for all nested bean definitions. + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/rules-ODM.xsd b/odm/src/main/schemas/rules-ODM.xsd new file mode 100644 index 00000000000..de96d65ed58 --- /dev/null +++ b/odm/src/main/schemas/rules-ODM.xsd @@ -0,0 +1,210 @@ + + + + + + + The top level root element. Allows the definition of default values + for all nested bean definitions. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/rules-test.xsd b/odm/src/main/schemas/rules-test.xsd new file mode 100644 index 00000000000..9b4f711d056 --- /dev/null +++ b/odm/src/main/schemas/rules-test.xsd @@ -0,0 +1,42 @@ + + + + + + + + The top level root element. Allows the definition of default values + for all nested bean definitions. + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/xml.xsd b/odm/src/main/schemas/xml.xsd new file mode 100644 index 00000000000..e148c89a04c --- /dev/null +++ b/odm/src/main/schemas/xml.xsd @@ -0,0 +1,121 @@ + + + + + + See http://www.w3.org/XML/1998/namespace.html and + http://www.w3.org/TR/REC-xml for information about this namespace. + + This schema document describes the XML namespace, in a form + suitable for import by other schema documents. + + Note that local names in this namespace are intended to be defined + only by the World Wide Web Consortium or its subgroups. The + following names are currently defined in this namespace and should + not be used with conflicting semantics by any Working Group, + specification, or document instance: + + base (as an attribute name): denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification. + + lang (as an attribute name): denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification. + + space (as an attribute name): denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification. + + Father (in any context at all): denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: + + In appreciation for his vision, leadership and dedication + the W3C XML Plenary on this 10th day of February, 2000 + reserves for Jon Bosak in perpetuity the XML name + xml:Father + + + + + This schema defines attributes and an attribute group + suitable for use by + schemas wishing to allow xml:base, xml:lang or xml:space attributes + on elements they define. + + To enable this, such a schema must import this schema + for the XML namespace, e.g. as follows: + <schema . . .> + . . . + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2001/03/xml.xsd"/> + + Subsequently, qualified reference to any of the attributes + or the group defined below will have the desired effect, e.g. + + <type . . .> + . . . + <attributeGroup ref="xml:specialAttrs"/> + + will define a type which will schema-validate an instance + element with any of those attributes + + + + In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + http://www.w3.org/2001/03/xml.xsd. + At the date of issue it can also be found at + http://www.w3.org/2001/xml.xsd. + The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML Schema + itself. In other words, if the XML Schema namespace changes, the version + of this document at + http://www.w3.org/2001/xml.xsd will change + accordingly; the version at + http://www.w3.org/2001/03/xml.xsd will not change. + + + + + + In due course, we should install the relevant ISO 2- and 3-letter + codes as the enumerated possible values . . . + + + + + + + + + + + + + + + + See http://www.w3.org/TR/xmlbase/ for + information about this attribute. + + + + + + \ No newline at end of file diff --git a/odm/src/main/schemas/xmldsig-core-schema.xsd b/odm/src/main/schemas/xmldsig-core-schema.xsd new file mode 100644 index 00000000000..bcbf4ef1e16 --- /dev/null +++ b/odm/src/main/schemas/xmldsig-core-schema.xsd @@ -0,0 +1,308 @@ + + + + + + ]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/odm/src/main/xjb/binding-customization.xjb b/odm/src/main/xjb/binding-customization.xjb new file mode 100644 index 00000000000..d87bce28ade --- /dev/null +++ b/odm/src/main/xjb/binding-customization.xjb @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 49a1b46b5e9..9967096fe78 100644 --- a/pom.xml +++ b/pom.xml @@ -9,6 +9,7 @@ OpenClinica + odm core web ws @@ -22,7 +23,7 @@ UTF-8 - git://github.com/OpenClinica/OpenClinica.git + git://github.com/reliatec-gmbh/LibreClinica src/main/resources/datainfo.properties @@ -94,8 +95,8 @@ 2.4.2-oc - org.akaza.openclinica.odm - openclinica-odm + org.libreclinica.odm + LibreClinica-odm 2.2 diff --git a/web/pom.xml b/web/pom.xml index 018e371ae3b..929ea48ccfd 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -337,16 +337,16 @@ - org.codehaus.jackson - jackson-core-lgpl - 1.8.1 - + org.codehaus.jackson + jackson-core-lgpl + 1.8.1 + - - org.codehaus.jackson - jackson-mapper-lgpl - 1.8.1 - + + org.codehaus.jackson + jackson-mapper-lgpl + 1.8.1 + From 86e0247f8c2ee0950189098f5d9329951adbe847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Tue, 16 Apr 2019 17:38:59 +0200 Subject: [PATCH 02/28] issue 9: updated commons-fileupload from 1.2 to 1.3.3 --- core/pom.xml | 2 -- pom.xml | 10 ++++++++++ web/pom.xml | 2 -- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index 5dc2cc8fb21..3ffd0a03014 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -125,13 +125,11 @@ commons-fileupload commons-fileupload - 1.2.1 compile commons-io commons-io - 1.4 compile diff --git a/pom.xml b/pom.xml index 264beaf8d3b..ad90816fb91 100644 --- a/pom.xml +++ b/pom.xml @@ -122,6 +122,16 @@ com.fasterxml.jackson.core jackson-databind 2.9.8 + + + commons-fileupload + commons-fileupload + 1.3.3 + + + commons-io + commons-io + 2.5 diff --git a/web/pom.xml b/web/pom.xml index dd8533e3332..8ba94f07848 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -181,13 +181,11 @@ commons-fileupload commons-fileupload - 1.2.1 compile commons-io commons-io - 1.4 compile From 265b146f40e5d8ad3d885ff1fa714255726fe10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Tue, 16 Apr 2019 17:52:46 +0200 Subject: [PATCH 03/28] issue 9: updated commons-fileupload from 1.2 to 1.3.3 --- ws/pom.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/ws/pom.xml b/ws/pom.xml index f7951ceb8fd..43098c63bea 100644 --- a/ws/pom.xml +++ b/ws/pom.xml @@ -165,13 +165,11 @@ commons-fileupload commons-fileupload - 1.2.1 compile commons-io commons-io - 1.4 compile From 4b5f587c93e3564bb116c8f71e1d919266734f40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Thu, 9 May 2019 14:56:22 +0200 Subject: [PATCH 04/28] added database changes for the quartz scheduler to the liquibase migration script --- .../migration/lc-1.0.0/update_to_spring5.xml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/core/src/main/resources/migration/lc-1.0.0/update_to_spring5.xml b/core/src/main/resources/migration/lc-1.0.0/update_to_spring5.xml index 40b1f53646a..270be71ae27 100644 --- a/core/src/main/resources/migration/lc-1.0.0/update_to_spring5.xml +++ b/core/src/main/resources/migration/lc-1.0.0/update_to_spring5.xml @@ -67,4 +67,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From e3d38d531c026a7fe1f75761affc6288add22c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Thu, 9 May 2019 14:59:12 +0200 Subject: [PATCH 05/28] since the library updates the export didn't worked and this fixes the errors during the export --- .../java/org/akaza/openclinica/domain/rule/RuleSetRuleBean.java | 1 - .../java/org/akaza/openclinica/controller/ExtractController.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/akaza/openclinica/domain/rule/RuleSetRuleBean.java b/core/src/main/java/org/akaza/openclinica/domain/rule/RuleSetRuleBean.java index 5657312c5ba..f20cd1dfcc1 100644 --- a/core/src/main/java/org/akaza/openclinica/domain/rule/RuleSetRuleBean.java +++ b/core/src/main/java/org/akaza/openclinica/domain/rule/RuleSetRuleBean.java @@ -44,7 +44,6 @@ @Entity @Table(name = "rule_set_rule") @GenericGenerator(name = "id-generator", strategy = "native", parameters = { @Parameter(name = "sequence_name", value = "rule_set_rule_id_seq") }) -@Cache(usage = CacheConcurrencyStrategy.READ_WRITE) public class RuleSetRuleBean extends AbstractAuditableMutableDomainObject implements Serializable { RuleSetBean ruleSetBean; diff --git a/web/src/main/java/org/akaza/openclinica/controller/ExtractController.java b/web/src/main/java/org/akaza/openclinica/controller/ExtractController.java index 2331a6e9250..9bb5d083fd7 100644 --- a/web/src/main/java/org/akaza/openclinica/controller/ExtractController.java +++ b/web/src/main/java/org/akaza/openclinica/controller/ExtractController.java @@ -167,6 +167,7 @@ public ModelMap processSubmit(@RequestParam("id") String id, jobDetailBean.setJobClass(org.akaza.openclinica.job.XsltStatefulJob.class); jobDetailBean.setJobDataMap(simpleTrigger.getJobDataMap()); jobDetailBean.setDurability(true); // need durability? YES - we will want to see if it's finished + jobDetailBean.afterPropertiesSet(); // fixes the job details and initializes the job detail object property try { Date dateStart = scheduler.scheduleJob(jobDetailBean.getObject(), simpleTrigger); From e3b45af47ebf34dfbb5c47ec42430eaaa64f81dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Tue, 14 May 2019 14:53:26 +0200 Subject: [PATCH 06/28] updated XslTTransformJob to use saxon instead of xalan for the export xslt transformation --- core/pom.xml | 8 ++++ .../openclinica/job/XsltTransformJob.java | 2 +- pom.xml | 48 +++++++++++-------- 3 files changed, 38 insertions(+), 20 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index 5dc2cc8fb21..d6f506c6a2d 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -264,6 +264,14 @@ jackson-mapper-lgpl 1.8.1 + + net.sf.saxon + saxon + + + net.sf.saxon + saxon-dom + diff --git a/core/src/main/java/org/akaza/openclinica/job/XsltTransformJob.java b/core/src/main/java/org/akaza/openclinica/job/XsltTransformJob.java index 13fecd618eb..5422cfbd412 100644 --- a/core/src/main/java/org/akaza/openclinica/job/XsltTransformJob.java +++ b/core/src/main/java/org/akaza/openclinica/job/XsltTransformJob.java @@ -100,7 +100,7 @@ public class XsltTransformJob extends QuartzJobBean { private AuditEventDAO auditEventDAO; private DatasetDAO datasetDao; - private final TransformerFactory transformerFactory = TransformerFactory.newInstance(); + private final TransformerFactory transformerFactory = new net.sf.saxon.TransformerFactoryImpl(); // POST PROCESSING VARIABLES public static final String POST_PROC_DELETE_OLD = "postProcDeleteOld"; diff --git a/pom.xml b/pom.xml index 264beaf8d3b..ecc8a443d41 100644 --- a/pom.xml +++ b/pom.xml @@ -123,6 +123,16 @@ jackson-databind 2.9.8 + + net.sf.saxon + saxon + 8.7 + + + net.sf.saxon + saxon-dom + 8.7 + @@ -366,25 +376,25 @@ 1.8.3 - io.dropwizard.metrics - metrics-core - 3.1.2 - - - io.dropwizard.metrics - metrics-healthchecks - 3.1.0 - - - io.dropwizard.metrics - metrics-jvm - 3.1.2 - - - org.apache.httpcomponents - httpclient - 4.5.7 - + io.dropwizard.metrics + metrics-core + 3.1.2 + + + io.dropwizard.metrics + metrics-healthchecks + 3.1.0 + + + io.dropwizard.metrics + metrics-jvm + 3.1.2 + + + org.apache.httpcomponents + httpclient + 4.5.7 + From 290160aeb3b7f1179cedbf5521b252562d66e1fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Tue, 21 May 2019 16:25:08 +0200 Subject: [PATCH 07/28] fixed 'changeLogCreateTables.xml' liquibase script to detect if the used postgres version is 9.0 or greater --- core/src/main/resources/migration/2.5/changeLogCreateTables.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/migration/2.5/changeLogCreateTables.xml b/core/src/main/resources/migration/2.5/changeLogCreateTables.xml index bc0ded3aac7..4e9c5afc1d7 100755 --- a/core/src/main/resources/migration/2.5/changeLogCreateTables.xml +++ b/core/src/main/resources/migration/2.5/changeLogCreateTables.xml @@ -5,7 +5,7 @@ 30d56b8377711e93debdac333aa217d - + DROP LANGUAGE IF EXISTS plpgsql; From 3a7e2257fb23f5b0d3617fcf5f5ceb5c8d6d7aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Thu, 23 May 2019 10:57:34 +0200 Subject: [PATCH 08/28] send message 'is ub a ldapuser??' to the logger at DEBUG level --- .../java/org/akaza/openclinica/control/MainMenuServlet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/main/java/org/akaza/openclinica/control/MainMenuServlet.java b/web/src/main/java/org/akaza/openclinica/control/MainMenuServlet.java index a8c1544c3a5..051eb448c9b 100755 --- a/web/src/main/java/org/akaza/openclinica/control/MainMenuServlet.java +++ b/web/src/main/java/org/akaza/openclinica/control/MainMenuServlet.java @@ -116,7 +116,7 @@ public void processRequest() throws Exception { // "Forge" a password change date for LDAP user lastPwdChangeDate = new Date(); } -System.out.println("is ub a ldapuser??"+ub.isLdapUser()); + logger.debug("is ub a ldapuser??"+ub.isLdapUser()); //@pgawade 18-Sep-2012: fix for issue #14506 (https://issuetracker.openclinica.com/view.php?id=14506#c58197) From 7035e367d948c34beac041d603fc50c8d7c62747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Fri, 24 May 2019 17:47:34 +0200 Subject: [PATCH 09/28] fixed issue #15 UpdateSubStudyServlet to persist all changed values --- .../managestudy/CreateSubStudyServlet.java | 100 ++++++++---------- .../managestudy/UpdateSubStudyServlet.java | 44 ++------ 2 files changed, 54 insertions(+), 90 deletions(-) diff --git a/web/src/main/java/org/akaza/openclinica/control/managestudy/CreateSubStudyServlet.java b/web/src/main/java/org/akaza/openclinica/control/managestudy/CreateSubStudyServlet.java index e9596ef10eb..7d91220d3bf 100755 --- a/web/src/main/java/org/akaza/openclinica/control/managestudy/CreateSubStudyServlet.java +++ b/web/src/main/java/org/akaza/openclinica/control/managestudy/CreateSubStudyServlet.java @@ -181,6 +181,9 @@ public void processRequest() throws Exception { } else { if ("confirm".equalsIgnoreCase(action)) { + // reset the event StudyEventDefinitionBeans, otherwise the changes won't be recognized propably + StudyBean newStudy = (StudyBean) session.getAttribute("newStudy"); + session.setAttribute("definitions", this.initDefinitions(newStudy)); confirmStudy(); } else if ("back".equalsIgnoreCase(action)) { @@ -576,65 +579,54 @@ private ArrayList createSiteEventDefinitions(StudyBean // only if definition-crf has been modified, will it be // saved for the site int defaultId = defaultVersionId > 0 ? defaultVersionId : edcBean.getDefaultVersionId(); - if (defaultId == defaultVersionId) { - if (isRequired == edcBean.isRequiredCRF()) { - if (isDouble == edcBean.isDoubleEntry()) { - if (hasPassword == edcBean.isElectronicSignature()) { - if (isHide == edcBean.isHideCrf()) { - if (submissionUrl.equals("")) { - - if (selectedVersionIdListSize > 0) { - if (selectedVersionIdListSize == edcBean.getVersions().size()) { - if (sdvId > 0) { - if (sdvId != edcBean.getSourceDataVerification().getCode()) { - changed = true; - edcBean.setSourceDataVerification(SourceDataVerification.getByCode(sdvId)); - edcBean.setSubmissionUrl(submissionUrl); - } - } - } else { - changed = true; - String[] ids = selectedVersionIds.split(","); - ArrayList idList = new ArrayList(); - for (String id : ids) { - idList.add(Integer.valueOf(id)); - } - edcBean.setSelectedVersionIdList(idList); - edcBean.setSelectedVersionIds(selectedVersionIds); - edcBean.setSubmissionUrl(submissionUrl); - - } - } - } else { - changed = true; - edcBean.setSubmissionUrl(submissionUrl); - } - } else { - changed = true; - edcBean.setHideCrf(isHide); - edcBean.setSubmissionUrl(submissionUrl); - } - } else { - changed = true; - edcBean.setElectronicSignature(hasPassword); - edcBean.setSubmissionUrl(submissionUrl); - } - } else { - changed = true; - edcBean.setDoubleEntry(isDouble); - edcBean.setSubmissionUrl(submissionUrl); - } - } else { - changed = true; - edcBean.setRequiredCRF(isRequired); - edcBean.setSubmissionUrl(submissionUrl); - } - } else { + if (defaultId != defaultVersionId) { changed = true; CRFVersionBean defaultVersion = (CRFVersionBean) cvdao.findByPK(defaultVersionId); edcBean.setDefaultVersionId(defaultVersionId); edcBean.setDefaultVersionName(defaultVersion.getName()); } + if (isRequired != edcBean.isRequiredCRF()) { + changed = true; + edcBean.setRequiredCRF(isRequired); + edcBean.setSubmissionUrl(submissionUrl); + } + if (isDouble != edcBean.isDoubleEntry()) { + changed = true; + edcBean.setDoubleEntry(isDouble); + edcBean.setSubmissionUrl(submissionUrl); + } + if (hasPassword != edcBean.isElectronicSignature()) { + changed = true; + edcBean.setElectronicSignature(hasPassword); + edcBean.setSubmissionUrl(submissionUrl); + } + if (isHide != edcBean.isHideCrf()) { + changed = true; + edcBean.setHideCrf(isHide); + edcBean.setSubmissionUrl(submissionUrl); + } + if (!submissionUrl.equals("")) { + changed = true; + edcBean.setSubmissionUrl(submissionUrl); + } + if (sdvId > 0 && sdvId != edcBean.getSourceDataVerification().getCode()) { + changed = true; + edcBean.setSourceDataVerification(SourceDataVerification.getByCode(sdvId)); + edcBean.setSubmissionUrl(submissionUrl); + } + if (selectedVersionIdListSize > 0 + && selectedVersionIdListSize != edcBean.getVersions().size()) { + changed = true; + String[] ids = selectedVersionIds.split(","); + ArrayList idList = new ArrayList(); + for (String id : ids) { + idList.add(Integer.valueOf(id)); + } + edcBean.setSelectedVersionIdList(idList); + edcBean.setSelectedVersionIds(selectedVersionIds); + edcBean.setSubmissionUrl(submissionUrl); + + } } changes.put(sed.getId() + "-" + edcBean.getId(), changed); ++start; diff --git a/web/src/main/java/org/akaza/openclinica/control/managestudy/UpdateSubStudyServlet.java b/web/src/main/java/org/akaza/openclinica/control/managestudy/UpdateSubStudyServlet.java index 0122ac0d166..30221fd317b 100755 --- a/web/src/main/java/org/akaza/openclinica/control/managestudy/UpdateSubStudyServlet.java +++ b/web/src/main/java/org/akaza/openclinica/control/managestudy/UpdateSubStudyServlet.java @@ -442,42 +442,14 @@ private void submitSiteEventDefinitions(StudyBean site) throws MalformedURLExcep // saved for the site int defaultId = defaultVersionId > 0 ? defaultVersionId : edcBean.getDefaultVersionId(); int dbDefaultVersionId = edcBean.getDefaultVersionId(); - if (defaultId == dbDefaultVersionId) { - if (isRequired == edcBean.isRequiredCRF()) { - if (isDouble == edcBean.isDoubleEntry()) { - if (hasPassword == edcBean.isElectronicSignature()) { - if (isHide == edcBean.isHideCrf()) { - if (submissionUrl.equals("")) { - - if (selectedVersionIdListSize > 0) { - if (selectedVersionIdListSize == edcBean.getVersions().size()) { - if (sdvId > 0) { - if (sdvId != edcBean.getSourceDataVerification().getCode()) { - changed = true; - } - } - } else { - changed = true; - } - } - } else { - changed = true; - } - } else { - changed = true; - } - } else { - changed = true; - } - } else { - changed = true; - } - } else { - changed = true; - } - } else { - changed = true; - } + changed = changed || (defaultId != dbDefaultVersionId); + changed = changed || (isRequired != edcBean.isRequiredCRF()); + changed = changed || (isDouble != edcBean.isDoubleEntry()); + changed = changed || (hasPassword != edcBean.isElectronicSignature()); + changed = changed || (isHide != edcBean.isHideCrf()); + changed = changed || (!submissionUrl.equals("")); + changed = changed || (selectedVersionIdListSize > 0 && selectedVersionIdListSize != edcBean.getVersions().size()); + changed = changed || (sdvId > 0 && sdvId != edcBean.getSourceDataVerification().getCode()); if (changed) { CRFVersionBean defaultVersion = (CRFVersionBean) cvdao.findByPK(defaultId); From ad8b21bad0f1d128a3b59f46e21aff769af1dd7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Fri, 24 May 2019 17:58:42 +0200 Subject: [PATCH 10/28] removed duplicate loadings of 'global_functions_javascript.js' and 'instant_onchange.js' --- .../main/webapp/WEB-INF/jsp/submit/administrativeEditing.jsp | 1 + .../main/webapp/WEB-INF/jsp/submit/initialDataEntryNw.jsp | 4 +++- .../main/webapp/WEB-INF/jsp/submit/showGroupItemInput.jsp | 1 - web/src/main/webapp/WEB-INF/jsp/submit/showItemInput.jsp | 5 ----- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/web/src/main/webapp/WEB-INF/jsp/submit/administrativeEditing.jsp b/web/src/main/webapp/WEB-INF/jsp/submit/administrativeEditing.jsp index a5c6f1900a2..3a938d4b7fc 100755 --- a/web/src/main/webapp/WEB-INF/jsp/submit/administrativeEditing.jsp +++ b/web/src/main/webapp/WEB-INF/jsp/submit/administrativeEditing.jsp @@ -28,6 +28,7 @@ + diff --git a/web/src/main/webapp/WEB-INF/jsp/submit/initialDataEntryNw.jsp b/web/src/main/webapp/WEB-INF/jsp/submit/initialDataEntryNw.jsp index d46f0e4299c..115fa815e86 100644 --- a/web/src/main/webapp/WEB-INF/jsp/submit/initialDataEntryNw.jsp +++ b/web/src/main/webapp/WEB-INF/jsp/submit/initialDataEntryNw.jsp @@ -36,6 +36,7 @@ var checkboxObject; + - + + diff --git a/web/src/main/webapp/WEB-INF/jsp/submit/showGroupItemInput.jsp b/web/src/main/webapp/WEB-INF/jsp/submit/showGroupItemInput.jsp index 08b97609bfe..8a37e2026a6 100644 --- a/web/src/main/webapp/WEB-INF/jsp/submit/showGroupItemInput.jsp +++ b/web/src/main/webapp/WEB-INF/jsp/submit/showGroupItemInput.jsp @@ -10,7 +10,6 @@ - - - - - <%-- A way to deal with the lack of 'break' out of forEach loop--%> From 474301e3445a3d5affb89818d5af1cad1c98e59a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Tue, 28 May 2019 09:50:19 +0200 Subject: [PATCH 11/28] 'Notes & Discrepancies Assigned to Me' calculation fixed --- .../java/org/akaza/openclinica/control/MainMenuServlet.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/src/main/java/org/akaza/openclinica/control/MainMenuServlet.java b/web/src/main/java/org/akaza/openclinica/control/MainMenuServlet.java index 051eb448c9b..848e5515727 100755 --- a/web/src/main/java/org/akaza/openclinica/control/MainMenuServlet.java +++ b/web/src/main/java/org/akaza/openclinica/control/MainMenuServlet.java @@ -171,7 +171,11 @@ public void processRequest() throws Exception { //Integer assignedDiscrepancies = getDiscrepancyNoteDAO().getViewNotesCountWithFilter(" AND dn.assigned_user_id =" // + ub.getId() + " AND (dn.resolution_status_id=1 OR dn.resolution_status_id=2 OR dn.resolution_status_id=3)", currentStudy); //Yufang code added by Jamuna, to optimize the query on MainMenu - Integer assignedDiscrepancies = getDiscrepancyNoteDAO().getViewNotesCountWithFilter(ub.getId(), currentStudy.getId()); + Integer assignedDiscrepancies = getDiscrepancyNoteDAO().getViewNotesCountWithFilter( + " AND dn.assigned_user_id =" + +ub.getId() + + " AND (dn.resolution_status_id=1 OR dn.resolution_status_id=2 OR dn.resolution_status_id=3)", + currentStudy); + request.setAttribute("assignedDiscrepancies", assignedDiscrepancies == null ? 0 : assignedDiscrepancies); int parentStudyId = currentStudy.getParentStudyId()>0?currentStudy.getParentStudyId():currentStudy.getId(); From 19eaeff917d45c83945e2d5ae458d6fee731daad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Tue, 28 May 2019 14:52:08 +0200 Subject: [PATCH 12/28] dn of crfs with state 'initial data entry' will be opened in edit mode --- .../ResolveDiscrepancyServlet.java | 11 +++++++++-- .../ViewSectionDataEntryServlet.java | 19 ++++++++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/web/src/main/java/org/akaza/openclinica/control/managestudy/ResolveDiscrepancyServlet.java b/web/src/main/java/org/akaza/openclinica/control/managestudy/ResolveDiscrepancyServlet.java index 10aaa6251c5..3afeee36365 100755 --- a/web/src/main/java/org/akaza/openclinica/control/managestudy/ResolveDiscrepancyServlet.java +++ b/web/src/main/java/org/akaza/openclinica/control/managestudy/ResolveDiscrepancyServlet.java @@ -61,6 +61,8 @@ public class ResolveDiscrepancyServlet extends SecureController { private static final String RESOLVING_NOTE = "resolving_note"; private static final String RETURN_FROM_PROCESS_REQUEST = "returnFromProcess"; + + public static final String ATTR_RESOLVE_DN = "resolveDiscrepancy"; public Page getPageForForwarding(DiscrepancyNoteBean note, boolean isCompleted) { String entityType = note.getEntityType().toLowerCase(); @@ -93,9 +95,11 @@ public Page getPageForForwarding(DiscrepancyNoteBean note, boolean isCompleted) } // UpdateStudyEvent?event_id=12&ss_id=12 } else if ("itemdata".equalsIgnoreCase(entityType) || "eventcrf".equalsIgnoreCase(entityType)) { - if (currentRole.getRole().equals(Role.MONITOR) || !isCompleted) { + if (currentRole.getRole().equals(Role.MONITOR)) { return Page.VIEW_SECTION_DATA_ENTRY_SERVLET; // ViewSectionDataEntry?eventDefinitionCRFId=&ecId=1&tabId=1&studySubjectId=1 + } else if(!isCompleted) { + return Page.INITIAL_DATA_ENTRY_SERVLET; } else { return Page.ADMIN_EDIT_SERVLET; } @@ -158,7 +162,9 @@ else if ("itemdata".equalsIgnoreCase(entityType)) { StudyEventBean seb = (StudyEventBean) sedao.findByPK(id); request.setAttribute(EVENT_CRF_ID, String.valueOf(idb.getEventCRFId())); request.setAttribute(STUDY_SUB_ID, String.valueOf(seb.getStudySubjectId())); - + request.setAttribute(DataEntryServlet.INPUT_EVENT_CRF_ID, String.valueOf(idb.getEventCRFId())); + request.setAttribute(DataEntryServlet.INPUT_SECTION_ID, String.valueOf(ifmb.getSectionId())); + } else { request.setAttribute(DataEntryServlet.INPUT_EVENT_CRF_ID, String.valueOf(idb.getEventCRFId())); request.setAttribute(DataEntryServlet.INPUT_SECTION_ID, String.valueOf(ifmb.getSectionId())); @@ -279,6 +285,7 @@ protected void processRequest() throws Exception { } + request.setAttribute(ATTR_RESOLVE_DN, true); forwardPage(p); } diff --git a/web/src/main/java/org/akaza/openclinica/control/managestudy/ViewSectionDataEntryServlet.java b/web/src/main/java/org/akaza/openclinica/control/managestudy/ViewSectionDataEntryServlet.java index 3da44bca7ac..d01e07391e2 100755 --- a/web/src/main/java/org/akaza/openclinica/control/managestudy/ViewSectionDataEntryServlet.java +++ b/web/src/main/java/org/akaza/openclinica/control/managestudy/ViewSectionDataEntryServlet.java @@ -133,7 +133,24 @@ public void processRequest(HttpServletRequest request, HttpServletResponse respo request.setAttribute("exitTo", fp.getString("exitTo")); } int crfVersionId = fp.getInt("crfVersionId", true); - int sectionId = fp.getInt("sectionId"); + int sectionId; + { + String attrResolveDiscrepancy = String + .valueOf(request.getAttribute(ResolveDiscrepancyServlet.ATTR_RESOLVE_DN)); + boolean resolveDiscrepancy = Boolean.valueOf(attrResolveDiscrepancy); + if (resolveDiscrepancy) { + /* + * use the modification only when the request comes from the + * resolvediscrepancy page this is necessary to limit the test + * effort to requests send from the resolvediscrepancy page, for + * other requests no tests are needed since there are no side + * effects + */ + sectionId = fp.getInt("sectionId", true); + } else { + sectionId = fp.getInt("sectionId"); + } + } int eventCRFId = fp.getInt(EVENT_CRF_ID, true); int studySubjectId = fp.getInt("studySubjectId", true); String action = fp.getString("action"); From 91f819138f61d19261509fa9c212561cc4383eaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Wed, 29 May 2019 12:34:00 +0200 Subject: [PATCH 13/28] when button 'view within record' is used the correct section is opened for initial, administrative and view mode --- .../control/managestudy/ViewSectionDataEntryServlet.java | 6 +++++- .../akaza/openclinica/control/submit/DataEntryServlet.java | 6 +++++- .../main/webapp/WEB-INF/jsp/submit/initialDataEntryNw.jsp | 7 +++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/web/src/main/java/org/akaza/openclinica/control/managestudy/ViewSectionDataEntryServlet.java b/web/src/main/java/org/akaza/openclinica/control/managestudy/ViewSectionDataEntryServlet.java index d01e07391e2..dd11f7d6426 100755 --- a/web/src/main/java/org/akaza/openclinica/control/managestudy/ViewSectionDataEntryServlet.java +++ b/web/src/main/java/org/akaza/openclinica/control/managestudy/ViewSectionDataEntryServlet.java @@ -548,7 +548,11 @@ public void processRequest(HttpServletRequest request, HttpServletResponse respo int tabNum = 1; if ("".equalsIgnoreCase(fp.getString("tabId"))) { - tabNum = 1; + if(sb != null && sb.getOrdinal() > 0) { + tabNum = sb.getOrdinal(); + } else { + tabNum = 1; + } } else { tabNum = fp.getInt("tabId"); } diff --git a/web/src/main/java/org/akaza/openclinica/control/submit/DataEntryServlet.java b/web/src/main/java/org/akaza/openclinica/control/submit/DataEntryServlet.java index bc92f735639..f1091d0f2b6 100755 --- a/web/src/main/java/org/akaza/openclinica/control/submit/DataEntryServlet.java +++ b/web/src/main/java/org/akaza/openclinica/control/submit/DataEntryServlet.java @@ -2249,7 +2249,11 @@ protected void getInputBeans(HttpServletRequest request) throws InsufficientPerm int tabId = fp.getInt("tab", true); if (tabId <= 0) { - tabId = 1; + if(sb != null && sb.getOrdinal() > 0) { + tabId = sb.getOrdinal(); + } else { + tabId = 1; + } } request.setAttribute(INPUT_TAB, new Integer(tabId)); request.setAttribute(SECTION_BEAN, sb); diff --git a/web/src/main/webapp/WEB-INF/jsp/submit/initialDataEntryNw.jsp b/web/src/main/webapp/WEB-INF/jsp/submit/initialDataEntryNw.jsp index 115fa815e86..ae86577261b 100644 --- a/web/src/main/webapp/WEB-INF/jsp/submit/initialDataEntryNw.jsp +++ b/web/src/main/webapp/WEB-INF/jsp/submit/initialDataEntryNw.jsp @@ -56,7 +56,7 @@ - +openDNoteWindow(''); document.getElementById('CRF_infobox_closed').style.display='block';document.getElementById('CRF_infobox_open').style.display='none';" onunload="javascript:clsWin();" > @@ -387,7 +387,10 @@ function initmb(){ } -window.onload = initmb; +// this is neccessary since body.onload is overwritten +// by window.onload +oldOnload = document.body.onload; +window.onload = function(){oldOnload(); initmb();}; //--> From 557d87e67fe01f3e32f5513eff5c1575bcf8ba2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Wed, 29 May 2019 18:07:28 +0200 Subject: [PATCH 14/28] changed OCFileRename.rename to create unique file names --- .../openclinica/control/submit/UploadFileServlet.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/src/main/java/org/akaza/openclinica/control/submit/UploadFileServlet.java b/web/src/main/java/org/akaza/openclinica/control/submit/UploadFileServlet.java index 87edeaef5c8..b85c2042622 100644 --- a/web/src/main/java/org/akaza/openclinica/control/submit/UploadFileServlet.java +++ b/web/src/main/java/org/akaza/openclinica/control/submit/UploadFileServlet.java @@ -164,8 +164,11 @@ public File rename(File f, InputStream content) { fileName = fileName.replaceAll("\\W+", "_"); } try { - newName = pathAndName.substring(0, n) + File.separator + fileName + - checksum(f, content) + pathAndName.substring(p); + String prefix = fileName + checksum(f, content) + "_"; + String suffix = pathAndName.substring(p); + File directory = new File(pathAndName.substring(0, n)); + File newFile = File.createTempFile(prefix, suffix, directory); + newName = newFile.getAbsolutePath(); } catch (Throwable e) { e.printStackTrace(); return null; From 337fda3699d8e225e08497259ba43e757ca1d05f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Wed, 29 May 2019 18:23:12 +0200 Subject: [PATCH 15/28] set collectStats to false in datainfo.properties --- web/src/main/resources/datainfo.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/main/resources/datainfo.properties b/web/src/main/resources/datainfo.properties index f67832efec8..c18635107f3 100644 --- a/web/src/main/resources/datainfo.properties +++ b/web/src/main/resources/datainfo.properties @@ -253,7 +253,7 @@ extract.number=99 # # As part of system configuration, we give you the option to help us improve OpenClinica by sending these usage statistics. If you elect to send this information but later change your mind, you can disable this feature in the datainfo.properties file by changing # 'collectStats' value to 'false' -collectStats=true +collectStats=false usage.stats.host=usage.openclinica.com usage.stats.port=514 OpenClinica.version=${pom.version} From d6d7980d6f56234408741bddc1ff54063852e1a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Wed, 29 May 2019 18:57:36 +0200 Subject: [PATCH 16/28] filter duplicate results from DatasetDAO query to reduce memory footprint --- .../main/java/org/akaza/openclinica/dao/extract/DatasetDAO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/akaza/openclinica/dao/extract/DatasetDAO.java b/core/src/main/java/org/akaza/openclinica/dao/extract/DatasetDAO.java index 59edfeecec7..b12b5b037dd 100755 --- a/core/src/main/java/org/akaza/openclinica/dao/extract/DatasetDAO.java +++ b/core/src/main/java/org/akaza/openclinica/dao/extract/DatasetDAO.java @@ -704,7 +704,7 @@ public DatasetBean initialDatasetData(int datasetId) { } protected String getDefinitionCrfItemSql(String sedIds, String itemIds) { - return "select item.*, sed.study_event_definition_id as sed_id, sed.name as sed_name, crf.crf_id, crf.name as crf_name" + return "select DISTINCT item.*, sed.study_event_definition_id as sed_id, sed.name as sed_name, crf.crf_id, crf.name as crf_name" + " from study_event_definition sed, event_definition_crf edc, crf, crf_version cv,item_form_metadata ifm, item" + " where sed.study_event_definition_id in " + sedIds + " and item.item_id in " + itemIds + " and sed.study_event_definition_id = edc.study_event_definition_id and edc.crf_id = crf.crf_id" From 47fa434c7bc2959ab04ff0880f204e5eafba9de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Wed, 29 May 2019 19:00:46 +0200 Subject: [PATCH 17/28] changed current favicon to the LibreClinica version --- web/src/main/webapp/images/favicon.ico | Bin 77907 -> 1150 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/web/src/main/webapp/images/favicon.ico b/web/src/main/webapp/images/favicon.ico index 555bf2288e595478ba7b86c9488e1caed4891aa2..c2275c5eb831d49335f46b90d61519c26fc4d32a 100644 GIT binary patch literal 1150 zcmai!&ui0Q7{{Nk9fGKpg<(2EC| zO+?sH{{b(8P#FkK;$?z*n`6wwv`A58(AoHTwHav$EaB7V&HFyz@AJNI-c%&Toy`ir zLo%KbIU*tk&_&PxenR5q+U2zGnA0#jRnoJTp`EjIt?%>7iUdKhE9fSn0sSi9GIIOy zxC6Ig?`|IG>QJjY6Fapgil_0>&ciDx-6|D##^QcxKfpWBu~N~o#^$D&hIR~n4W>*Z z-xD1V+h}e035UYIXtea4+LJf1h+l7XOtsOSg5NOXE>#le$$lP0{~n&3#$YDuQD2-? z9u;Upq1|pLdl=dY^xt9LDje@xt6ROH-r*DY=sD)msDIdg;n-?V$6*^r*H>4&>Ug%P zJm$cKfuwnuy0!=HC)i*w4u{@h^q*NNw3p#66#SQux@xpqEj5P<1n}_b{DZD><@4j~ zhWNHQfW8V>UB~QNE4pGw|BX594{OIG>rr#L2seGF+`sj!`L7mQbtYOJj|*{K{Mob1 zz34|gr#$Rc%RT6Zq21A6i{~dk^G?0$SjMf6sc++6NBf6ZOw3RC?(Sb1ReN_98ldVs z*2$s7GadId_1ppSufuCtf=iskw8~2d{7=BhtjJ(qB;N-MB9E6v7S=_U*F@HuB3pMw Pw$F%=DnSjtz?{fmYBgqy literal 77907 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 Date: Wed, 29 May 2019 19:53:14 +0200 Subject: [PATCH 18/28] changed groupId to 'org.libreclinica' and artifactId to 'LibreClinica' --- core/pom.xml | 10 +++++----- pom.xml | 12 ++++++------ web/pom.xml | 12 ++++++------ ws/pom.xml | 12 ++++++------ 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index 24587059235..301fd810865 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -1,12 +1,12 @@ 4.0.0 - OpenClinica-core + LibreClinica-core jar - OpenClinica Core + LibreClinica Core - org.akaza.openclinica - OpenClinica - 3.14 + org.libreclinica + LibreClinica + 0.2.0 diff --git a/pom.xml b/pom.xml index aca9b520fa7..55dc8563e8b 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,12 @@ 4.0.0 - org.akaza.openclinica - OpenClinica + org.libreclinica + LibreClinica pom - 3.14 - OpenClinica - OpenClinica + 0.2.0 + LibreClinica + LibreClinica core @@ -22,7 +22,7 @@ UTF-8 - git://github.com/OpenClinica/OpenClinica.git + https://github.com/reliatec-gmbh/LibreClinica.git src/main/resources/datainfo.properties diff --git a/web/pom.xml b/web/pom.xml index 8ba94f07848..5799e29d256 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -1,17 +1,17 @@ 4.0.0 - OpenClinica-web + LibreClinica-web war - OpenClinica Web Application + LibreClinica Web Application - org.akaza.openclinica - OpenClinica - 3.14 + org.libreclinica + LibreClinica + 0.2.0 ${project.groupId} - OpenClinica-core + LibreClinica-core ${project.version} diff --git a/ws/pom.xml b/ws/pom.xml index 43098c63bea..642ee75a8f7 100644 --- a/ws/pom.xml +++ b/ws/pom.xml @@ -1,17 +1,17 @@ 4.0.0 - OpenClinica-ws + LibreClinica-ws war - OpenClinica Web Services + LibreClinica Web Services - org.akaza.openclinica - OpenClinica - 3.14 + org.libreclinica + LibreClinica + 0.2.0 ${project.groupId} - OpenClinica-core + LibreClinica-core ${project.version} From 89bd4398a1dd0311a96084afb801661c548b9121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Mon, 2 Sep 2019 13:50:14 +0200 Subject: [PATCH 19/28] issue 32: removed news box from login page --- web/src/main/webapp/WEB-INF/jsp/login/login.jsp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/web/src/main/webapp/WEB-INF/jsp/login/login.jsp b/web/src/main/webapp/WEB-INF/jsp/login/login.jsp index e36633fc258..57397ab95eb 100755 --- a/web/src/main/webapp/WEB-INF/jsp/login/login.jsp +++ b/web/src/main/webapp/WEB-INF/jsp/login/login.jsp @@ -1,4 +1,3 @@ -<%@page contentType="text/html;charset=UTF-8" language="java" %> <%@ include file="/WEB-INF/jsp/taglibs.jsp" %> @@ -80,7 +79,6 @@ - -
  
@@ -107,13 +105,6 @@ -
- -

... - -
-
@@ -124,13 +115,6 @@ document.getElementById('j_password').setAttribute( 'autocomplete', 'off' ); jQuery(document).ready(function() { - - jQuery.get("../../RssReader", function(data){ -// alert("Data Loaded: " + data); - jQuery("#newsBox").html(data); - }); - - jQuery('#requestPassword').click(function() { jQuery.blockUI({ message: jQuery('#requestPasswordForm'), css:{left: "200px", top:"180px" } }); }); From dc5c975974698f102425f8be6fe8b34d20a01209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Mon, 2 Sep 2019 14:08:50 +0200 Subject: [PATCH 20/28] issue 42: removed unused class RssReaderServlet --- .../openclinica/control/RssReaderServlet.java | 133 ------------------ .../applicationContext-security.xml | 1 - web/src/main/webapp/WEB-INF/web.xml | 9 -- 3 files changed, 143 deletions(-) delete mode 100644 web/src/main/java/org/akaza/openclinica/control/RssReaderServlet.java diff --git a/web/src/main/java/org/akaza/openclinica/control/RssReaderServlet.java b/web/src/main/java/org/akaza/openclinica/control/RssReaderServlet.java deleted file mode 100644 index d761941fd4a..00000000000 --- a/web/src/main/java/org/akaza/openclinica/control/RssReaderServlet.java +++ /dev/null @@ -1,133 +0,0 @@ -package org.akaza.openclinica.control; - -import org.akaza.openclinica.web.SQLInitServlet; -import org.apache.commons.lang.StringEscapeUtils; -import org.jmesa.view.html.HtmlBuilder; - -import com.sun.syndication.feed.synd.SyndEntryImpl; -import com.sun.syndication.feed.synd.SyndFeed; -import com.sun.syndication.fetcher.FeedFetcher; -import com.sun.syndication.fetcher.FetcherException; -import com.sun.syndication.fetcher.impl.FeedFetcherCache; -import com.sun.syndication.fetcher.impl.HashMapFeedInfoCache; -import com.sun.syndication.fetcher.impl.HttpURLFeedFetcher; -import com.sun.syndication.io.FeedException; - -import java.io.IOException; -import java.io.PrintWriter; -import java.net.URL; -import java.text.SimpleDateFormat; -import java.util.List; -import java.util.Locale; -import java.util.ResourceBundle; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class RssReaderServlet extends HttpServlet { - - private static final long serialVersionUID = 1L; - FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance(); - FeedFetcher feedFetcher = new HttpURLFeedFetcher(feedInfoCache); - String rssUrl = SQLInitServlet.getField("rss.url"); - String rssMore = SQLInitServlet.getField("rss.more"); - String text1 = SQLInitServlet.getField("about.text1"); - String text2 = SQLInitServlet.getField("about.text2"); - ResourceBundle resword,resformat; - - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - resword = ResourceBundle.getBundle("org.akaza.openclinica.i18n.words",req.getLocale()); - resformat = ResourceBundle.getBundle("org.akaza.openclinica.i18n.format",req.getLocale()); - PrintWriter pw = new PrintWriter(resp.getOutputStream()); - if (rssUrl == null || rssUrl.length() == 0) { - about(pw); - } else { - getFeed(pw); - } - } - - void getFeed(PrintWriter pw) { - - SyndFeed feed = null; - String htmlFeed = null; - - try { - feed = feedFetcher.retrieveFeed(new URL(rssUrl)); - htmlFeed = feedHtml(feed); - } catch (IllegalArgumentException e) { - // TODO Auto-generated catch block - htmlFeed = errorFeedHtml(e.getMessage()); - e.printStackTrace(); - } catch (FeedException e) { - // TODO Auto-generated catch block - htmlFeed = errorFeedHtml(e.getMessage()); - e.printStackTrace(); - } catch (FetcherException e) { - htmlFeed = errorFeedHtml(e.getMessage()); - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (Exception e) { - htmlFeed = errorFeedHtml(e.getMessage()); - // TODO Auto-generated catch block - e.printStackTrace(); - } finally { - pw.println(htmlFeed); - pw.close(); - } - } - - void about(PrintWriter pw) { - HtmlBuilder htmlBuilder = new HtmlBuilder(); - htmlBuilder.h1().close().append(resword.getString("about")).h1End().ul().close(); - htmlBuilder.li().close().append(text1).liEnd(); - htmlBuilder.li().close().append(text2).liEnd(); - htmlBuilder.ulEnd().toString(); - - pw.println(htmlBuilder.toString()); - pw.close(); - - } - - String feedHtml(SyndFeed feed) { - HtmlBuilder htmlBuilder = new HtmlBuilder(); - htmlBuilder.h1().close().append(resword.getString("news")).h1End().ul().close(); - List theFeeds = feed.getEntries(); - - for (int i = 0; i < (theFeeds.size() >= 4 ? 4 : theFeeds.size()); i++) { - SyndEntryImpl syndFeed = theFeeds.get(i); - String description = null; - - if (syndFeed.getDescription().getValue().length() > 50) { - Integer k = 50; - while (syndFeed.getDescription().getValue().charAt(k) != ' ') { - k--; - } - description = syndFeed.getDescription().getValue().substring(0, k) + " ..."; - } else { - description = syndFeed.getDescription().getValue(); - } - SimpleDateFormat sdf = new SimpleDateFormat(resformat.getString("mid_date_format")); - String theDate = sdf.format(syndFeed.getPublishedDate()); - htmlBuilder.li().close().a().href(syndFeed.getLink()).append(" target=\"_blank\"").close().append( - theDate + " - " + StringEscapeUtils.escapeHtml(syndFeed.getTitle()) + " - " + description).aEnd().liEnd(); - - } - if (rssMore != null && rssMore.length() > 0) { - return htmlBuilder.ulEnd().a().href(rssMore).append(" target=\"_blank\"").close().div().align("right").close().append(resword.getString("more")+"...").divEnd().aEnd() - .toString(); - } else { - return htmlBuilder.ulEnd().toString(); - } - - } - - String errorFeedHtml(String error) { - HtmlBuilder htmlBuilder = new HtmlBuilder(); - htmlBuilder.h1().close().append(resword.getString("news")).h1End().ul().close(); - htmlBuilder.li().close().append(resword.getString("couldnot_retrieve_news")).liEnd(); - return htmlBuilder.ulEnd().toString(); - } -} diff --git a/web/src/main/resources/org/akaza/openclinica/applicationContext-security.xml b/web/src/main/resources/org/akaza/openclinica/applicationContext-security.xml index ff7afdd22fe..b3703e438d2 100644 --- a/web/src/main/resources/org/akaza/openclinica/applicationContext-security.xml +++ b/web/src/main/resources/org/akaza/openclinica/applicationContext-security.xml @@ -20,7 +20,6 @@ - diff --git a/web/src/main/webapp/WEB-INF/web.xml b/web/src/main/webapp/WEB-INF/web.xml index eb42949a220..3b537a48921 100755 --- a/web/src/main/webapp/WEB-INF/web.xml +++ b/web/src/main/webapp/WEB-INF/web.xml @@ -247,11 +247,6 @@ ViewLogMessage org.akaza.openclinica.control.admin.ViewLogMessageServlet - - RssReaderServlet - RssReaderServlet - org.akaza.openclinica.control.RssReaderServlet - AuditUserActivityServlet @@ -2186,10 +2181,6 @@ ViewLogMessage /ViewLogMessage - - RssReaderServlet - /RssReader - UploadFileServlet /UploadFile From e3449fe01b17ebfaebc06ab98d38c271680e9c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Mon, 2 Sep 2019 14:22:48 +0200 Subject: [PATCH 21/28] issue 43: removed unused lib rome:rome --- web/pom.xml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/web/pom.xml b/web/pom.xml index 5799e29d256..fa88d22c187 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -25,19 +25,6 @@ 8.7
- - rome - rome-fetcher - 1.0 - compile - - - - jdom - jdom - - - rome rome From b6812ad8c734889b00e03e4391919ab789fc415f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Mon, 2 Sep 2019 14:29:12 +0200 Subject: [PATCH 22/28] issue 44: removed unused lib rome:rome-fetcher --- web/pom.xml | 14 ------ .../controller/DiscrepancyNoteController.java | 41 +++++----------- .../controller/StudyController.java | 48 ++++++------------- 3 files changed, 27 insertions(+), 76 deletions(-) diff --git a/web/pom.xml b/web/pom.xml index fa88d22c187..c2f4bf8c9ee 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -25,20 +25,6 @@ 8.7 - - rome - rome - 1.0 - compile - - - - jdom - jdom - - - - com.mockrunner.jdk15.jee5 mockrunner diff --git a/web/src/main/java/org/akaza/openclinica/controller/DiscrepancyNoteController.java b/web/src/main/java/org/akaza/openclinica/controller/DiscrepancyNoteController.java index 104ef61ed9e..8be11419a41 100644 --- a/web/src/main/java/org/akaza/openclinica/controller/DiscrepancyNoteController.java +++ b/web/src/main/java/org/akaza/openclinica/controller/DiscrepancyNoteController.java @@ -1,55 +1,40 @@ package org.akaza.openclinica.controller; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Locale; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; + import org.akaza.openclinica.bean.core.DiscrepancyNoteType; import org.akaza.openclinica.bean.core.ResolutionStatus; -import org.akaza.openclinica.bean.core.Role; -import org.akaza.openclinica.bean.core.Status; -import org.akaza.openclinica.bean.core.UserType; -import org.akaza.openclinica.bean.login.StudyUserRoleBean; import org.akaza.openclinica.bean.login.UserAccountBean; -import org.akaza.openclinica.bean.login.UserDTO; import org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean; -import org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean; import org.akaza.openclinica.bean.managestudy.StudyBean; import org.akaza.openclinica.bean.managestudy.StudyEventBean; import org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean; import org.akaza.openclinica.bean.managestudy.StudySubjectBean; -import org.akaza.openclinica.bean.service.StudyParameterValueBean; -import org.akaza.openclinica.bean.submit.CRFVersionBean; -import org.akaza.openclinica.control.SpringServletAccess; -import org.akaza.openclinica.dao.hibernate.AuthoritiesDao; import org.akaza.openclinica.dao.login.UserAccountDAO; import org.akaza.openclinica.dao.managestudy.DiscrepancyNoteDAO; -import org.akaza.openclinica.dao.managestudy.EventDefinitionCRFDAO; import org.akaza.openclinica.dao.managestudy.StudyDAO; import org.akaza.openclinica.dao.managestudy.StudyEventDAO; import org.akaza.openclinica.dao.managestudy.StudyEventDefinitionDAO; import org.akaza.openclinica.dao.managestudy.StudySubjectDAO; -import org.akaza.openclinica.dao.service.StudyParameterValueDAO; -import org.akaza.openclinica.dao.submit.CRFVersionDAO; -import org.akaza.openclinica.domain.user.AuthoritiesBean; import org.akaza.openclinica.i18n.util.ResourceBundleProvider; -import org.akaza.openclinica.service.pmanage.ParticipantPortalRegistrar; -import org.akaza.openclinica.web.pform.PFormCache; import org.apache.commons.dbcp.BasicDataSource; -import org.apache.commons.httpclient.HttpStatus; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.Locale; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseStatus; @Controller @RequestMapping(value = "/auth/api/v1/discrepancynote") diff --git a/web/src/main/java/org/akaza/openclinica/controller/StudyController.java b/web/src/main/java/org/akaza/openclinica/controller/StudyController.java index e03b9926b38..536baa2d5b1 100644 --- a/web/src/main/java/org/akaza/openclinica/controller/StudyController.java +++ b/web/src/main/java/org/akaza/openclinica/controller/StudyController.java @@ -1,64 +1,44 @@ package org.akaza.openclinica.controller; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.ResourceBundle; + +import javax.servlet.http.HttpServletRequest; + import org.akaza.openclinica.bean.core.NumericComparisonOperator; import org.akaza.openclinica.bean.core.Role; import org.akaza.openclinica.bean.core.Status; -import org.akaza.openclinica.bean.core.UserType; import org.akaza.openclinica.bean.login.ErrorObject; +import org.akaza.openclinica.bean.login.EventDefinitionDTO; import org.akaza.openclinica.bean.login.ResponseSuccessEventDefDTO; import org.akaza.openclinica.bean.login.ResponseSuccessSiteDTO; import org.akaza.openclinica.bean.login.ResponseSuccessStudyDTO; import org.akaza.openclinica.bean.login.SiteDTO; import org.akaza.openclinica.bean.login.StudyDTO; -import org.akaza.openclinica.bean.login.EventDefinitionDTO; import org.akaza.openclinica.bean.login.StudyUserRoleBean; import org.akaza.openclinica.bean.login.UserAccountBean; -import org.akaza.openclinica.bean.login.UserDTO; import org.akaza.openclinica.bean.login.UserRole; import org.akaza.openclinica.bean.managestudy.StudyBean; import org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean; -import org.akaza.openclinica.bean.managestudy.StudySubjectBean; -import org.akaza.openclinica.bean.service.StudyParameterValueBean; -import org.akaza.openclinica.control.SpringServletAccess; -import org.akaza.openclinica.control.form.FormProcessor; import org.akaza.openclinica.control.form.Validator; -import org.akaza.openclinica.dao.hibernate.AuthoritiesDao; import org.akaza.openclinica.dao.login.UserAccountDAO; import org.akaza.openclinica.dao.managestudy.StudyDAO; import org.akaza.openclinica.dao.managestudy.StudyEventDefinitionDAO; -import org.akaza.openclinica.dao.managestudy.StudySubjectDAO; -import org.akaza.openclinica.dao.service.StudyParameterValueDAO; -import org.akaza.openclinica.domain.user.AuthoritiesBean; -import org.akaza.openclinica.i18n.util.ResourceBundleProvider; -import org.akaza.openclinica.service.pmanage.ParticipantPortalRegistrar; import org.apache.commons.dbcp.BasicDataSource; -import org.apache.commons.httpclient.HttpStatus; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.http.ResponseEntity; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.authentication.BadCredentialsException; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.sql.DataSource; - -import java.text.MessageFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.ResourceBundle; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; @Controller @RequestMapping(value = "/auth/api/v1/studies") From 60e42dbb57ec1fcbd09e34a1f8471ed983f5a18d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Mon, 2 Sep 2019 16:24:50 +0200 Subject: [PATCH 23/28] issue 40: reenabled logging when the user has logged out --- ...enClinicaSecurityContextLogoutHandler.java | 29 ++++++++++++++----- .../applicationContext-security.xml | 2 +- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/web/src/main/java/org/akaza/openclinica/web/filter/OpenClinicaSecurityContextLogoutHandler.java b/web/src/main/java/org/akaza/openclinica/web/filter/OpenClinicaSecurityContextLogoutHandler.java index fb0e4e15e7f..c4673a5c5d5 100644 --- a/web/src/main/java/org/akaza/openclinica/web/filter/OpenClinicaSecurityContextLogoutHandler.java +++ b/web/src/main/java/org/akaza/openclinica/web/filter/OpenClinicaSecurityContextLogoutHandler.java @@ -1,21 +1,25 @@ package org.akaza.openclinica.web.filter; +import java.io.IOException; +import java.util.Date; +import java.util.Locale; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.sql.DataSource; + import org.akaza.openclinica.bean.login.UserAccountBean; import org.akaza.openclinica.dao.hibernate.AuditUserLoginDao; import org.akaza.openclinica.dao.login.UserAccountDAO; import org.akaza.openclinica.domain.technicaladmin.AuditUserLoginBean; import org.akaza.openclinica.domain.technicaladmin.LoginStatus; import org.akaza.openclinica.i18n.util.ResourceBundleProvider; +import org.springframework.http.HttpStatus; import org.springframework.security.core.Authentication; +import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler; -import java.util.Date; -import java.util.Locale; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; - /** * Call Super Class SecurityContextLogoutHandler that Performs a logout by modifying the {@see org.springframework.security.context.SecurityContextHolder}. *

@@ -23,7 +27,7 @@ * * @author Krikor Krumlian */ -public class OpenClinicaSecurityContextLogoutHandler extends SecurityContextLogoutHandler { +public class OpenClinicaSecurityContextLogoutHandler extends SecurityContextLogoutHandler implements LogoutSuccessHandler { AuditUserLoginDao auditUserLoginDao; UserAccountDAO userAccountDao; @@ -80,4 +84,13 @@ public void setAuditUserLoginDao(AuditUserLoginDao auditUserLoginDao) { this.auditUserLoginDao = auditUserLoginDao; } + @Override + public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) + throws IOException, ServletException { + logout(request, response, authentication); + + String logoutSuccessUrl = request.getContextPath() + "/MainMenu"; + response.setStatus(HttpStatus.OK.value()); + response.sendRedirect(logoutSuccessUrl); + } } diff --git a/web/src/main/resources/org/akaza/openclinica/applicationContext-security.xml b/web/src/main/resources/org/akaza/openclinica/applicationContext-security.xml index b3703e438d2..84ee216e444 100644 --- a/web/src/main/resources/org/akaza/openclinica/applicationContext-security.xml +++ b/web/src/main/resources/org/akaza/openclinica/applicationContext-security.xml @@ -47,7 +47,7 @@ - + From 5dc6d8ca9087e356e77e7e66ffada93358438ce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Tue, 3 Sep 2019 11:16:09 +0200 Subject: [PATCH 24/28] issue 38: show 'Support' link in the main menu only if a url is configured in datainfo.properties otherwise hide it --- .../java/org/akaza/openclinica/dao/core/CoreResources.java | 4 ++-- web/src/main/webapp/WEB-INF/jsp/include/navBar.jsp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/akaza/openclinica/dao/core/CoreResources.java b/core/src/main/java/org/akaza/openclinica/dao/core/CoreResources.java index de0c35ccc2e..0e7ac7978e0 100644 --- a/core/src/main/java/org/akaza/openclinica/dao/core/CoreResources.java +++ b/core/src/main/java/org/akaza/openclinica/dao/core/CoreResources.java @@ -362,8 +362,8 @@ private Properties setDataInfoProperties() { DATAINFO.setProperty("rss.more", rss_more); String supportURL = DATAINFO.getProperty("supportURL"); - if (supportURL == null || supportURL.isEmpty()) - supportURL = "https://www.openclinica.com/support"; + if (supportURL == null || supportURL.trim().isEmpty()) + supportURL = ""; DATAINFO.setProperty("supportURL", supportURL); DATAINFO.setProperty("show_unique_id", "1"); diff --git a/web/src/main/webapp/WEB-INF/jsp/include/navBar.jsp b/web/src/main/webapp/WEB-INF/jsp/include/navBar.jsp index bcec710c4c8..024a07cabd1 100644 --- a/web/src/main/webapp/WEB-INF/jsp/include/navBar.jsp +++ b/web/src/main/webapp/WEB-INF/jsp/include/navBar.jsp @@ -141,7 +141,9 @@

') { document.forms[0]['findSubjects_f_studySubject.label'].value=''}"> - ')">   + + ')">   + '" onfocus="if (this.value == '') this.value = ''" value="" class="navSearch"/> " class="navSearchButton"/> From 7dca0eed90a1427f567bb4f18554b60ce013c672 Mon Sep 17 00:00:00 2001 From: toskrip Date: Wed, 4 Sep 2019 16:15:32 +0200 Subject: [PATCH 25/28] Re-enable build with odm module --- .gitignore | 1 + pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 916007cf762..b75eb9f390f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ release.properties .project .settings/ .idea/ +LibreClinica.iml OpenClinica.iml web/src/main/resources/datainfo.properties core/*.iml diff --git a/pom.xml b/pom.xml index b8b9520f9bc..720823b7cf1 100644 --- a/pom.xml +++ b/pom.xml @@ -95,8 +95,8 @@ 2.4.2-oc - org.akaza.openclinica.odm - openclinica-odm + org.libreclinica.odm + LibreClinica-odm 2.2 From b6d8ad16d1c08971ef4f4f02e744549ad555951c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Thu, 5 Sep 2019 18:53:58 +0200 Subject: [PATCH 26/28] changed version from 0.2.0 to 0.3.0 --- core/pom.xml | 2 +- pom.xml | 2 +- web/pom.xml | 2 +- ws/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index 301fd810865..6e92ea048cd 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -6,7 +6,7 @@ org.libreclinica LibreClinica - 0.2.0 + 0.3.0 diff --git a/pom.xml b/pom.xml index 55dc8563e8b..5208728e479 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.libreclinica LibreClinica pom - 0.2.0 + 0.3.0 LibreClinica LibreClinica diff --git a/web/pom.xml b/web/pom.xml index c2f4bf8c9ee..c787cccfdd0 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -6,7 +6,7 @@ org.libreclinica LibreClinica - 0.2.0 + 0.3.0 diff --git a/ws/pom.xml b/ws/pom.xml index 642ee75a8f7..87ebef5af4f 100644 --- a/ws/pom.xml +++ b/ws/pom.xml @@ -6,7 +6,7 @@ org.libreclinica LibreClinica - 0.2.0 + 0.3.0 From 7606f3f7a9a6a289e5e8b8177dcda52669087fdc Mon Sep 17 00:00:00 2001 From: toskrip Date: Fri, 6 Sep 2019 09:46:47 +0200 Subject: [PATCH 27/28] Fix deprecated hibernate methods and hibernate mapping for x_form_name --- .../dao/hibernate/AbstractDomainDao.java | 32 +++++++++---------- .../domain/datamap/CrfVersion.java | 4 +-- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/core/src/main/java/org/akaza/openclinica/dao/hibernate/AbstractDomainDao.java b/core/src/main/java/org/akaza/openclinica/dao/hibernate/AbstractDomainDao.java index 92e7af1673d..cacea20d9a3 100644 --- a/core/src/main/java/org/akaza/openclinica/dao/hibernate/AbstractDomainDao.java +++ b/core/src/main/java/org/akaza/openclinica/dao/hibernate/AbstractDomainDao.java @@ -32,8 +32,8 @@ public String getDomainClassName() { public T findById(Integer id) { getSessionFactory().getStatistics().logSummary(); String query = "from " + getDomainClassName() + " do where do.id = :id"; - org.hibernate.Query q = getCurrentSession().createQuery(query); - q.setInteger("id", id); + org.hibernate.query.Query q = getCurrentSession().createQuery(query); + q.setParameter("id", id); return (T) q.uniqueResult(); } @@ -42,7 +42,7 @@ public T findById(Integer id) { public ArrayList findAll() { getSessionFactory().getStatistics().logSummary(); String query = "from " + getDomainClassName() + " do"; - org.hibernate.Query q = getCurrentSession().createQuery(query); + org.hibernate.query.Query q = getCurrentSession().createQuery(query); return (ArrayList) q.list(); } @@ -50,8 +50,8 @@ public ArrayList findAll() { public T findByOcOID(String OCOID){ getSessionFactory().getStatistics().logSummary(); String query = "from " + getDomainClassName() + " do where do.oc_oid = :oc_oid"; - org.hibernate.Query q = getCurrentSession().createQuery(query); - q.setString("oc_oid", OCOID); + org.hibernate.query.Query q = getCurrentSession().createQuery(query); + q.setParameter("oc_oid", OCOID); return (T) q.uniqueResult(); } @@ -65,18 +65,16 @@ public T saveOrUpdate(T domainObject) { @Transactional public Serializable save(T domainObject) { getSessionFactory().getStatistics().logSummary(); - Serializable id = getCurrentSession().save(domainObject); - return id; + return getCurrentSession().save(domainObject); } - - + @SuppressWarnings("unchecked") @Transactional - public T findByColumnName(Object id,String key) { - String query = "from " + getDomainClassName() + " do where do."+key +"= ?"; - org.hibernate.Query q = getCurrentSession().createQuery(query); - q.setParameter(0, id); - return (T) q.uniqueResult(); + public T findByColumnName(Object id, String key) { + String query = "from " + getDomainClassName() + " do where do." + key + " = :key_value"; + org.hibernate.query.Query q = getCurrentSession().createQuery(query); + q.setParameter("key_value", id); + return (T) q.uniqueResult(); } public Long count() { @@ -107,11 +105,13 @@ public Session getCurrentSession(String schema) { //CoreResources.setSchema(sessionImpl.connection()); } } catch (SQLException e) { - logger.error(e.getMessage(), e); } + logger.error(e.getMessage(), e); + } } return session; } + @SuppressWarnings("unused") public HibernateTemplate getHibernateTemplate() { return hibernateTemplate; } @@ -120,6 +120,4 @@ public void setHibernateTemplate(HibernateTemplate hibernateTemplate) { this.hibernateTemplate = hibernateTemplate; } - - } diff --git a/core/src/main/java/org/akaza/openclinica/domain/datamap/CrfVersion.java b/core/src/main/java/org/akaza/openclinica/domain/datamap/CrfVersion.java index 549e4cc34a7..ae95222fa4e 100644 --- a/core/src/main/java/org/akaza/openclinica/domain/datamap/CrfVersion.java +++ b/core/src/main/java/org/akaza/openclinica/domain/datamap/CrfVersion.java @@ -56,7 +56,7 @@ public class CrfVersion extends DataMapDomainObject { private List
sections; private List eventDefinitionCrfs; private Set decisionConditions = new HashSet(0); - private Set itemGroupMetadatas;; + private Set itemGroupMetadatas; public CrfVersion() { } @@ -211,7 +211,7 @@ public void setXform(String xform) { this.xform = xform; } - @Column(name = "xformName") + @Column(name = "xform_name") public String getXformName() { return xformName; } From ce5defed35a93be056ef7d625bb4ddf9e1e67878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4nsel?= Date: Fri, 6 Sep 2019 15:23:30 +0200 Subject: [PATCH 28/28] fixed warnings for class StudyUserRoleDao --- .../dao/hibernate/AbstractDomainDao.java | 20 +++++++++---------- .../CompositeIdAbstractDomainDao.java | 18 ++++++++--------- .../dao/hibernate/StudyUserRoleDao.java | 9 +++++---- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/core/src/main/java/org/akaza/openclinica/dao/hibernate/AbstractDomainDao.java b/core/src/main/java/org/akaza/openclinica/dao/hibernate/AbstractDomainDao.java index cacea20d9a3..f831d761c93 100644 --- a/core/src/main/java/org/akaza/openclinica/dao/hibernate/AbstractDomainDao.java +++ b/core/src/main/java/org/akaza/openclinica/dao/hibernate/AbstractDomainDao.java @@ -10,6 +10,7 @@ import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.internal.SessionImpl; +import org.hibernate.query.Query; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.orm.hibernate5.HibernateTemplate; @@ -32,9 +33,9 @@ public String getDomainClassName() { public T findById(Integer id) { getSessionFactory().getStatistics().logSummary(); String query = "from " + getDomainClassName() + " do where do.id = :id"; - org.hibernate.query.Query q = getCurrentSession().createQuery(query); + Query q = getCurrentSession().createQuery(query); q.setParameter("id", id); - return (T) q.uniqueResult(); + return q.uniqueResult(); } @SuppressWarnings("unchecked") @@ -42,17 +43,17 @@ public T findById(Integer id) { public ArrayList findAll() { getSessionFactory().getStatistics().logSummary(); String query = "from " + getDomainClassName() + " do"; - org.hibernate.query.Query q = getCurrentSession().createQuery(query); - return (ArrayList) q.list(); + Query q = getCurrentSession().createQuery(query); + return new ArrayList(q.list()); } @SuppressWarnings("unchecked") public T findByOcOID(String OCOID){ getSessionFactory().getStatistics().logSummary(); String query = "from " + getDomainClassName() + " do where do.oc_oid = :oc_oid"; - org.hibernate.query.Query q = getCurrentSession().createQuery(query); + Query q = getCurrentSession().createQuery(query); q.setParameter("oc_oid", OCOID); - return (T) q.uniqueResult(); + return q.uniqueResult(); } @Transactional @@ -72,10 +73,10 @@ public Serializable save(T domainObject) { @Transactional public T findByColumnName(Object id, String key) { String query = "from " + getDomainClassName() + " do where do." + key + " = :key_value"; - org.hibernate.query.Query q = getCurrentSession().createQuery(query); + Query q = getCurrentSession().createQuery(query); q.setParameter("key_value", id); - return (T) q.uniqueResult(); - } + return q.uniqueResult(); + } public Long count() { return (Long) getCurrentSession().createQuery("select count(*) from " + domainClass().getName()).uniqueResult(); @@ -111,7 +112,6 @@ public Session getCurrentSession(String schema) { return session; } - @SuppressWarnings("unused") public HibernateTemplate getHibernateTemplate() { return hibernateTemplate; } diff --git a/core/src/main/java/org/akaza/openclinica/dao/hibernate/CompositeIdAbstractDomainDao.java b/core/src/main/java/org/akaza/openclinica/dao/hibernate/CompositeIdAbstractDomainDao.java index a9d3bc06966..20c0654efb3 100644 --- a/core/src/main/java/org/akaza/openclinica/dao/hibernate/CompositeIdAbstractDomainDao.java +++ b/core/src/main/java/org/akaza/openclinica/dao/hibernate/CompositeIdAbstractDomainDao.java @@ -6,6 +6,7 @@ import org.akaza.openclinica.domain.CompositeIdDomainObject; import org.hibernate.Session; import org.hibernate.SessionFactory; +import org.hibernate.query.Query; import org.springframework.orm.hibernate5.HibernateTemplate; import org.springframework.transaction.annotation.Transactional; @@ -25,8 +26,8 @@ public String getDomainClassName() { public ArrayList findAll() { getSessionFactory().getStatistics().logSummary(); String query = "from " + getDomainClassName() + " do"; - org.hibernate.Query q = getCurrentSession().createQuery(query); - return (ArrayList) q.list(); + Query q = getCurrentSession().createQuery(query); + return new ArrayList(q.list()); } @Transactional @@ -41,16 +42,15 @@ public Serializable save(T domainObject) { getSessionFactory().getStatistics().logSummary(); Serializable id = getCurrentSession().save(domainObject); return id; - } - - + } + @SuppressWarnings("unchecked") @Transactional public T findByColumnName(Object id,String key) { - String query = "from " + getDomainClassName() + " do where do."+key +"= ?"; - org.hibernate.Query q = getCurrentSession().createQuery(query); - q.setParameter(0, id); - return (T) q.uniqueResult(); + String query = "from " + getDomainClassName() + " do where do."+key +"= :id"; + Query q = getCurrentSession().createQuery(query); + q.setParameter("id", id); + return q.uniqueResult(); } public Long count() { diff --git a/core/src/main/java/org/akaza/openclinica/dao/hibernate/StudyUserRoleDao.java b/core/src/main/java/org/akaza/openclinica/dao/hibernate/StudyUserRoleDao.java index 034c10ffaa5..25716cb1742 100644 --- a/core/src/main/java/org/akaza/openclinica/dao/hibernate/StudyUserRoleDao.java +++ b/core/src/main/java/org/akaza/openclinica/dao/hibernate/StudyUserRoleDao.java @@ -4,6 +4,7 @@ import org.akaza.openclinica.domain.datamap.StudyUserRole; import org.akaza.openclinica.domain.user.UserAccount; +import org.hibernate.query.Query; public class StudyUserRoleDao extends CompositeIdAbstractDomainDao { @@ -16,11 +17,11 @@ public Class domainClass() { public ArrayList findAllUserRolesByUserAccount(UserAccount userAccount, int studyId, int parentStudyId) { String query = "from " + getDomainClassName() + " where user_name=:username AND status_id=1 AND ( study_id=:studyId OR study_id=:parentStudyId) "; - org.hibernate.Query q = getCurrentSession().createQuery(query); + Query q = getCurrentSession().createQuery(query); q.setParameter("username", userAccount.getUserName()); - q.setInteger("studyId", studyId); - q.setInteger("parentStudyId", parentStudyId); - return (ArrayList) q.list(); + q.setParameter("studyId", studyId); + q.setParameter("parentStudyId", parentStudyId); + return new ArrayList(q.list()); } }