tigase.db

## Class UserRepositoryMDImpl

- java.lang.Object
- - tigase.db.UserRepositoryMDImpl

- All Implemented Interfaces:
    UserRepository

      public class UserRepositoryMDImpl
      extends Object
      implements UserRepository

  Created: Mar 27, 2010 6:43:02 PM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UserRepositoryMDImpl()`

  - ### 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(String domain, 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
    `UserRepository` | `getRepo(String domain)` 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
    `UserRepository` | `removeRepo(String domain)` 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
    `void` | `setDefault(UserRepository repo)` 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

    - #### UserRepositoryMDImpl

          public UserRepositoryMDImpl()

  - ### 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(String domain,
                     UserRepository repo)

      Method description
      Parameters:
        `domain` -
        `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`

    - #### getRepo

          public UserRepository getRepo(String domain)

      Method description
      Parameters:
        `domain` -

    - #### 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`

    - #### removeRepo

          public UserRepository removeRepo(String domain)

      Method description
      Parameters:
        `domain` -

    - #### 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`

    - #### setDefault

          public void setDefault(UserRepository repo)

      Method description
      Parameters:
        `repo` -

    - #### 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.