Skip to content

Commit

Permalink
[SELC-6150] feat: add institutionAggregatorContractMappings field in …
Browse files Browse the repository at this point in the history
…Product (#663)
  • Loading branch information
giulia-tremolada authored Jan 8, 2025
1 parent 29c5794 commit 8fc11b2
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 10 deletions.
2 changes: 1 addition & 1 deletion apps/onboarding-functions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<skipITs>true</skipITs>
<surefire-plugin.version>3.1.2</surefire-plugin.version>
<mapstruct.version>1.5.5.Final</mapstruct.version>
<commons-sdk-version>0.6.2</commons-sdk-version>
<commons-sdk-version>0.6.3</commons-sdk-version>
</properties>

<dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion apps/onboarding-ms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<skipITs>true</skipITs>
<surefire-plugin.version>3.1.2</surefire-plugin.version>
<quarkus-openapi-generator.version>2.4.1</quarkus-openapi-generator.version>
<commons-sdk-version>0.6.2</commons-sdk-version>
<commons-sdk-version>0.6.3</commons-sdk-version>
</properties>
<dependencyManagement>
<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>pom</packaging>

<properties>
<commons-sdk-version>0.6.2</commons-sdk-version>
<commons-sdk-version>0.6.3</commons-sdk-version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion libs/onboarding-sdk-azure-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>it.pagopa.selfcare</groupId>
<artifactId>onboarding-sdk-pom</artifactId>
<version>0.6.2</version>
<version>0.6.3</version>
<relativePath>../onboarding-sdk-pom</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion libs/onboarding-sdk-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>it.pagopa.selfcare</groupId>
<artifactId>onboarding-sdk-pom</artifactId>
<version>0.6.2</version>
<version>0.6.3</version>
<relativePath>../onboarding-sdk-pom</relativePath>
</parent>
<artifactId>onboarding-sdk-common</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion libs/onboarding-sdk-crypto/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>it.pagopa.selfcare</groupId>
<artifactId>onboarding-sdk-pom</artifactId>
<version>0.6.2</version>
<version>0.6.3</version>
<relativePath>../onboarding-sdk-pom</relativePath>
</parent>
<artifactId>onboarding-sdk-crypto</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion libs/onboarding-sdk-pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>onboarding-sdk-pom</artifactId>
<packaging>pom</packaging>
<name>onboarding-sdk-pom</name>
<version>0.6.2</version>
<version>0.6.3</version>

<properties>
<maven.compiler.source>17</maven.compiler.source>
Expand Down
4 changes: 2 additions & 2 deletions libs/onboarding-sdk-product/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<parent>
<groupId>it.pagopa.selfcare</groupId>
<artifactId>onboarding-sdk-pom</artifactId>
<version>0.6.2</version>
<version>0.6.3</version>
<relativePath>../onboarding-sdk-pom</relativePath>
</parent>
<artifactId>onboarding-sdk-product</artifactId>
<name>onboarding-sdk-product</name>
<version>0.6.2</version>
<version>0.6.3</version>

<properties>
<jackson.version>2.15.2</jackson.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public class Product {
private Product parent;
private List<String> consumers;
private Map<String, ContractTemplate> institutionContractMappings;
private Map<String, ContractTemplate> institutionAggregatorContractMappings;

private Map<String, ContractTemplate> userContractMappings;
private Map<String, ContractTemplate> userAggregatorContractMappings;

Expand Down Expand Up @@ -294,6 +296,15 @@ public void setInstitutionContractMappings(
this.institutionContractMappings = institutionContractMappings;
}

public Map<String, ContractTemplate> getInstitutionAggregatorContractMappings() {
return institutionAggregatorContractMappings;
}

public void setInstitutionAggregatorContractMappings(
Map<String, ContractTemplate> institutionAggregatorContractMappings) {
this.institutionAggregatorContractMappings = institutionAggregatorContractMappings;
}

public Map<String, ContractTemplate> getUserContractMappings() {
return userContractMappings;
}
Expand Down Expand Up @@ -377,4 +388,17 @@ && getUserAggregatorContractMappings().containsKey(institutionType)) {
}
return userAggregatorContractTemplate;
}

public ContractTemplate getInstitutionAggregatorContractTemplate(String institutionType) {
ContractTemplate contractTemplate = new ContractTemplate();
if (Objects.nonNull(getInstitutionAggregatorContractMappings())) {
if (Objects.nonNull(institutionType)
&& getInstitutionAggregatorContractMappings().containsKey(institutionType)) {
contractTemplate = getInstitutionAggregatorContractMappings().get(institutionType);
} else if (getInstitutionAggregatorContractMappings().containsKey(CONTRACT_TYPE_DEFAULT)) {
contractTemplate = getInstitutionAggregatorContractMappings().get(CONTRACT_TYPE_DEFAULT);
}
}
return contractTemplate;
}
}
2 changes: 1 addition & 1 deletion test-coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
**/utils/**, **/*Constant*, **/*Config.java, **/error/**, **/filter/**, org/**
</sonar.coverage.exclusions>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<commons-sdk-version>0.6.2</commons-sdk-version>
<commons-sdk-version>0.6.3</commons-sdk-version>
</properties>

<build>
Expand Down

0 comments on commit 8fc11b2

Please sign in to comment.