Skip to content

Commit

Permalink
FIX FINALE, ultimo commit
Browse files Browse the repository at this point in the history
E' stato un ppiacere addio
  • Loading branch information
kevinpcf committed Jan 20, 2022
1 parent ef51223 commit f704cd9
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 77 deletions.
61 changes: 2 additions & 59 deletions DigitalDonation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,10 @@
<java.version>1.8</java.version>
</properties>
<dependencies>
<!-- Spring Boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>2.4.5</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>

<dependency>
Expand Down Expand Up @@ -97,34 +90,19 @@
<artifactId>hibernate-java8</artifactId>
</dependency>

<!-- Java Mail API -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.3</version>
</dependency>

<!-- send email -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>

<!-- MySQL -->

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>

<!-- Hamcrest -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>2.0.0.0</version>
</dependency>

<!-- Spring DevTools -->
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -169,26 +147,6 @@
<artifactId>font-awesome</artifactId>
<version>5.12.0</version>
</dependency>
<!--Errors-->
<!-- https://mvnrepository.com/artifact/org.webjars/font-awesome -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.1.3.Final</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
Expand All @@ -213,27 +171,12 @@
<version>1.22.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.google.oauth-client/google-oauth-client-jetty -->
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-jetty</artifactId>
<version>1.15.0-rc</version>
</dependency>

<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-drive</artifactId>
<version>v3-rev26-1.18.0-rc</version>
</dependency>

<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>6.1.5</version>
</dependency>



</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ public String validaCodiceFiscale(String codiceFiscale) throws TesserinoFormExce
* @throws TesserinoFormException eccezione per il tesserino
*/
public String validaImage(String image) throws TesserinoFormException {
if (image == null || image.equals("")) {
if (image == null || image.isEmpty()) {
throw new TesserinoFormException("TesserinoImageError",
"Il formato dell’immagine non è corretto. "
+ "Inserire un’immagine che ha formato png o jpg.");
+ "Inserire un’immagine che ha formato png o jpeg.");
}
String end = image.substring(image.indexOf("."));
if (end.matches(".png") || end.matches(".jpeg")) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.unisa.is.c09.digitaldonation.gestionesedutemanagement.web;
package it.unisa.is.c09.digitaldonation.web;

import it.unisa.is.c09.digitaldonation.erroremanagement.organizzazioneseduteerror.CannotSaveDataRepositoryException;
import it.unisa.is.c09.digitaldonation.gestionesedutemanagement.GestioneSeduteService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.unisa.is.c09.digitaldonation.gestionesedutemanagement.web;
package it.unisa.is.c09.digitaldonation.web;

import com.google.api.services.drive.model.File;
import it.unisa.is.c09.digitaldonation.erroremanagement.organizzazioneseduteerror.CannotSaveDataRepositoryException;
Expand All @@ -25,7 +25,6 @@
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import javax.servlet.annotation.MultipartConfig;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -50,9 +49,6 @@
)
public class GestioneTesserinoController {

private static Logger logger = Logger
.getLogger(String.valueOf(OrganizzazioneSeduteController.class));

@Autowired
GestioneTesserinoService gestioneTesserinoService;
@Autowired
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.unisa.is.c09.digitaldonation.gestionesedutemanagement.web;
package it.unisa.is.c09.digitaldonation.web;

import it.unisa.is.c09.digitaldonation.erroremanagement.organizzazioneseduteerror.CannotDeleteDataRepositoryException;
import it.unisa.is.c09.digitaldonation.erroremanagement.organizzazioneseduteerror.CannotLoadDataRepositoryException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.unisa.is.c09.digitaldonation.gestionesedutemanagement.web;
package it.unisa.is.c09.digitaldonation.web;

import it.unisa.is.c09.digitaldonation.erroremanagement.gestioneutenteerror.AccessNotAuthorizedException;
import it.unisa.is.c09.digitaldonation.erroremanagement.gestioneutenteerror.UserNotLoggedException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.unisa.is.c09.digitaldonation.gestionesedutemanagement.web;
package it.unisa.is.c09.digitaldonation.web;

import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.unisa.is.c09.digitaldonation.gestionesedutemanagement.web.autogenerate;
package it.unisa.is.c09.digitaldonation.web.autogenerate;


import it.unisa.is.c09.digitaldonation.googledriveapi.GoogleDriveService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.unisa.is.c09.digitaldonation.gestionesedutemanagement.web.error;
package it.unisa.is.c09.digitaldonation.web.error;

import javax.servlet.http.HttpServletRequest;
import org.springframework.http.HttpStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package it.unisa.is.c09.digitaldonation.gestionesedutemanagement.web.filters;
package it.unisa.is.c09.digitaldonation.web.filters;


import org.jboss.logging.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,14 +516,14 @@ public void verificaValidaImageNull() {
dataDonazione = datadonazione.getTime();
tipoDonazione = "cito";

final String message = "Il formato dell’immagine non è corretto. Inserire un’immagine che ha formato png o jpg.";
final String message = "Il formato dell’immagine non è corretto. Inserire un’immagine che ha formato png o jpeg.";
try {
gestioneTesserinoService.validaImage(null);
} catch (TesserinoFormException exception) {
assertEquals(message, exception.getMessage());
return;
}
fail("Errore! nessuna eccezione laciata");
fail("Errore! nessuna eccezione lanciata");
}

/**
Expand Down Expand Up @@ -777,7 +777,7 @@ public void verificaValidaResidenzaFormato() {
Calendar dataNascita = new GregorianCalendar(2000, 1, 13);
dataDiNascita = dataNascita.getTime();
luogoDiNascita = "Salerno";
residenza = "000000000";
residenza = "000000(000";
email = "[email protected]";
gruppoSanguigno = "A";
rh = "POS";
Expand All @@ -797,7 +797,7 @@ public void verificaValidaResidenzaFormato() {
assertEquals(message, exception.getMessage());
return;
}
fail("Errore! nessuna eccezione laciata");
fail("Errore! nessuna eccezione lanciata");
}

/**
Expand Down

0 comments on commit f704cd9

Please sign in to comment.