Skip to content

Commit

Permalink
Issue #320
Browse files Browse the repository at this point in the history
Rinominato campo versioneCSV in versioneZip per la configurazione del connettore govpay di tipo Email o File System.
  • Loading branch information
pintorig committed May 20, 2021
1 parent ae4e1c1 commit 881236e
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ And match response.servizioGovPay.<field> == checkValue
Examples:
| field | value | retValue |
| abilitato | false | false |
| versioneCsv | '1.0' | '1.0' |
| versioneZip | '1.0' | '1.0' |
| emailIndirizzi | ['pec2@creditore.it'] | ['pec2@creditore.it'] |
| emailIndirizzi | ['pec2@creditore.it' , 'pec3@creditore.it' ] | ['pec2@creditore.it' , 'pec3@creditore.it' ] |
| emailSubject | '[Govpay] Export pagamenti Secim tipo pendenza #(codEntrataSegreteria)' | '[Govpay] Export pagamenti Secim tipo pendenza #(codEntrataSegreteria)' |
Expand Down Expand Up @@ -73,7 +73,7 @@ And match response.servizioGovPay.<field> == checkValue
Examples:
| field | value | retValue |
| abilitato | false | false |
| versioneCsv | '1.0' | '1.0' |
| versioneZip | '1.0' | '1.0' |
| fileSystemPath | '/var/' | '/var/' |
| tipiPendenza | [ '#(codEntrataSegreteria)' ] | [{ 'idTipoPendenza' : '#(codEntrataSegreteria)' , 'descrizione' : 'Diritti e segreteria'}] |
| tipiPendenza | [{ 'idTipoPendenza' : '#(codEntrataSegreteria)' , 'descrizione' : 'Diritti e segreteria'}] | [{ 'idTipoPendenza' : '#(codEntrataSegreteria)' , 'descrizione' : 'Diritti e segreteria'}] |
Expand Down Expand Up @@ -105,7 +105,6 @@ And match response.servizioGovPay.<field> == checkValue
Examples:
| field | value | retValue |
| abilitato | false | false |
| versioneCsv | '1.0' | '1.0' |
| url | 'http://prova.it' | 'http://prova.it' |
| versioneApi | 'REST v1' | 'REST v1' |
| auth | { username: 'usr', password: 'pwd' } | { username: 'usr', password: 'pwd' } |
Expand Down Expand Up @@ -137,7 +136,7 @@ Then status 400

Examples:
| field | fieldRequest | fieldValue | fieldResponse |
| versioneCsv | versioneCsv | null | 'versioneCsv' |
| versioneZip | versioneZip | null | 'versioneZip' |
| emailIndirizzi | emailIndirizzi | null | 'emailIndirizzi' |
| emailIndirizzi | emailIndirizzi | ['mail@errata@it'] | 'emailIndirizzi' |
| tipiPendenza | tipiPendenza | null | 'tipiPendenza' |
Expand Down Expand Up @@ -184,7 +183,7 @@ Then status 400

Examples:
| field | fieldRequest | fieldValue | fieldResponse |
| versioneCsv | versioneCsv | null | 'versioneCsv' |
| versioneZip | versioneZip | null | 'versioneZip' |
| fileSystemPath | fileSystemPath | null | 'fileSystemPath' |
| tipiPendenza | tipiPendenza | null | 'tipiPendenza' |
| tipiPendenza | tipiPendenza | [ '#(loremIpsum)' ] | 'idTipoPendenza' |
Expand All @@ -210,7 +209,6 @@ Then status 400

Examples:
| field | fieldRequest | fieldValue | fieldResponse |
| versioneCsv | versioneCsv | null | 'versioneCsv' |
| contenuti | contenuti | null | 'contenuti' |
| contenuti | contenuti | ['XXXX'] | 'contenuti' |
| tipiPendenza | tipiPendenza | null | 'tipiPendenza' |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"emailIndirizzi" : [ "pec@creditore.it" ],
"emailAllegato" : true,
"downloadBaseUrl" : "http://localhost:8080/servizioDownloadTracciati",
"versioneCsv" : "1.0",
"versioneZip" : "1.0",
"tipiPendenza" : [ "*" ]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Background:
* def basicAutenticationHeader = getBasicAuthenticationHeader( { username: govpay_backoffice_user, password: govpay_backoffice_password } )
* def dominio = read('classpath:test/api/backoffice/v1/domini/put/msg/dominio-connettore-govpay.json')

* set dominio.servizioGovPay.versioneCsv = "3.0"
* set dominio.servizioGovPay.tipoConnettore = 'REST'
* set dominio.servizioGovPay.url = 'http://localhost:8888/enteRendicontazioni'
* set dominio.servizioGovPay.versioneApi = 'REST v1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@com.fasterxml.jackson.annotation.JsonPropertyOrder({
"abilitato",
"tipoConnettore",
"versioneCsv",
"versioneZip",
"emailIndirizzi",
"emailSubject",
"emailAllegato",
Expand Down Expand Up @@ -86,8 +86,8 @@ public static TipoConnettoreEnum fromValue(String text) {
@JsonProperty("tipoConnettore")
private TipoConnettoreEnum tipoConnettore = null;

@JsonProperty("versioneCsv")
private String versioneCsv = null;
@JsonProperty("versioneZip")
private String versioneZip = null;

@JsonProperty("emailIndirizzi")
private List<String> emailIndirizzi = null;
Expand Down Expand Up @@ -209,19 +209,19 @@ public void setTipoConnettore(TipoConnettoreEnum tipoConnettore) {
}

/**
* Versione del CSV prodotto.
* Versione del file zip prodotto.
**/
public ConnettoreNotificaPagamentiGovPay versioneCsv(String versioneCsv) {
this.versioneCsv = versioneCsv;
public ConnettoreNotificaPagamentiGovPay versioneZip(String versioneZip) {
this.versioneZip = versioneZip;
return this;
}

@JsonProperty("versioneCsv")
public String getVersioneCsv() {
return versioneCsv;
@JsonProperty("versioneZip")
public String getVersioneZip() {
return versioneZip;
}
public void setVersioneCsv(String versioneCsv) {
this.versioneCsv = versioneCsv;
public void setVersioneZip(String versioneZip) {
this.versioneZip = versioneZip;
}

/**
Expand Down Expand Up @@ -419,7 +419,7 @@ public boolean equals(java.lang.Object o) {
ConnettoreNotificaPagamentiGovPay connettoreNotificaPagamentiGovPay = (ConnettoreNotificaPagamentiGovPay) o;
return Objects.equals(abilitato, connettoreNotificaPagamentiGovPay.abilitato) &&
Objects.equals(tipoConnettore, connettoreNotificaPagamentiGovPay.tipoConnettore) &&
Objects.equals(versioneCsv, connettoreNotificaPagamentiGovPay.versioneCsv) &&
Objects.equals(versioneZip, connettoreNotificaPagamentiGovPay.versioneZip) &&
Objects.equals(emailIndirizzi, connettoreNotificaPagamentiGovPay.emailIndirizzi) &&
Objects.equals(emailSubject, connettoreNotificaPagamentiGovPay.emailSubject) &&
Objects.equals(emailAllegato, connettoreNotificaPagamentiGovPay.emailAllegato) &&
Expand All @@ -434,7 +434,7 @@ public boolean equals(java.lang.Object o) {

@Override
public int hashCode() {
return Objects.hash(abilitato, tipoConnettore, versioneCsv, emailIndirizzi, emailSubject, emailAllegato, downloadBaseUrl, fileSystemPath, tipiPendenza, url, versioneApi, auth, contenuti);
return Objects.hash(abilitato, tipoConnettore, versioneZip, emailIndirizzi, emailSubject, emailAllegato, downloadBaseUrl, fileSystemPath, tipiPendenza, url, versioneApi, auth, contenuti);
}

public static ConnettoreNotificaPagamentiGovPay parse(String json) throws ServiceException, ValidationException {
Expand All @@ -453,7 +453,7 @@ public String toString() {

sb.append(" abilitato: ").append(toIndentedString(abilitato)).append("\n");
sb.append(" tipoConnettore: ").append(toIndentedString(tipoConnettore)).append("\n");
sb.append(" versioneCsv: ").append(toIndentedString(versioneCsv)).append("\n");
sb.append(" versioneZip: ").append(toIndentedString(versioneZip)).append("\n");
sb.append(" emailIndirizzi: ").append(toIndentedString(emailIndirizzi)).append("\n");
sb.append(" emailSubject: ").append(toIndentedString(emailSubject)).append("\n");
sb.append(" emailAllegato: ").append(toIndentedString(emailAllegato)).append("\n");
Expand Down Expand Up @@ -486,10 +486,10 @@ public void validate() throws ValidationException {

if(this.abilitato) {
vf.getValidator("tipoConnettore", this.tipoConnettore).notNull();
vf.getValidator("versioneCsv", this.versioneCsv).notNull().minLength(1).maxLength(255);

switch (this.tipoConnettore) {
case EMAIL:
vf.getValidator("versioneZip", this.versioneZip).notNull().minLength(1).maxLength(255);
if(this.emailIndirizzi != null && !this.emailIndirizzi.isEmpty()) {
for (String indirizzo : emailIndirizzi) {
vf.getValidator("emailIndirizzi", indirizzo).minLength(1).pattern(CostantiValidazione.PATTERN_EMAIL);
Expand All @@ -506,6 +506,7 @@ public void validate() throws ValidationException {
}
break;
case FILESYSTEM:
vf.getValidator("versioneZip", this.versioneZip).notNull().minLength(1).maxLength(255);
vf.getValidator("fileSystemPath", this.fileSystemPath).notNull().minLength(1).maxLength(4000);
break;
case REST:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public static it.govpay.model.ConnettoreNotificaPagamenti getConnettoreDTO(it.go

if(connector.Abilitato()) {
connettore.setTipoTracciato(tipo.name());
connettore.setVersioneCsv(connector.getVersioneCsv());

// boolean appAuthTipiPendenzaAll = false;
if(connector.getTipiPendenza() != null) {
Expand Down Expand Up @@ -111,13 +110,15 @@ public static it.govpay.model.ConnettoreNotificaPagamenti getConnettoreDTO(it.go

switch (connector.getTipoConnettore()) {
case EMAIL:
connettore.setVersioneCsv(connector.getVersioneZip());
connettore.setTipoConnettore(TipoConnettore.EMAIL);
connettore.setEmailIndirizzi(connector.getEmailIndirizzi());
connettore.setEmailSubject(connector.getEmailSubject());
connettore.setEmailAllegato(connector.EmailAllegato());
connettore.setDownloadBaseURL(connector.getDownloadBaseUrl());
break;
case FILESYSTEM:
connettore.setVersioneCsv(connector.getVersioneZip());
connettore.setTipoConnettore(TipoConnettore.FILE_SYSTEM);
connettore.setFileSystemPath(connector.getFileSystemPath());
break;
Expand Down Expand Up @@ -169,17 +170,17 @@ public static it.govpay.backoffice.v1.beans.ConnettoreNotificaPagamentiGovPay to

rsModel.setAbilitato(connettore.isAbilitato());
if(connettore.isAbilitato()) {
rsModel.setVersioneCsv(connettore.getVersioneCsv());

switch (connettore.getTipoConnettore()) {
case EMAIL:
rsModel.setVersioneZip(connettore.getVersioneCsv());
rsModel.setTipoConnettore(TipoConnettoreEnum.EMAIL);
rsModel.setEmailIndirizzi(connettore.getEmailIndirizzi());
rsModel.setEmailSubject(connettore.getEmailSubject());
rsModel.setEmailAllegato(connettore.isEmailAllegato());
rsModel.setDownloadBaseUrl(connettore.getDownloadBaseURL());
break;
case FILE_SYSTEM:
rsModel.setVersioneZip(connettore.getVersioneCsv());
rsModel.setTipoConnettore(TipoConnettoreEnum.FILESYSTEM);
rsModel.setFileSystemPath(connettore.getFileSystemPath());
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7646,7 +7646,6 @@ components:
required:
- abilitato
- tipoConnettore
- versioneCsv
properties:
abilitato:
type: boolean
Expand All @@ -7658,10 +7657,10 @@ components:
- 'EMAIL'
- 'FILESYSTEM'
- 'REST'
versioneCsv:
versioneZip:
type: string
example: '7.0'
description: Versione del CSV prodotto.
description: Versione del file zip prodotto.
emailIndirizzi:
type: array
items:
Expand Down

0 comments on commit 881236e

Please sign in to comment.