Class CmsPsuService
- java.lang.Object
-
- de.adorsys.psd2.consent.service.psu.CmsPsuService
-
@Service public class CmsPsuService extends Object
-
-
Constructor Summary
Constructors Constructor Description CmsPsuService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 therebooleanisPsuDataListEqual(@NotNull List<PsuData> psuDataList, @NotNull List<PsuData> anotherPsuDataList)Checks whether two specified lists of PSU Data are equalsbooleanisPsuDataNew(PsuData psuData, List<PsuData> psuDataList)Checks if the specified psuData is in the psu listbooleanisPsuDataRequestCorrect(PsuData psuRequest, PsuData psuAuth)Checks if the specified psu in request equals psu in authorisation
-
-
-
Method Detail
-
definePsuDataForAuthorisation
public 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. If psuData is absent then returns this psu- Parameters:
psuDataForCheck- psu which will search in the listpsuDataList- list where will search psuData- Returns:
- if the psuData is not in the psuDataList then will return this psuData otherwise return element form list
-
enrichPsuData
public List<PsuData> enrichPsuData(PsuData psuData, List<PsuData> psuDataList)
Adds psuData to psuDataList if it is not there- Parameters:
psuData- psu which will search in the listpsuDataList- list where will search psuData- Returns:
- List with psuData
-
isPsuDataNew
public boolean isPsuDataNew(PsuData psuData, List<PsuData> psuDataList)
Checks if the specified psuData is in the psu list- Parameters:
psuData- psu which will search in the listpsuDataList- list where will search psuData- Returns:
- if the psuData is not in the psuDataList then will return true otherwise return false
-
isPsuDataListEqual
public boolean isPsuDataListEqual(@NotNull @NotNull List<PsuData> psuDataList, @NotNull @NotNull List<PsuData> anotherPsuDataList)Checks whether two specified lists of PSU Data are equalsThis method ignores internal entity identifier of PsuData when comparing lists.
- Parameters:
psuDataList- the first list to be compared, must not be nullanotherPsuDataList- the second list to be compared, must not be null- Returns:
trueif two lists are equal,falseotherwise
-
isPsuDataRequestCorrect
public boolean isPsuDataRequestCorrect(PsuData psuRequest, PsuData psuAuth)
Checks if the specified psu in request equals psu in authorisation- Parameters:
psuRequest- psu in requestpsuAuth- psu in authorisation- Returns:
- true if psu in authorisation is null or equals psu in request
-
-