@Test public void getThumbnailPhotos() { }
public Map<String, byte[]> getThumbnailPhotos(@NonNull Collection<String> userIds) { if(userIds.isEmpty()) { return new HashMap<>(); } var query = query() .base(base) .attributes(idAttribute, "thumbnailPhoto") .countLimit(userIds.size()) .where(idAttribute).isPresent() .and("thumbnailPhoto").isPresent() .and(buildIdCriteria(userIds)); var mapEntries = ldapTemplate.search(query, new ThumbnailPhotoMapper(idAttribute)); return mapEntries.stream() .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); }
LdapAdapter { public Map<String, byte[]> getThumbnailPhotos(@NonNull Collection<String> userIds) { if(userIds.isEmpty()) { return new HashMap<>(); } var query = query() .base(base) .attributes(idAttribute, "thumbnailPhoto") .countLimit(userIds.size()) .where(idAttribute).isPresent() .and("thumbnailPhoto").isPresent() .and(buildIdCriteria(userIds)); var mapEntries = ldapTemplate.search(query, new ThumbnailPhotoMapper(idAttribute)); return mapEntries.stream() .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } }
LdapAdapter { public Map<String, byte[]> getThumbnailPhotos(@NonNull Collection<String> userIds) { if(userIds.isEmpty()) { return new HashMap<>(); } var query = query() .base(base) .attributes(idAttribute, "thumbnailPhoto") .countLimit(userIds.size()) .where(idAttribute).isPresent() .and("thumbnailPhoto").isPresent() .and(buildIdCriteria(userIds)); var mapEntries = ldapTemplate.search(query, new ThumbnailPhotoMapper(idAttribute)); return mapEntries.stream() .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } @Autowired  LdapAdapter(LdapTemplate ldapTemplate, LdapConfigurationProperties properties, Clock clock); }
LdapAdapter { public Map<String, byte[]> getThumbnailPhotos(@NonNull Collection<String> userIds) { if(userIds.isEmpty()) { return new HashMap<>(); } var query = query() .base(base) .attributes(idAttribute, "thumbnailPhoto") .countLimit(userIds.size()) .where(idAttribute).isPresent() .and("thumbnailPhoto").isPresent() .and(buildIdCriteria(userIds)); var mapEntries = ldapTemplate.search(query, new ThumbnailPhotoMapper(idAttribute)); return mapEntries.stream() .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } @Autowired  LdapAdapter(LdapTemplate ldapTemplate, LdapConfigurationProperties properties, Clock clock); Collection<LdapUserNode> getAllUserNodes(); Map<String, byte[]> getThumbnailPhotos(@NonNull Collection<String> userIds); }
LdapAdapter { public Map<String, byte[]> getThumbnailPhotos(@NonNull Collection<String> userIds) { if(userIds.isEmpty()) { return new HashMap<>(); } var query = query() .base(base) .attributes(idAttribute, "thumbnailPhoto") .countLimit(userIds.size()) .where(idAttribute).isPresent() .and("thumbnailPhoto").isPresent() .and(buildIdCriteria(userIds)); var mapEntries = ldapTemplate.search(query, new ThumbnailPhotoMapper(idAttribute)); return mapEntries.stream() .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } @Autowired  LdapAdapter(LdapTemplate ldapTemplate, LdapConfigurationProperties properties, Clock clock); Collection<LdapUserNode> getAllUserNodes(); Map<String, byte[]> getThumbnailPhotos(@NonNull Collection<String> userIds);  }