private static Set < String > removeDecision ( final LdapAttribute ldapConsent , final long decisionId ) { val result = new HashSet < String > ( ) ; if ( ldapConsent . size ( ) != 0 ) { ldapConsent . getStringValues ( ) . stream ( ) . map ( LdapConsentRepository :: mapFromJson ) . filter ( d -> d . getId ( ) != decisionId ) . map ( LdapConsentRepository :: mapToJson ) . filter ( Objects :: nonNull ) . forEach ( result :: add ) ; } return result ; }
Removes decision from ldap attribute set .