Class CitizenControllerImpl
- All Implemented Interfaces:
CitizenController
CitizenController.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<org.springframework.http.ResponseEntity<String>> bloomFilterSearch(String fiscalCode) Checks Bloom filter membership and enabled consent existence.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CitizenConsentDTO>> deleteCitizenConsent(String fiscalCode) Deletes the citizen consent aggregate.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CitizenConsentDTO>> getCitizenConsentsList(String fiscalCode) Retrieves all consents for the citizen.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CitizenConsentDTO>> getCitizenConsentsListEnabled(String fiscalCode) Retrieves only enabled consents for the citizen.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CitizenConsentDTO>> getCitizenConsentStatus(String fiscalCode, String tppId) Retrieves consent status for the given TPP.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<List<CitizenConsentDTO>>> getCitizenEnabled(String tppId) Retrieves citizens with an enabled consent for a TPP id.getTppEnabledList(String fiscalCode) Lists enabled TPP identifiers for the citizen.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CitizenConsentDTO>> saveCitizenConsent(String fiscalCode, String tppId) Creates or reuses a consent for the specified TPP.reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CitizenConsentDTO>> stateSwitch(String fiscalCode, String tppId) Toggles the consent state for the specified TPP.
-
Constructor Details
-
CitizenControllerImpl
-
-
Method Details
-
saveCitizenConsent
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CitizenConsentDTO>> saveCitizenConsent(String fiscalCode, String tppId) Creates or reuses a consent for the specified TPP.
Delegates to
CitizenService.createCitizenConsent(String, String).Endpoint:
POST /emd/citizen/{fiscalCode}/{tppId}- Specified by:
saveCitizenConsentin interfaceCitizenController- Parameters:
fiscalCode- plain fiscal code (regex validated)tppId- TPP identifier (regex validated)- Returns:
Mono<ResponseEntity<CitizenConsentDTO>>200 OK with requested consent DTO
-
stateSwitch
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CitizenConsentDTO>> stateSwitch(String fiscalCode, String tppId) Toggles the consent state for the specified TPP.
Delegates to
CitizenService.switchState(String, String).Endpoint:
PUT /emd/citizen/{fiscalCode}/{tppId}- Specified by:
stateSwitchin interfaceCitizenController- Parameters:
fiscalCode- plain fiscal code (regex validated)tppId- TPP identifier (regex validated)- Returns:
Mono<ResponseEntity<CitizenConsentDTO>>200 OK with updated consent DTO
-
getCitizenConsentStatus
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CitizenConsentDTO>> getCitizenConsentStatus(String fiscalCode, String tppId) Retrieves consent status for the given TPP.
Delegates to
CitizenService.getCitizenConsentStatus(String, String).Endpoint:
GET /emd/citizen/{fiscalCode}/{tppId}- Specified by:
getCitizenConsentStatusin interfaceCitizenController- Parameters:
fiscalCode- plain fiscal code (regex validated)tppId- TPP identifier (regex validated)- Returns:
Mono<ResponseEntity<CitizenConsentDTO>>200 OK with consent DTO
-
getTppEnabledList
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<List<String>>> getTppEnabledList(String fiscalCode) Lists enabled TPP identifiers for the citizen.
Delegates to
CitizenService.getTppEnabledList(String).Endpoint:
GET /emd/citizen/list/{fiscalCode}/enabled/tpp- Specified by:
getTppEnabledListin interfaceCitizenController- Parameters:
fiscalCode- plain fiscal code (regex validated)- Returns:
Mono<ResponseEntity<List<String>>>200 OK with enabled TPP ids (possibly empty)
-
getCitizenConsentsList
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CitizenConsentDTO>> getCitizenConsentsList(String fiscalCode) Retrieves all consents for the citizen.
Delegates to
CitizenService.getCitizenConsentsList(String).Endpoint:
GET /emd/citizen/list/{fiscalCode}- Specified by:
getCitizenConsentsListin interfaceCitizenController- Parameters:
fiscalCode- plain fiscal code (regex validated)- Returns:
Mono<ResponseEntity<CitizenConsentDTO>>200 OK with full consents DTO
-
getCitizenConsentsListEnabled
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CitizenConsentDTO>> getCitizenConsentsListEnabled(String fiscalCode) Retrieves only enabled consents for the citizen.
Delegates to
CitizenService.getCitizenConsentsListEnabled(String).Endpoint:
GET /emd/citizen/list/{fiscalCode}/enabled- Specified by:
getCitizenConsentsListEnabledin interfaceCitizenController- Parameters:
fiscalCode- plain fiscal code (regex validated)- Returns:
Mono<ResponseEntity<CitizenConsentDTO>>200 OK with filtered DTO
-
getCitizenEnabled
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<List<CitizenConsentDTO>>> getCitizenEnabled(String tppId) Retrieves citizens with an enabled consent for a TPP id.
Delegates to
CitizenService.getCitizenEnabled(String).Endpoint:
GET /emd/citizen/{tppId}- Specified by:
getCitizenEnabledin interfaceCitizenController- Parameters:
tppId- TPP identifier (regex validated)- Returns:
Mono<ResponseEntity<List<CitizenConsentDTO>>>200 OK with list (possibly empty)
-
deleteCitizenConsent
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<CitizenConsentDTO>> deleteCitizenConsent(String fiscalCode) Deletes the citizen consent aggregate.
Delegates to
CitizenService.deleteCitizenConsent(String).Endpoint:
DELETE /emd/citizen/test/delete/{fiscalCode}- Specified by:
deleteCitizenConsentin interfaceCitizenController- Parameters:
fiscalCode- plain fiscal code (regex validated)- Returns:
Mono<ResponseEntity<CitizenConsentDTO>>200 OK with deleted snapshot DTO
-
bloomFilterSearch
public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<String>> bloomFilterSearch(String fiscalCode) Checks Bloom filter membership and enabled consent existence.
Delegates to
CitizenService.getCitizenInBloomFilter(String); maps boolean to textual status.Endpoint:
GET /emd/citizen/filter/{fiscalCode}- Specified by:
bloomFilterSearchin interfaceCitizenController- Parameters:
fiscalCode- plain fiscal code (regex validated)- Returns:
Mono<ResponseEntity<String>>200 OK with status ("OK" or "NO CHANNELS ENABLED")
-