public class AccountState
extends java.lang.Object
Constructor and Description |
---|
AccountState(com.google.gerrit.reviewdb.client.Account account,
java.util.Set<com.google.gerrit.reviewdb.client.AccountGroup.UUID> actualGroups,
java.util.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.
|
java.util.Set<java.lang.String> |
getEmailAddresses()
All email addresses registered to this account.
|
java.util.Collection<com.google.gerrit.reviewdb.client.AccountExternalId> |
getExternalIds()
The external identities that identify the account holder.
|
java.util.Set<com.google.gerrit.reviewdb.client.AccountGroup.UUID> |
getInternalGroups()
The set of groups maintained directly within the Gerrit database.
|
java.lang.String |
getPassword(java.lang.String username) |
java.lang.String |
getUserName()
Get the username, if one has been declared for this user.
|
public AccountState(com.google.gerrit.reviewdb.client.Account account, java.util.Set<com.google.gerrit.reviewdb.client.AccountGroup.UUID> actualGroups, java.util.Collection<com.google.gerrit.reviewdb.client.AccountExternalId> externalIds)
public com.google.gerrit.reviewdb.client.Account getAccount()
public java.lang.String getUserName()
The username is the AccountExternalId
using the scheme
AccountExternalId.SCHEME_USERNAME
.
public java.lang.String getPassword(java.lang.String username)
public java.util.Set<java.lang.String> getEmailAddresses()
Gerrit is "reasonably certain" that the returned email addresses actually belong to the user of the account. Some emails may have been obtained from the authentication provider, which in the case of OpenID may be trusting the provider to have validated the address. Other emails may have been validated by Gerrit directly.
public java.util.Collection<com.google.gerrit.reviewdb.client.AccountExternalId> getExternalIds()
public java.util.Set<com.google.gerrit.reviewdb.client.AccountGroup.UUID> getInternalGroups()