From 0c37ed904a037c907627ee13465c28fd913b8eda Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Sat, 7 Oct 2023 17:51:04 +0000 Subject: [PATCH 1/4] license.md edited online with Bitbucket --- license.md => LICENSE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename license.md => LICENSE.md (100%) diff --git a/license.md b/LICENSE.md similarity index 100% rename from license.md rename to LICENSE.md From dd8f5ab1eafc09db28c601a429aa0ae90465fe84 Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Sat, 7 Oct 2023 17:55:06 +0000 Subject: [PATCH 2/4] README.md edited online with Bitbucket --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index edd935e8..661ac4d2 100644 --- a/README.md +++ b/README.md @@ -96,5 +96,5 @@ After credential was created, Google will show you the clientId and clientSecret ## License The source code is Licensed under the WiseMapping Open License, Version 1.0 (the “License”); -You may obtain a copy of the License at: [https://bitbucket.org/wisemapping/wisemapping-open-source/src/develop/license.md](https://bitbucket.org/wisemapping/wisemapping-open-source/src/develop/license.md) +You may obtain a copy of the License at: [https://bitbucket.org/wisemapping/wisemapping-open-source/src/develop/license.md](https://bitbucket.org/wisemapping/wisemapping-open-source/src/develop/LICENSE.md) From 881a16b90878f05cff0333bf8d02e3573fecc428 Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Mon, 9 Oct 2023 23:39:25 +0000 Subject: [PATCH 3/4] messages_ru.properties edited online with Bitbucket --- wise-webapp/src/main/resources/messages_ru.properties | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wise-webapp/src/main/resources/messages_ru.properties b/wise-webapp/src/main/resources/messages_ru.properties index 622c7fbf..3be183c3 100644 --- a/wise-webapp/src/main/resources/messages_ru.properties +++ b/wise-webapp/src/main/resources/messages_ru.properties @@ -64,4 +64,7 @@ OWNER_ROLE_CAN_NOT_BE_CHANGED=Роль владельца изменить не ZOOM_TO_FIT=Увеличить, чтобы соответствовать ZOOM_OUT=Уменьшить ZOOM_IN=Приблизить -PASSWORD_TOO_LONG=Password must be less than 40 characters. \ No newline at end of file +PASSWORD_TOO_LONG=Password must be less than 40 characters. +CHANGE_PASSWORD.EMAIL_SUBJECT=Your password has been reset +CHANGE_PASSWORD.EMAIL_TITLE=A temporal password has been generated +CHANGE_PASSWORD.EMAIL_BODY=

Someone, most likely you, requested a new password for your WiseMapping account.

Here is your new password: {0}

You can login clicking here. We strongly encourage you to change the password as soon as possible.

\ No newline at end of file From 315267e68cf7fe35db1e2041978b3c0498a56d52 Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Mon, 30 Oct 2023 05:34:45 +0000 Subject: [PATCH 4/4] Migrate to hibernate 6 --- wise-webapp/pom.xml | 49 ++---- .../com/wisemapping/dao/LabelManagerImpl.java | 36 ++-- .../com/wisemapping/dao/MindmapManager.java | 6 - .../wisemapping/dao/MindmapManagerImpl.java | 157 +++++++----------- .../com/wisemapping/dao/UserManagerImpl.java | 69 ++++---- .../wisemapping/service/MindmapService.java | 2 - .../service/MindmapServiceImpl.java | 5 - .../main/webapp/WEB-INF/wisemapping-dao.xml | 4 - .../main/webapp/WEB-INF/wisemapping-model.xml | 9 +- 9 files changed, 131 insertions(+), 206 deletions(-) diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index 8f40c583..26ff41f8 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -13,10 +13,8 @@ - 6.0.11 + 6.0.13 6.1.2 - 6.2.6.Final - 6.0.21.Final 6.0.2 @@ -86,8 +84,14 @@ org.hibernate - hibernate-core-jakarta - 5.6.15.Final + hibernate-core + 6.1.7.Final + + + + jakarta.xml.bind + jakarta.xml.bind-api + 4.0.1 @@ -130,12 +134,12 @@ org.springframework.data spring-data-jpa - 2.6.1 + 3.1.0 org.springframework spring-test - 5.3.15 + 6.0.6 test @@ -189,16 +193,6 @@ jakarta.mail 2.0.2 - - - - - - - - - - org.apache.logging.log4j log4j-core @@ -362,27 +356,6 @@ - - - - - - - - - - - - - - - - - - - - - org.apache.maven.plugins maven-war-plugin diff --git a/wise-webapp/src/main/java/com/wisemapping/dao/LabelManagerImpl.java b/wise-webapp/src/main/java/com/wisemapping/dao/LabelManagerImpl.java index b9bd4f64..01012bc8 100644 --- a/wise-webapp/src/main/java/com/wisemapping/dao/LabelManagerImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/dao/LabelManagerImpl.java @@ -19,14 +19,21 @@ package com.wisemapping.dao; import com.wisemapping.model.Label; import com.wisemapping.model.User; +import jakarta.annotation.Resource; +import org.hibernate.Session; +import org.hibernate.SessionFactory; +import org.hibernate.query.SelectionQuery; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.springframework.orm.hibernate5.support.HibernateDaoSupport; +import org.springframework.stereotype.Repository; import java.util.List; -public class LabelManagerImpl extends HibernateDaoSupport +@Repository +public class LabelManagerImpl implements LabelManager { + @Resource + private SessionFactory sessionFactory; @Override public void addLabel(@NotNull final Label label) { @@ -35,31 +42,37 @@ public class LabelManagerImpl extends HibernateDaoSupport @Override public void saveLabel(@NotNull final Label label) { - currentSession().save(label); + getSession().persist(label); + } + + private Session getSession() { + return sessionFactory.getCurrentSession(); } @NotNull @Override - @SuppressWarnings("unchecked") public List