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 Object implements Credentials

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface tigase.auth.credentials.Credentials

  `Credentials.Decoder<E extends Credentials.Entry>, Credentials.Encoder<E extends Credentials.Entry>, 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

  Modifier and Type
  Method
  Description
  `boolean`
  `canLogin()`
  Checks if account can perform logging-in
  `AuthRepository.AccountStatus`
  `getAccountStatus()`
  `Credentials.Entry`
  `getEntryForMechanism(String mechanism)`
  Find a credential for specified encryption mechanism
  `Credentials.Entry`
  `getFirst()`
  Returns first available instance of credentials entry
  `BareJID`
  `getUser()`
  Returns bare jid of an account
  `boolean`
  `isAccountDisabled()`
  Checks if account is disabled
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### SingleCredential

    public SingleCredential(BareJID user, AuthRepository.AccountStatus accountStatus, Credentials.Entry entry)

- ## Method Details

  - ### getEntryForMechanism

    public Credentials.Entry getEntryForMechanism(String mechanism)
    Description copied from interface: `Credentials`
    Find a credential for specified encryption mechanism
    Specified by:
      `getEntryForMechanism` in interface `Credentials`
    Returns:
      instance of an entry if available or null

  - ### getFirst

    public Credentials.Entry getFirst()
    Description copied from interface: `Credentials`
    Returns first available instance of credentials entry
    Specified by:
      `getFirst` in interface `Credentials`
    Returns:
      first available instance of credentials entry

  - ### canLogin

    public boolean canLogin()
    Description copied from interface: `Credentials`
    Checks if account can perform logging-in
    Specified by:
      `canLogin` in interface `Credentials`

  - ### getUser

    public BareJID getUser()
    Description copied from interface: `Credentials`
    Returns bare jid of an account
    Specified by:
      `getUser` in interface `Credentials`
    Returns:
      bare jid of an account

  - ### isAccountDisabled

    public boolean isAccountDisabled()
    Description copied from interface: `Credentials`
    Checks if account is disabled
    Specified by:
      `isAccountDisabled` in interface `Credentials`

  - ### getAccountStatus

    public AuthRepository.AccountStatus getAccountStatus()
    Specified by:
      `getAccountStatus` in interface `Credentials`
    Returns:
      account status of the account

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`