Enforced deleteProject method

This commit is contained in:
Francesco Mangiacrapa 2024-05-10 12:25:20 +02:00
parent 89ddb6bc5f
commit acaf4eb37c
3 changed files with 124 additions and 9 deletions

View File

@ -124,6 +124,17 @@
@ -271,6 +282,17 @@
@ -418,6 +440,17 @@
@ -565,6 +598,17 @@
@ -664,6 +708,17 @@
@ -686,6 +741,20 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="geoportal-client-1.2.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-client/geoportal-client">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -958,6 +1027,17 @@
@ -1105,6 +1185,17 @@
@ -1252,6 +1343,17 @@

View File

@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Integrated new Uri-Resolver-Manager [#27160]
- Added Get Shareable Link facility [#27120]
- Added optional message when performing lifecycle step [#27192]
- Enforced deleteProject method
## [v3.2.2] - 2024-01-11

View File

@ -1010,6 +1010,18 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
SessionUtil.getCurrentContext(getThreadLocalRequest(), true);
client.deleteProject(profileID, projectID, true);
try {
Project deletedP = client.getProjectByID(profileID, projectID);
if(deletedP!=null) {
String error = "The project with id: "+projectID+" still exists";
LOG.error(error +". Sending exception..");
throw new Exception(error);
}
}catch (Exception e) {
throw e;
}
// Updating count of Documents in session per profileID
Integer totalProjectForProfile = client.getTotalDocument(profileID);
SessionUtil.setTotalDocumentForProfileID(getThreadLocalRequest(), profileID, totalProjectForProfile);