tigase.db

## Class AuthRepositoryPool

- java.lang.Object
- - tigase.db.AuthRepositoryPool

- All Implemented Interfaces:
    AuthRepository

      public class AuthRepositoryPool
      extends Object
      implements AuthRepository

  Created: Mar 27, 2010 11:31:17 PM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Field Summary

    - ### Fields inherited from interface tigase.db.AuthRepository

      `DATA_KEY, DIGEST_ID_KEY, DIGEST_KEY, MACHANISM_KEY, PASSWORD_KEY, PROTOCOL_KEY, PROTOCOL_VAL_NONSASL, PROTOCOL_VAL_SASL, REALM_KEY, RESULT_KEY, SERVER_NAME_KEY, USER_ID_KEY, USERNAME_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuthRepositoryPool()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRepo(AuthRepository repo)` Method description
    `void` | `addUser(tigase.xmpp.BareJID user, String password)` Method description
    `boolean` | `digestAuth(tigase.xmpp.BareJID user, String digest, String id, String alg)` Deprecated.
    `String` | `getResourceUri()` Method description
    `long` | `getUsersCount()` Method description
    `long` | `getUsersCount(String domain)` Method description
    `void` | `initRepository(String resource_uri, Map<String,String> params)` Method description
    `void` | `logout(tigase.xmpp.BareJID user)` Method description
    `boolean` | `otherAuth(Map<String,Object> authProps)` Method description
    `boolean` | `plainAuth(tigase.xmpp.BareJID user, String password)` Deprecated.
    `void` | `queryAuth(Map<String,Object> authProps)` Method description
    `void` | `removeUser(tigase.xmpp.BareJID user)` Method description
    `AuthRepository` | `takeRepo()` Method description
    `void` | `updatePassword(tigase.xmpp.BareJID user, String password)` Method description

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

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

- - ### Constructor Detail

    - #### AuthRepositoryPool

          public AuthRepositoryPool()

  - ### Method Detail

    - #### addRepo

          public void addRepo(AuthRepository repo)

      Method description
      Parameters:
        `repo` -

    - #### addUser

          public void addUser(tigase.xmpp.BareJID user,
                     String password)
                       throws UserExistsException,
                              TigaseDBException

      Method description
      Specified by:
        `addUser` in interface `AuthRepository`
      Parameters:
        `user` -
        `password` -
      Throws:
        `TigaseDBException`
        `UserExistsException`

    - #### digestAuth

          @Deprecated
          public boolean digestAuth(tigase.xmpp.BareJID user,
                                      String digest,
                                      String id,
                                      String alg)
                             throws UserNotFoundException,
                                    TigaseDBException,
                                    AuthorizationException

      Deprecated.
      Method description
      Specified by:
        `digestAuth` in interface `AuthRepository`
      Parameters:
        `user` -
        `digest` -
        `id` -
        `alg` -
      Returns:
        a `boolean` value `true` on successful authentication, `false` on authentication failure.
      Throws:
        `AuthorizationException`
        `TigaseDBException`
        `UserNotFoundException`

    - #### getResourceUri

          public String getResourceUri()

      Method description
      Specified by:
        `getResourceUri` in interface `AuthRepository`
      Returns:
        a `String` value of database connection string.

    - #### getUsersCount

          public long getUsersCount()

      Method description
      Specified by:
        `getUsersCount` in interface `AuthRepository`
      Returns:
        a `long` number of registered users in the repository.

    - #### getUsersCount

          public long getUsersCount(String domain)

      Method description
      Specified by:
        `getUsersCount` in interface `AuthRepository`
      Parameters:
        `domain` -
      Returns:
        a `long` number of registered users in the repository.

    - #### initRepository

          public void initRepository(String resource_uri,
                            Map<String,String> params)
                              throws DBInitException

      Method description
      Specified by:
        `initRepository` in interface `AuthRepository`
      Parameters:
        `resource_uri` -
        `params` -
      Throws:
        `DBInitException`

    - #### logout

          public void logout(tigase.xmpp.BareJID user)
                      throws UserNotFoundException,
                             TigaseDBException

      Method description
      Specified by:
        `logout` in interface `AuthRepository`
      Parameters:
        `user` -
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### otherAuth

          public boolean otherAuth(Map<String,Object> authProps)
                            throws UserNotFoundException,
                                   TigaseDBException,
                                   AuthorizationException

      Method description
      Specified by:
        `otherAuth` in interface `AuthRepository`
      Parameters:
        `authProps` -
      Returns:
        a `boolean` value
      Throws:
        `AuthorizationException`
        `TigaseDBException`
        `UserNotFoundException`

    - #### plainAuth

          @Deprecated
          public boolean plainAuth(tigase.xmpp.BareJID user,
                                     String password)
                            throws UserNotFoundException,
                                   TigaseDBException,
                                   AuthorizationException

      Deprecated.
      Method description
      Specified by:
        `plainAuth` in interface `AuthRepository`
      Parameters:
        `user` -
        `password` -
      Returns:
        a `boolean` value `true` on successful authentication, `false` on authentication failure.
      Throws:
        `AuthorizationException`
        `TigaseDBException`
        `UserNotFoundException`

    - #### queryAuth

          public void queryAuth(Map<String,Object> authProps)

      Method description
      Specified by:
        `queryAuth` in interface `AuthRepository`
      Parameters:
        `authProps` -

    - #### removeUser

          public void removeUser(tigase.xmpp.BareJID user)
                          throws UserNotFoundException,
                                 TigaseDBException

      Method description
      Specified by:
        `removeUser` in interface `AuthRepository`
      Parameters:
        `user` -
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### takeRepo

          public AuthRepository takeRepo()

      Method description

    - #### updatePassword

          public void updatePassword(tigase.xmpp.BareJID user,
                            String password)
                              throws UserNotFoundException,
                                     TigaseDBException

      Method description
      Specified by:
        `updatePassword` in interface `AuthRepository`
      Parameters:
        `user` -
        `password` -
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

Copyright © 2014 "Tigase, Inc.". All rights reserved.