public class AccountState extends Object
Constructor and Description |
---|
AccountState(com.google.gerrit.reviewdb.client.Account account,
Set<com.google.gerrit.reviewdb.client.AccountGroup.UUID> actualGroups,
Collection<com.google.gerrit.reviewdb.client.AccountExternalId> externalIds) |
Modifier and Type | Method and Description |
---|---|
com.google.gerrit.reviewdb.client.Account |
getAccount()
Get the cached account metadata.
|
Collection<com.google.gerrit.reviewdb.client.AccountExternalId> |
getExternalIds()
The external identities that identify the account holder.
|
Set<com.google.gerrit.reviewdb.client.AccountGroup.UUID> |
getInternalGroups()
The set of groups maintained directly within the Gerrit database.
|
String |
getPassword(String username) |
String |
getUserName()
Get the username, if one has been declared for this user.
|
static String |
getUserName(Collection<com.google.gerrit.reviewdb.client.AccountExternalId> ids) |
public AccountState(com.google.gerrit.reviewdb.client.Account account, Set<com.google.gerrit.reviewdb.client.AccountGroup.UUID> actualGroups, Collection<com.google.gerrit.reviewdb.client.AccountExternalId> externalIds)
public com.google.gerrit.reviewdb.client.Account getAccount()
public String getUserName()
The username is the AccountExternalId
using the scheme
AccountExternalId.SCHEME_USERNAME
.
public String getPassword(String username)
public Collection<com.google.gerrit.reviewdb.client.AccountExternalId> getExternalIds()
public Set<com.google.gerrit.reviewdb.client.AccountGroup.UUID> getInternalGroups()
public static String getUserName(Collection<com.google.gerrit.reviewdb.client.AccountExternalId> ids)