Class CitizenConsentDTOToObjectMapper
java.lang.Object
it.gov.pagopa.onboarding.citizen.model.mapper.CitizenConsentDTOToObjectMapper
Mapper service converting transport CitizenConsentDTO into domain CitizenConsent aggregates.
Performs a deep copy of the consents map, transforming each CitizenConsentDTO.ConsentDTO into a ConsentDetails.
Inverse operation of CitizenConsentObjectToDTOMapper.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmap(CitizenConsentDTO citizenConsentDTO) Converts a transportCitizenConsentDTOinto a domainCitizenConsent.
-
Constructor Details
-
CitizenConsentDTOToObjectMapper
public CitizenConsentDTOToObjectMapper()
-
-
Method Details
-
map
Converts a transport
CitizenConsentDTOinto a domainCitizenConsent.Maps the entire consents map:
Map<String, ConsentDTO>→Map<String, ConsentDetails>.- Parameters:
citizenConsentDTO- source DTO containing fiscal code and consent details (must not benull)- Returns:
- domain aggregate with fiscal code and mapped consent details
- Throws:
NullPointerException- ifcitizenConsentDTOorconsentsmap isnull
-