tigase.db

## Class UserRepositoryPool

- java.lang.Object
- - tigase.db.UserRepositoryPool

- All Implemented Interfaces:
    UserRepository

      public class UserRepositoryPool
      extends Object
      implements UserRepository

  Created: Jan 28, 2009 8:46:53 PM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UserRepositoryPool()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDataList(tigase.xmpp.BareJID user, String subnode, String key, String[] list)` Method description
    `void` | `addRepo(UserRepository repo)` Method description
    `void` | `addUser(tigase.xmpp.BareJID user)` Method description
    `String` | `getData(tigase.xmpp.BareJID user, String key)` Method description
    `String` | `getData(tigase.xmpp.BareJID user, String subnode, String key)` Method description
    `String` | `getData(tigase.xmpp.BareJID user, String subnode, String key, String def)` Method description
    `String[]` | `getDataList(tigase.xmpp.BareJID user, String subnode, String key)` Method description
    `String[]` | `getKeys(tigase.xmpp.BareJID user)` Method description
    `String[]` | `getKeys(tigase.xmpp.BareJID user, String subnode)` Method description
    `String` | `getResourceUri()` Method description
    `String[]` | `getSubnodes(tigase.xmpp.BareJID user)` Method description
    `String[]` | `getSubnodes(tigase.xmpp.BareJID user, String subnode)` Method description
    `List<tigase.xmpp.BareJID>` | `getUsers()` Method description
    `long` | `getUsersCount()` Method description
    `long` | `getUsersCount(String domain)` Method description
    `long` | `getUserUID(tigase.xmpp.BareJID user)` Method description
    `void` | `initRepository(String resource_uri, Map<String,String> params)` Method description
    `void` | `removeData(tigase.xmpp.BareJID user, String key)` Method description
    `void` | `removeData(tigase.xmpp.BareJID user, String subnode, String key)` Method description
    `void` | `removeSubnode(tigase.xmpp.BareJID user, String subnode)` Method description
    `void` | `removeUser(tigase.xmpp.BareJID user)` Method description
    `void` | `setData(tigase.xmpp.BareJID user, String key, String value)` Method description
    `void` | `setData(tigase.xmpp.BareJID user, String subnode, String key, String value)` Method description
    `void` | `setDataList(tigase.xmpp.BareJID user, String subnode, String key, String[] list)` Method description
    `UserRepository` | `takeRepo()` Method description
    `boolean` | `userExists(tigase.xmpp.BareJID user)` Method description

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

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

- - ### Constructor Detail

    - #### UserRepositoryPool

          public UserRepositoryPool()

  - ### Method Detail

    - #### addDataList

          public void addDataList(tigase.xmpp.BareJID user,
                         String subnode,
                         String key,
                         String[] list)
                           throws UserNotFoundException,
                                  TigaseDBException

      Method description
      Specified by:
        `addDataList` in interface `UserRepository`
      Parameters:
        `user` -
        `subnode` -
        `key` -
        `list` -
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### addRepo

          public void addRepo(UserRepository repo)

      Method description
      Parameters:
        `repo` -

    - #### addUser

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

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

    - #### getData

          public String getData(tigase.xmpp.BareJID user,
                       String subnode,
                       String key,
                       String def)
                         throws UserNotFoundException,
                                TigaseDBException

      Method description
      Specified by:
        `getData` in interface `UserRepository`
      Parameters:
        `user` -
        `subnode` -
        `key` -
        `def` -
      Returns:
        a `String` value
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### getData

          public String getData(tigase.xmpp.BareJID user,
                       String subnode,
                       String key)
                         throws UserNotFoundException,
                                TigaseDBException

      Method description
      Specified by:
        `getData` in interface `UserRepository`
      Parameters:
        `user` -
        `subnode` -
        `key` -
      Returns:
        a `String` value
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### getData

          public String getData(tigase.xmpp.BareJID user,
                       String key)
                         throws UserNotFoundException,
                                TigaseDBException

      Method description
      Specified by:
        `getData` in interface `UserRepository`
      Parameters:
        `user` -
        `key` -
      Returns:
        a `String` value
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### getDataList

          public String[] getDataList(tigase.xmpp.BareJID user,
                             String subnode,
                             String key)
                               throws UserNotFoundException,
                                      TigaseDBException

      Method description
      Specified by:
        `getDataList` in interface `UserRepository`
      Parameters:
        `user` -
        `subnode` -
        `key` -
      Returns:
        a `String[]` value
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### getKeys

          public String[] getKeys(tigase.xmpp.BareJID user,
                         String subnode)
                           throws UserNotFoundException,
                                  TigaseDBException

      Method description
      Specified by:
        `getKeys` in interface `UserRepository`
      Parameters:
        `user` -
        `subnode` -
      Returns:
        a `String[]` value
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### getKeys

          public String[] getKeys(tigase.xmpp.BareJID user)
                           throws UserNotFoundException,
                                  TigaseDBException

      Method description
      Specified by:
        `getKeys` in interface `UserRepository`
      Parameters:
        `user` -
      Returns:
        a `String[]` value
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### getResourceUri

          public String getResourceUri()

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

    - #### getSubnodes

          public String[] getSubnodes(tigase.xmpp.BareJID user,
                             String subnode)
                               throws UserNotFoundException,
                                      TigaseDBException

      Method description
      Specified by:
        `getSubnodes` in interface `UserRepository`
      Parameters:
        `user` -
        `subnode` -
      Returns:
        a `String[]` value is an array of all direct subnodes.
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### getSubnodes

          public String[] getSubnodes(tigase.xmpp.BareJID user)
                               throws UserNotFoundException,
                                      TigaseDBException

      Method description
      Specified by:
        `getSubnodes` in interface `UserRepository`
      Parameters:
        `user` -
      Returns:
        a `String[]` value is an array of all root nodes for given user.
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### getUserUID

          public long getUserUID(tigase.xmpp.BareJID user)
                          throws TigaseDBException

      Method description
      Specified by:
        `getUserUID` in interface `UserRepository`
      Parameters:
        `user` -
      Returns:
        a user inique ID number within the repository or domain. The ID is a positive number if the user exists and negative if the user was not found in the repository.
      Throws:
        `TigaseDBException`

    - #### getUsers

          public List<tigase.xmpp.BareJID> getUsers()
                                             throws TigaseDBException

      Method description
      Specified by:
        `getUsers` in interface `UserRepository`
      Returns:
        returns a collection of all user IDs (Jabber IDs) stored in the user repository.
      Throws:
        `TigaseDBException`

    - #### getUsersCount

          public long getUsersCount()

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

    - #### getUsersCount

          public long getUsersCount(String domain)

      Method description
      Specified by:
        `getUsersCount` in interface `UserRepository`
      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 `UserRepository`
      Parameters:
        `resource_uri` -
        `params` -
      Throws:
        `DBInitException`

    - #### removeData

          public void removeData(tigase.xmpp.BareJID user,
                        String subnode,
                        String key)
                          throws UserNotFoundException,
                                 TigaseDBException

      Method description
      Specified by:
        `removeData` in interface `UserRepository`
      Parameters:
        `user` -
        `subnode` -
        `key` -
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### removeData

          public void removeData(tigase.xmpp.BareJID user,
                        String key)
                          throws UserNotFoundException,
                                 TigaseDBException

      Method description
      Specified by:
        `removeData` in interface `UserRepository`
      Parameters:
        `user` -
        `key` -
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### removeSubnode

          public void removeSubnode(tigase.xmpp.BareJID user,
                           String subnode)
                             throws UserNotFoundException,
                                    TigaseDBException

      Method description
      Specified by:
        `removeSubnode` in interface `UserRepository`
      Parameters:
        `user` -
        `subnode` -
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### removeUser

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

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

    - #### setData

          public void setData(tigase.xmpp.BareJID user,
                     String subnode,
                     String key,
                     String value)
                       throws UserNotFoundException,
                              TigaseDBException

      Method description
      Specified by:
        `setData` in interface `UserRepository`
      Parameters:
        `user` -
        `subnode` -
        `key` -
        `value` -
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### setData

          public void setData(tigase.xmpp.BareJID user,
                     String key,
                     String value)
                       throws UserNotFoundException,
                              TigaseDBException

      Method description
      Specified by:
        `setData` in interface `UserRepository`
      Parameters:
        `user` -
        `key` -
        `value` -
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### setDataList

          public void setDataList(tigase.xmpp.BareJID user,
                         String subnode,
                         String key,
                         String[] list)
                           throws UserNotFoundException,
                                  TigaseDBException

      Method description
      Specified by:
        `setDataList` in interface `UserRepository`
      Parameters:
        `user` -
        `subnode` -
        `key` -
        `list` -
      Throws:
        `TigaseDBException`
        `UserNotFoundException`

    - #### takeRepo

          public UserRepository takeRepo()

      Method description

    - #### userExists

          public boolean userExists(tigase.xmpp.BareJID user)

      Method description
      Specified by:
        `userExists` in interface `UserRepository`
      Parameters:
        `user` -
      Returns:
        a `boolean` value

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