generated from pagopa/template-payments-java-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
516dee8
commit c437416
Showing
10 changed files
with
99 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
src/main/java/it/gov/pagopa/pu/bff/exception/UnparsableEntityException.java
This file was deleted.
Oops, something went wrong.
31 changes: 14 additions & 17 deletions
31
src/main/java/it/gov/pagopa/pu/bff/mapper/TaxonomyCodeMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,25 @@ | ||
package it.gov.pagopa.pu.bff.mapper; | ||
|
||
import it.gov.pagopa.pu.bff.dto.generated.TaxonomyCodeDTO; | ||
import it.gov.pagopa.pu.p4pa_organization.dto.generated.CollectionModelTaxonomyCodeDTOEmbedded; | ||
import java.util.List; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class TaxonomyCodeMapper { | ||
|
||
public List<TaxonomyCodeDTO> map(CollectionModelTaxonomyCodeDTOEmbedded input) { | ||
return input.getTaxonomyCodeDTOes().stream().map(taxonomyCodeDTO -> { | ||
TaxonomyCodeDTO element = new TaxonomyCodeDTO(); | ||
element.setOrganizationTypeDescription(taxonomyCodeDTO.getOrganizationTypeDescription()); | ||
element.setOrganizationType(taxonomyCodeDTO.getOrganizationType()); | ||
element.setMacroAreaCode(taxonomyCodeDTO.getMacroAreaCode()); | ||
element.setMacroAreaName(taxonomyCodeDTO.getMacroAreaName()); | ||
element.setMacroAreaDescription(taxonomyCodeDTO.getMacroAreaDescription()); | ||
element.setServiceTypeCode(taxonomyCodeDTO.getServiceTypeCode()); | ||
element.setServiceType(taxonomyCodeDTO.getServiceType()); | ||
element.setServiceTypeDescription(taxonomyCodeDTO.getServiceTypeDescription()); | ||
element.setCollectionReason(taxonomyCodeDTO.getCollectionReason()); | ||
element.setTaxonomyCode(taxonomyCodeDTO.getTaxonomyCode()); | ||
return element; | ||
}).toList(); | ||
public TaxonomyCodeDTO map( | ||
it.gov.pagopa.pu.p4pa_organization.dto.generated.TaxonomyCodeDTO input) { | ||
TaxonomyCodeDTO dto = new TaxonomyCodeDTO(); | ||
dto.setOrganizationTypeDescription(input.getOrganizationType()+". "+input.getOrganizationTypeDescription()); | ||
dto.setOrganizationType(input.getOrganizationType()); | ||
dto.setMacroAreaCode(input.getMacroAreaCode()); | ||
dto.setMacroAreaName(input.getMacroAreaCode()+". "+input.getMacroAreaName()); | ||
dto.setMacroAreaDescription(input.getMacroAreaDescription()); | ||
dto.setServiceTypeCode(input.getServiceTypeCode()); | ||
dto.setServiceType(input.getServiceTypeCode()+". "+input.getServiceType()); | ||
dto.setServiceTypeDescription(input.getServiceTypeDescription()); | ||
dto.setCollectionReason(input.getCollectionReason()); | ||
dto.setTaxonomyCode(input.getTaxonomyCode()); | ||
return dto; | ||
} | ||
|
||
} |
31 changes: 13 additions & 18 deletions
31
src/main/java/it/gov/pagopa/pu/bff/mapper/TaxonomyCollectionReasonMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,23 @@ | ||
package it.gov.pagopa.pu.bff.mapper; | ||
|
||
import it.gov.pagopa.pu.bff.dto.generated.TaxonomyCollectionReasonDTO; | ||
import it.gov.pagopa.pu.p4pa_organization.dto.generated.CollectionModelTaxonomyCollectionReasonDTOEmbedded; | ||
import java.util.List; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class TaxonomyCollectionReasonMapper { | ||
public List<TaxonomyCollectionReasonDTO> map(CollectionModelTaxonomyCollectionReasonDTOEmbedded input) { | ||
return input.getTaxonomyCollectionReasonDTOes().stream() | ||
.map(taxonomyCodeDTO -> { | ||
TaxonomyCollectionReasonDTO dto = new TaxonomyCollectionReasonDTO(); | ||
dto.setOrganizationTypeDescription(taxonomyCodeDTO.getOrganizationTypeDescription()); | ||
dto.setOrganizationType(taxonomyCodeDTO.getOrganizationType()); | ||
dto.setMacroAreaCode(taxonomyCodeDTO.getMacroAreaCode()); | ||
dto.setMacroAreaName(taxonomyCodeDTO.getMacroAreaName()); | ||
dto.setMacroAreaDescription(taxonomyCodeDTO.getMacroAreaDescription()); | ||
dto.setServiceTypeCode(taxonomyCodeDTO.getServiceTypeCode()); | ||
dto.setServiceType(taxonomyCodeDTO.getServiceType()); | ||
dto.setServiceTypeDescription(taxonomyCodeDTO.getServiceTypeDescription()); | ||
dto.setCollectionReason(taxonomyCodeDTO.getCollectionReason()); | ||
return dto; | ||
}) | ||
.toList(); | ||
public TaxonomyCollectionReasonDTO map( | ||
it.gov.pagopa.pu.p4pa_organization.dto.generated.TaxonomyCollectionReasonDTO input) { | ||
TaxonomyCollectionReasonDTO dto = new TaxonomyCollectionReasonDTO(); | ||
dto.setOrganizationTypeDescription(input.getOrganizationType()+". "+input.getOrganizationTypeDescription()); | ||
dto.setOrganizationType(input.getOrganizationType()); | ||
dto.setMacroAreaCode(input.getMacroAreaCode()); | ||
dto.setMacroAreaName(input.getMacroAreaCode()+". "+input.getMacroAreaName()); | ||
dto.setMacroAreaDescription(input.getMacroAreaDescription()); | ||
dto.setServiceTypeCode(input.getServiceTypeCode()); | ||
dto.setServiceType(input.getServiceTypeCode()+". "+input.getServiceType()); | ||
dto.setServiceTypeDescription(input.getServiceTypeDescription()); | ||
dto.setCollectionReason(input.getCollectionReason()); | ||
return dto; | ||
} | ||
|
||
} |
23 changes: 9 additions & 14 deletions
23
src/main/java/it/gov/pagopa/pu/bff/mapper/TaxonomyMacroAreaCodeMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,18 @@ | ||
package it.gov.pagopa.pu.bff.mapper; | ||
|
||
import it.gov.pagopa.pu.bff.dto.generated.TaxonomyMacroAreaCodeDTO; | ||
import it.gov.pagopa.pu.p4pa_organization.dto.generated.CollectionModelTaxonomyMacroAreaCodeDTOEmbedded; | ||
import java.util.List; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class TaxonomyMacroAreaCodeMapper { | ||
public List<TaxonomyMacroAreaCodeDTO> map(CollectionModelTaxonomyMacroAreaCodeDTOEmbedded input) { | ||
return input.getTaxonomyMacroAreaCodeDTOes().stream() | ||
.map(taxonomyCodeDTO -> { | ||
TaxonomyMacroAreaCodeDTO dto = new TaxonomyMacroAreaCodeDTO(); | ||
dto.setOrganizationTypeDescription(taxonomyCodeDTO.getOrganizationTypeDescription()); | ||
dto.setOrganizationType(taxonomyCodeDTO.getOrganizationType()); | ||
dto.setMacroAreaCode(taxonomyCodeDTO.getMacroAreaCode()); | ||
dto.setMacroAreaName(taxonomyCodeDTO.getMacroAreaName()); | ||
dto.setMacroAreaDescription(taxonomyCodeDTO.getMacroAreaDescription()); | ||
return dto; | ||
}) | ||
.toList(); | ||
public TaxonomyMacroAreaCodeDTO map( | ||
it.gov.pagopa.pu.p4pa_organization.dto.generated.TaxonomyMacroAreaCodeDTO input) { | ||
TaxonomyMacroAreaCodeDTO dto = new TaxonomyMacroAreaCodeDTO(); | ||
dto.setOrganizationTypeDescription(input.getOrganizationType()+". "+input.getOrganizationTypeDescription()); | ||
dto.setOrganizationType(input.getOrganizationType()); | ||
dto.setMacroAreaCode(input.getMacroAreaCode()); | ||
dto.setMacroAreaName(input.getMacroAreaCode()+". "+input.getMacroAreaName()); | ||
dto.setMacroAreaDescription(input.getMacroAreaDescription()); | ||
return dto; | ||
} | ||
} |
17 changes: 6 additions & 11 deletions
17
src/main/java/it/gov/pagopa/pu/bff/mapper/TaxonomyOrganizationTypeMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
package it.gov.pagopa.pu.bff.mapper; | ||
|
||
import it.gov.pagopa.pu.bff.dto.generated.TaxonomyOrganizationTypeDTO; | ||
import it.gov.pagopa.pu.p4pa_organization.dto.generated.CollectionModelTaxonomyOrganizationTypeDTOEmbedded; | ||
import java.util.List; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class TaxonomyOrganizationTypeMapper { | ||
public List<TaxonomyOrganizationTypeDTO> map(CollectionModelTaxonomyOrganizationTypeDTOEmbedded input) { | ||
return input.getTaxonomyOrganizationTypeDTOes().stream() | ||
.map(taxonomyCodeDTO -> { | ||
TaxonomyOrganizationTypeDTO dto = new TaxonomyOrganizationTypeDTO(); | ||
dto.setOrganizationTypeDescription(taxonomyCodeDTO.getOrganizationTypeDescription()); | ||
dto.setOrganizationType(taxonomyCodeDTO.getOrganizationType()); | ||
return dto; | ||
}) | ||
.toList(); | ||
public TaxonomyOrganizationTypeDTO map( | ||
it.gov.pagopa.pu.p4pa_organization.dto.generated.TaxonomyOrganizationTypeDTO input) { | ||
TaxonomyOrganizationTypeDTO dto = new TaxonomyOrganizationTypeDTO(); | ||
dto.setOrganizationTypeDescription(input.getOrganizationType()+". "+input.getOrganizationTypeDescription()); | ||
dto.setOrganizationType(input.getOrganizationType()); | ||
return dto; | ||
} | ||
|
||
} |
29 changes: 12 additions & 17 deletions
29
src/main/java/it/gov/pagopa/pu/bff/mapper/TaxonomyServiceTypeCodeMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,22 @@ | ||
package it.gov.pagopa.pu.bff.mapper; | ||
|
||
import it.gov.pagopa.pu.bff.dto.generated.TaxonomyServiceTypeCodeDTO; | ||
import it.gov.pagopa.pu.p4pa_organization.dto.generated.CollectionModelTaxonomyServiceTypeCodeDTOEmbedded; | ||
import java.util.List; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class TaxonomyServiceTypeCodeMapper { | ||
public List<TaxonomyServiceTypeCodeDTO> map(CollectionModelTaxonomyServiceTypeCodeDTOEmbedded input) { | ||
return input.getTaxonomyServiceTypeCodeDTOes().stream() | ||
.map(taxonomyCodeDTO -> { | ||
TaxonomyServiceTypeCodeDTO dto = new TaxonomyServiceTypeCodeDTO(); | ||
dto.setOrganizationTypeDescription(taxonomyCodeDTO.getOrganizationType()+". "+taxonomyCodeDTO.getOrganizationTypeDescription()); | ||
dto.setOrganizationType(taxonomyCodeDTO.getOrganizationType()); | ||
dto.setMacroAreaCode(taxonomyCodeDTO.getMacroAreaCode()); | ||
dto.setMacroAreaName(taxonomyCodeDTO.getMacroAreaName()); | ||
dto.setMacroAreaDescription(taxonomyCodeDTO.getMacroAreaDescription()); | ||
dto.setServiceTypeCode(taxonomyCodeDTO.getServiceTypeCode()); | ||
dto.setServiceType(taxonomyCodeDTO.getServiceType()); | ||
dto.setServiceTypeDescription(taxonomyCodeDTO.getServiceTypeDescription()); | ||
return dto; | ||
}) | ||
.toList(); | ||
public TaxonomyServiceTypeCodeDTO map( | ||
it.gov.pagopa.pu.p4pa_organization.dto.generated.TaxonomyServiceTypeCodeDTO input) { | ||
TaxonomyServiceTypeCodeDTO dto = new TaxonomyServiceTypeCodeDTO(); | ||
dto.setOrganizationTypeDescription(input.getOrganizationType()+". "+input.getOrganizationTypeDescription()); | ||
dto.setOrganizationType(input.getOrganizationType()); | ||
dto.setMacroAreaCode(input.getMacroAreaCode()); | ||
dto.setMacroAreaName(input.getMacroAreaCode()+". "+input.getMacroAreaName()); | ||
dto.setMacroAreaDescription(input.getMacroAreaDescription()); | ||
dto.setServiceTypeCode(input.getServiceTypeCode()); | ||
dto.setServiceType(input.getServiceTypeCode()+". "+input.getServiceType()); | ||
dto.setServiceTypeDescription(input.getServiceTypeDescription()); | ||
return dto; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters