Package tigase.db
Class AuthRepository.SingleCredential
- java.lang.Object
-
- tigase.db.AuthRepository.SingleCredential
-
- All Implemented Interfaces:
Credentials
- Enclosing interface:
- AuthRepository
public static class AuthRepository.SingleCredential extends java.lang.Object implements Credentials
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface tigase.auth.credentials.Credentials
Credentials.Decoder, Credentials.Encoder, Credentials.Entry, Credentials.RawEntry
-
-
Field Summary
-
Fields inherited from interface tigase.auth.credentials.Credentials
DEFAULT_CREDENTIAL_ID, DEFAULT_USERNAME
-
-
Constructor Summary
Constructors Constructor Description SingleCredential(BareJID user, AuthRepository.AccountStatus accountStatus, Credentials.Entry entry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanLogin()Checks if account can perform logging-inAuthRepository.AccountStatusgetAccountStatus()Credentials.EntrygetEntryForMechanism(java.lang.String mechanism)Find a credential for specified mechanismCredentials.EntrygetFirst()Returns first available instance of credentials entryBareJIDgetUser()Returns bare jid of an accountbooleanisAccountDisabled()Checks if account is disabledjava.lang.StringtoString()
-
-
-
Constructor Detail
-
SingleCredential
public SingleCredential(BareJID user, AuthRepository.AccountStatus accountStatus, Credentials.Entry entry)
-
-
Method Detail
-
getEntryForMechanism
public Credentials.Entry getEntryForMechanism(java.lang.String mechanism)
Description copied from interface:CredentialsFind a credential for specified mechanism- Specified by:
getEntryForMechanismin interfaceCredentials- Returns:
- instance of an entry if available or null
-
getFirst
public Credentials.Entry getFirst()
Description copied from interface:CredentialsReturns first available instance of credentials entry- Specified by:
getFirstin interfaceCredentials- Returns:
- first available instance of credentials entry
-
canLogin
public boolean canLogin()
Description copied from interface:CredentialsChecks if account can perform logging-in- Specified by:
canLoginin interfaceCredentials
-
getUser
public BareJID getUser()
Description copied from interface:CredentialsReturns bare jid of an account- Specified by:
getUserin interfaceCredentials- Returns:
- bare jid of an account
-
isAccountDisabled
public boolean isAccountDisabled()
Description copied from interface:CredentialsChecks if account is disabled- Specified by:
isAccountDisabledin interfaceCredentials
-
getAccountStatus
public AuthRepository.AccountStatus getAccountStatus()
- Specified by:
getAccountStatusin interfaceCredentials- Returns:
- account status of the account
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-