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
    --- | --- | ---
    `boolean` | `canLogin()` | Checks if account can perform logging-in
    `AuthRepository.AccountStatus` | `getAccountStatus()` |
    `Credentials.Entry` | `getEntryForMechanism​(java.lang.String mechanism)` | Find a credential for specified 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
    `java.lang.String` | `toString()` |

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

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

- - ### 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: `Credentials`
      Find a credential for specified 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 java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`