Skip to content

Commit

Permalink
Merge pull request #504 from pagopa/PPANTT-138-feat-add-standin-flag
Browse files Browse the repository at this point in the history
[PPANTT-138] feat: add standin flag
  • Loading branch information
pasqualespica authored Oct 3, 2024
2 parents 745386a + 0d31225 commit 6562d18
Show file tree
Hide file tree
Showing 23 changed files with 139 additions and 19 deletions.
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: pagopa-selfcare-ms-backoffice
description: Microservice that manage api keys for pagopa product from selfcare
type: application
version: 0.403.0
appVersion: "2.25.0-3-next"
version: 0.404.0
appVersion: "2.25.0-4-PPANTT-138-feat-add-standin-flag"
dependencies:
- name: microservice-chart
version: 2.4.0
Expand Down
2 changes: 1 addition & 1 deletion helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-selfcare-ms-backoffice-backend
tag: "2.25.0-3-next"
tag: "2.25.0-4-PPANTT-138-feat-add-standin-flag"
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-selfcare-ms-backoffice-backend
tag: "2.25.0-3-next" #improve
tag: "2.25.0-4-PPANTT-138-feat-add-standin-flag" #improve
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-selfcare-ms-backoffice-backend
tag: "2.25.0-3-next" #improve
tag: "2.25.0-4-PPANTT-138-feat-add-standin-flag" #improve
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down
36 changes: 35 additions & 1 deletion openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Microservice to manage PagoPA Backoffice",
"termsOfService": "https://www.pagopa.gov.it/",
"title": "SelfCare Backoffice",
"version": "2.25.0-3-next"
"version": "2.25.0-4-PPANTT-138-feat-add-standin-flag"
},
"servers": [
{
Expand Down Expand Up @@ -13135,6 +13135,7 @@
},
"ChannelDetailsDto": {
"required": [
"flag_standin",
"validationUrl"
],
"type": "object",
Expand Down Expand Up @@ -13174,6 +13175,10 @@
"type": "boolean",
"description": " flag io"
},
"flag_standin": {
"type": "boolean",
"description": "Represents the authorization to use the standin mode with this station"
},
"ip": {
"type": "string",
"description": " channel's ip"
Expand Down Expand Up @@ -13396,6 +13401,10 @@
"enabled": {
"type": "boolean"
},
"flagStandin": {
"type": "boolean",
"description": "Represents the authorization to use the standin mode with this station"
},
"flag_io": {
"type": "boolean",
"description": " flag io"
Expand Down Expand Up @@ -15323,6 +15332,10 @@
"type": "boolean",
"description": "Station's online flag"
},
"flagStandin": {
"type": "boolean",
"description": "Represents the authorization to use the standin mode with this station"
},
"ip": {
"type": "string",
"description": "Station's ip address"
Expand Down Expand Up @@ -15532,6 +15545,7 @@
"StationDetailsDto": {
"required": [
"brokerCode",
"flagStandin",
"primitiveVersion",
"redirectIp",
"redirectPath",
Expand Down Expand Up @@ -15569,6 +15583,9 @@
"type": "boolean",
"description": "Station's online flag"
},
"flagStandin": {
"type": "boolean"
},
"ip": {
"type": "string",
"description": "Station's ip address"
Expand Down Expand Up @@ -16315,6 +16332,7 @@
"broker_description",
"broker_psp_code",
"channel_code",
"flag_standin",
"payment_types",
"redirect_protocol",
"target_host",
Expand All @@ -16336,6 +16354,10 @@
"type": "string",
"description": "Channel code"
},
"flag_standin": {
"type": "boolean",
"description": "Represents the authorization to use the standin mode with this station"
},
"note": {
"type": "string",
"description": "channel note description by operation team"
Expand Down Expand Up @@ -16426,6 +16448,10 @@
"enabled": {
"type": "boolean"
},
"flagStandin": {
"type": "boolean",
"description": "Represents the authorization to use the standin mode with this station"
},
"modifiedAt": {
"type": "string",
"description": " modification date",
Expand Down Expand Up @@ -16670,6 +16696,10 @@
"type": "boolean",
"description": "Station's activation state"
},
"flagStandin": {
"type": "boolean",
"description": "Represents the authorization to use the standin mode with this station"
},
"isPaymentOptionsEnabled": {
"type": "boolean",
"description": "Flag that enables EC's payment options service"
Expand Down Expand Up @@ -16807,6 +16837,10 @@
"type": "boolean",
"description": "Describe if the station is active"
},
"flagStandin": {
"type": "boolean",
"description": "Represents the authorization to use the standin mode with this station"
},
"isConnectionSync": {
"type": "boolean",
"description": "Describe the station connection's type, true synchronous, false asynchronous"
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<version>2.5.14</version>
</parent>
<artifactId>pagopa-selfcare-ms-backoffice</artifactId>
<version>2.25.0-3-next</version>
<version>2.25.0-4-PPANTT-138-feat-add-standin-flag</version>
<name>SelfCare Backoffice</name>
<description>Microservice to manage PagoPA Backoffice</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public static WrapperChannelDetailsResource toResource(WrapperEntityOperations<C
resource.setModifiedBy(wrapperModel.getModifiedBy());
resource.setModifiedByOpt(wrapperModel.getModifiedByOpt());
resource.setNote(wrapperModel.getNote());
resource.setFlagStandin(model.getFlagStandin());
}
return resource;
}
Expand Down Expand Up @@ -177,6 +178,7 @@ public static ChannelDetailsResource toResource(ChannelDetails model, PspChannel
resource.setTargetPortNmp(model.getTargetPortNmp());
resource.setTargetPathNmp(model.getTargetPathNmp());
resource.setPaymentTypeList(listModel != null ? listModel.getPaymentTypeList() : new ArrayList<>());
resource.setFlagStandin(model.getFlagStandin());
}
return resource;
}
Expand Down Expand Up @@ -237,6 +239,7 @@ public static ChannelDetailsResource toResource(
resource.setModifiedAt(model.getModifiedAt());
resource.setCreatedAt(model.getCreatedAt());
resource.setNote(note);
resource.setFlagStandin(model.getFlagStandin());
}
return resource;
}
Expand Down Expand Up @@ -307,6 +310,7 @@ public static ChannelDetailsResource toResource(ChannelDetails model) {
resource.setTargetHostNmp(model.getTargetHostNmp());
resource.setTargetPortNmp(model.getTargetPortNmp());
resource.setTargetPathNmp(model.getTargetPathNmp());
resource.setFlagStandin(model.getFlagStandin());
}
return resource;
}
Expand Down Expand Up @@ -356,6 +360,7 @@ public static ChannelDetails fromChannelDetailsDto(ChannelDetailsDto model) {
resource.setPrimitiveVersion(model.getPrimitiveVersion());
resource.setFlagPspCp(model.getFlagPspCp());
resource.setPaymentTypeList(model.getPaymentTypeList());
resource.setFlagStandin(model.getFlagStandin());
}
return resource;
}
Expand All @@ -376,6 +381,7 @@ public static ChannelDetails fromWrapperChannelDetailsDto(WrapperChannelDetailsD
resource.setBrokerDescription(model.getBrokerDescription());
resource.setChannelCode(model.getChannelCode());
resource.setPaymentTypeList(model.getPaymentTypeList());
resource.setFlagStandin(model.getFlagStandin());
//default
resource.setThreadNumber(1L);
resource.setTimeoutA(15L);
Expand Down Expand Up @@ -603,6 +609,8 @@ public static WrapperChannel toWrapperChannel(WrapperEntityChannel wrapperEntity
wrapperChannel.setEnabled(wrapperEntityChannel.getEntity().getEnabled());
wrapperChannel.setBrokerDescription(wrapperEntityChannel.getEntity().getBrokerDescription());

wrapperChannel.setFlagStandin(wrapperEntityChannel.getEntity().getFlagStandin());

wrapperChannel.setWrapperStatus(wrapperEntityChannel.getStatus());
wrapperChannel.setCreatedAt(wrapperEntityChannel.getCreatedAt());
wrapperChannel.setModifiedAt(wrapperEntityChannel.getModifiedAt());
Expand Down Expand Up @@ -657,6 +665,7 @@ public static WrapperChannelResource toWrapperChannelResource(WrapperChannel wra
wrapperChannelResource.setModifiedAt(wrapperChannel.getModifiedAt());
wrapperChannelResource.setCreatedAt(wrapperChannel.getCreatedAt());
wrapperChannelResource.setPrimitiveVersion(wrapperChannel.getPrimitiveVersion());
wrapperChannelResource.setFlagStandin(wrapperChannel.getFlagStandin());

return wrapperChannelResource;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ private static StationDetailResource mapBaseStationDetails(StationDetails model)
stationDetailResource.setPrimitiveVersion(model.getPrimitiveVersion());

stationDetailResource.setIsConnectionSync(model.getIsConnectionSync() != null ? model.getIsConnectionSync() : Utility.isConnectionSync(model));
stationDetailResource.setFlagStandin(model.getFlagStandin());

stationDetailResource.setRestEndpoint(model.getRestEndpoint());
stationDetailResource.setIsPaymentOptionsEnabled(model.getIsPaymentOptionsEnabled());
Expand Down Expand Up @@ -294,6 +295,8 @@ public WrapperStation toWrapperStation(WrapperEntityStation wrapperEntityOperati
wrapperStation.setAssociatedCreditorInstitutions(wrapperEntityOperations.getEntity().getAssociatedCreditorInstitutions());
wrapperStation.setIsConnectionSync(Utility.isConnectionSync(wrapperEntityOperations.getEntity()));

wrapperStation.setFlagStandin(wrapperEntityOperations.getEntity().getFlagStandin());

wrapperStation.setWrapperStatus(wrapperEntityOperations.getStatus());
wrapperStation.setCreatedAt(wrapperEntityOperations.getCreatedAt());
wrapperStation.setModifiedAt(wrapperEntityOperations.getModifiedAt());
Expand Down Expand Up @@ -336,6 +339,7 @@ public WrapperStationResource toWrapperStationResource(WrapperStation wrapperSta
wrapperStationResource.setCreatedAt(wrapperStation.getCreatedAt());
wrapperStationResource.setModifiedAt(wrapperStation.getModifiedAt());
wrapperStationResource.setIsConnectionSync(wrapperStation.getIsConnectionSync());
wrapperStationResource.setFlagStandin(wrapperStation.getFlagStandin());

return wrapperStationResource;
}
Expand Down Expand Up @@ -440,6 +444,8 @@ public StationDetails fromDto(StationDetailsDto model) {
stationDetails.setTargetPortPof(model.getTargetPortPof());
stationDetails.setTargetHostPof(model.getTargetHostPof());

stationDetails.setFlagStandin(model.getFlagStandin());

stationDetails.setRestEndpoint(model.getRestEndpoint());
stationDetails.setIsPaymentOptionsEnabled(model.getIsPaymentOptionsEnabled());

Expand Down Expand Up @@ -473,6 +479,8 @@ public StationDetails fromWrapperStationDetailsDto(WrapperStationDetailsDto mode
stationDetails.setVersion(model.getVersion());
stationDetails.setBrokerDescription(model.getBrokerDescription());

stationDetails.setFlagStandin(model.getFlagStandin());

stationDetails.setRestEndpoint(model.getRestEndpoint());
stationDetails.setIsPaymentOptionsEnabled(model.getIsPaymentOptionsEnabled());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;


Expand Down Expand Up @@ -202,4 +203,11 @@ public class ChannelDetailsDto {

@Schema(description = "Represents the authorization to carry out the transfer of the information present in additional payment information in the tags relating to payment by card for the PA in V1")
private Boolean flagPspCp = false;

@JsonProperty("flag_standin")
@Schema(description = "Represents the authorization to use the standin mode with this station")
@NotNull
@Builder.Default
private Boolean flagStandin = false;

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
import it.pagopa.selfcare.pagopa.backoffice.model.connector.channel.PaymentModel;
import it.pagopa.selfcare.pagopa.backoffice.model.connector.channel.Protocol;
import it.pagopa.selfcare.pagopa.backoffice.model.connector.wrapper.WrapperStatus;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.*;
import lombok.experimental.SuperBuilder;

import java.time.Instant;
Expand Down Expand Up @@ -205,4 +200,9 @@ public class ChannelDetailsResource extends ChannelResource {

@Schema(description = "Flag that describe if there is a pending update for the channel")
private Boolean pendingUpdate;

@Schema(description = "Represents the authorization to use the standin mode with this station")
@Builder.Default
private Boolean flagStandin = false;

}
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,11 @@ public class WrapperChannelDetailsDto {
@NotBlank
@Schema(description = "Url jira for ChannelDetail validation")
private String validationUrl;

@JsonProperty("flag_standin")
@Schema(description = "Represents the authorization to use the standin mode with this station")
@NotNull
@Builder.Default
private Boolean flagStandin = false;

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public class WrapperChannelResource {
@NotNull
private WrapperStatus wrapperStatus;

@Schema(description = "Represents the authorization to use the standin mode with this station")
private Boolean flagStandin = false;

@Schema(description = "Primitive number version")
@JsonProperty("primitive_version")
private Integer primitiveVersion;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package it.pagopa.selfcare.pagopa.backoffice.model.connector.channel;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;

Expand Down Expand Up @@ -161,5 +162,9 @@ public class ChannelDetails extends Channel {
@JsonProperty("target_path_nmp")
private String targetPathNmp;

@JsonProperty("flag_standin")
@Schema(description = "Represents the authorization to use the standin mode with this station")
@NotNull
private Boolean flagStandin;

}
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ public class StationDetails extends Station {
@JsonProperty("target_path_pof")
private String targetPathPof;

@JsonProperty("flag_standin")
@Schema(description = "Represents the authorization to use the standin mode with this station")
@NotNull
private Boolean flagStandin;

@JsonProperty("is_payment_options_enabled")
@Schema(description = "Flag that enables EC's payment options service")
private Boolean isPaymentOptionsEnabled = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ public class WrapperChannel {

@JsonProperty("primitive_version")
private Integer primitiveVersion;

private Boolean flagStandin;

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@ public class WrapperStation {
@NotNull
private WrapperStatus wrapperStatus;

private Boolean flagStandin;

private Boolean isConnectionSync;
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ public class StationDetailResource extends StationResource {
private String note;
@Schema(description = "Flag that describe if there is a pending update for the station")
private Boolean pendingUpdate;
@Schema(description = "Represents the authorization to use the standin mode with this station")
private Boolean flagStandin = false;
@Schema(description = "Flag that enables EC's payment options service")
private Boolean isPaymentOptionsEnabled = false;
@Schema(description = "Endpoint to all the API REST of the EC")
Expand Down
Loading

0 comments on commit 6562d18

Please sign in to comment.