@Service public class CmsPsuService extends Object
| Constructor and Description |
|---|
CmsPsuService() |
| Modifier and Type | Method and Description |
|---|---|
Optional<PsuData> |
definePsuDataForAuthorisation(PsuData psuDataForCheck,
List<PsuData> psuDataList)
Checks if the specified psuData is in the psu list, if it is true then returns an element from the list.
|
List<PsuData> |
enrichPsuData(PsuData psuData,
List<PsuData> psuDataList)
Adds psuData to psuDataList if it is not there
|
boolean |
isPsuDataListEqual(@NotNull List<PsuData> psuDataList,
@NotNull List<PsuData> anotherPsuDataList)
Checks whether two specified lists of PSU Data are equals
|
boolean |
isPsuDataNew(PsuData psuData,
List<PsuData> psuDataList)
Checks if the specified psuData is in the psu list
|
boolean |
isPsuDataRequestCorrect(PsuData psuRequest,
PsuData psuAuth)
Checks if the specified psu in request equals psu in authorisation
|
public Optional<PsuData> definePsuDataForAuthorisation(PsuData psuDataForCheck, List<PsuData> psuDataList)
psuDataForCheck - psu which will search in the listpsuDataList - list where will search psuDatapublic List<PsuData> enrichPsuData(PsuData psuData, List<PsuData> psuDataList)
psuData - psu which will search in the listpsuDataList - list where will search psuDatapublic boolean isPsuDataNew(PsuData psuData, List<PsuData> psuDataList)
psuData - psu which will search in the listpsuDataList - list where will search psuDatapublic boolean isPsuDataListEqual(@NotNull
@NotNull List<PsuData> psuDataList,
@NotNull
@NotNull List<PsuData> anotherPsuDataList)
This method ignores internal entity identifier of PsuData when comparing lists.
psuDataList - the first list to be compared, must not be nullanotherPsuDataList - the second list to be compared, must not be nulltrue if two lists are equal, false otherwisepublic boolean isPsuDataRequestCorrect(PsuData psuRequest, PsuData psuAuth)
psuRequest - psu in requestpsuAuth - psu in authorisationCopyright © 2019. All rights reserved.