public class Accounts extends Object
Modifier and Type | Method and Description |
---|---|
List<AccountState> |
all()
Returns all accounts.
|
Set<Account.Id> |
allIds()
Returns all account IDs.
|
List<Account.Id> |
firstNIds(int n)
Returns the first n account IDs.
|
Optional<AccountState> |
get(Account.Id accountId) |
List<AccountState> |
get(Collection<Account.Id> accountIds) |
boolean |
hasAnyAccount()
Checks if any account exists.
|
static boolean |
hasAnyAccount(org.eclipse.jgit.lib.Repository repo) |
static Stream<Account.Id> |
readUserRefs(org.eclipse.jgit.lib.Repository repo) |
public Optional<AccountState> get(Account.Id accountId) throws IOException, org.eclipse.jgit.errors.ConfigInvalidException
IOException
org.eclipse.jgit.errors.ConfigInvalidException
public List<AccountState> get(Collection<Account.Id> accountIds) throws IOException, org.eclipse.jgit.errors.ConfigInvalidException
IOException
org.eclipse.jgit.errors.ConfigInvalidException
public List<AccountState> all() throws IOException
IOException
public Set<Account.Id> allIds() throws IOException
IOException
public List<Account.Id> firstNIds(int n) throws IOException
n
- the number of account IDs that should be returnedIOException
public boolean hasAnyAccount() throws IOException
true
if at least one account exists, otherwise false
IOException
public static boolean hasAnyAccount(org.eclipse.jgit.lib.Repository repo) throws IOException
IOException
public static Stream<Account.Id> readUserRefs(org.eclipse.jgit.lib.Repository repo) throws IOException
IOException