ExternalIdCache: Add method to get external IDs by account ID + scheme

Change-Id: I800c41923facbfe9194ce47716ed2d23d0ffd70a
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2017-01-31 15:12:29 +01:00
parent 6d2fedd8e6
commit 20e5507d46
3 changed files with 13 additions and 15 deletions

View File

@@ -210,8 +210,8 @@ public class GpgKeys implements
@VisibleForTesting
public static FluentIterable<AccountExternalId> getGpgExtIds(
ExternalIdCache externalIdCache, Account.Id accountId) {
return FluentIterable.from(externalIdCache.byAccount(accountId))
.filter(in -> in.isScheme(SCHEME_GPGKEY));
return FluentIterable.from(
externalIdCache.byAccount(accountId, SCHEME_GPGKEY));
}
private Iterable<AccountExternalId> getGpgExtIds(AccountResource rsrc) {