@ SneakyThrows public static IPersonAttributeDao newStubAttributeRepository ( final PrincipalAttributesProperties p ) { val dao = new NamedStubPersonAttributeDao ( ) ; val pdirMap = new LinkedHashMap < String , List < Object > > ( ) ; val stub = p . getStub ( ) ; stub . getAttributes ( ) . forEach ( ( key , value ) -> { val vals = StringUtils . commaDelimitedListToStringArray ( value ) ; pdirMap . put ( key , Arrays . stream ( vals ) . collect ( Collectors . toList ( ) ) ) ; } ) ; dao . setBackingMap ( pdirMap ) ; if ( StringUtils . hasText ( stub . getId ( ) ) ) { dao . setId ( stub . getId ( ) ) ; } return dao ; }
New attribute repository person attribute dao .