tigase.db

## Class DummyRepository

- java.lang.Object
- - tigase.db.DummyRepository

- All Implemented Interfaces:
    AuthRepository, UserRepository

      public class DummyRepository
      extends Object
      implements UserRepository, AuthRepository

  DummyRepository is a class with all methods empty. They don't return anything and they don't throw exception. SessionManager requires a user repository to work properly but in some installations there is no need for user repository as authentication is done through external data source and user roster is pulled dynamically. Created: Sat Nov 3 16:17:03 2007
  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
    `DummyRepository()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDataList(tigase.xmpp.BareJID user, String subnode, String key, String[] list)` Describe `addDataList` method here.
    `void` | `addUser(tigase.xmpp.BareJID user)` Describe `addUser` method here.
    `void` | `addUser(tigase.xmpp.BareJID user, String password)` Method description
    `boolean` | `digestAuth(tigase.xmpp.BareJID user, String digest, String id, String alg)` Deprecated.
    `String` | `getData(tigase.xmpp.BareJID user, String key)` Describe `getData` method here.
    `String` | `getData(tigase.xmpp.BareJID user, String subnode, String key)` Describe `getData` method here.
    `String` | `getData(tigase.xmpp.BareJID user, String subnode, String key, String def)` Describe `getData` method here.
    `String[]` | `getDataList(tigase.xmpp.BareJID user, String subnode, String key)` Describe `getDataList` method here.
    `String[]` | `getKeys(tigase.xmpp.BareJID user)` Describe `getKeys` method here.
    `String[]` | `getKeys(tigase.xmpp.BareJID user, String subnode)` Describe `getKeys` method here.
    `String` | `getResourceUri()` Describe `getResourceUri` method here.
    `String[]` | `getSubnodes(tigase.xmpp.BareJID user)` Describe `getSubnodes` method here.
    `String[]` | `getSubnodes(tigase.xmpp.BareJID user, String subnode)` Describe `getSubnodes` method here.
    `List<tigase.xmpp.BareJID>` | `getUsers()` Describe `getUsers` method here.
    `long` | `getUsersCount()` Describe `getUsersCount` method here.
    `long` | `getUsersCount(String domain)` Method description
    `long` | `getUserUID(tigase.xmpp.BareJID user)` Method description
    `void` | `initRepository(String string, Map<String,String> params)` Describe `initRepository` method here.
    `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` | `removeData(tigase.xmpp.BareJID user, String key)` Describe `removeData` method here.
    `void` | `removeData(tigase.xmpp.BareJID user, String subnode, String key)` Describe `removeData` method here.
    `void` | `removeSubnode(tigase.xmpp.BareJID user, String subnode)` Describe `removeSubnode` method here.
    `void` | `removeUser(tigase.xmpp.BareJID user)` Describe `removeUser` method here.
    `void` | `setData(tigase.xmpp.BareJID user, String key, String value)` Describe `setData` method here.
    `void` | `setData(tigase.xmpp.BareJID user, String subnode, String key, String value)` Describe `setData` method here.
    `void` | `setDataList(tigase.xmpp.BareJID user, String subnode, String key, String[] list)` Describe `setDataList` method here.
    `void` | `updatePassword(tigase.xmpp.BareJID user, String password)` 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

    - #### DummyRepository

          public DummyRepository()

  - ### Method Detail

    - #### addDataList

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

      Describe `addDataList` method here.
      Specified by:
        `addDataList` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
        `subnode` - a `String` value is a node path where data is stored. Node path has the same form as directory path on file system:

            /root/subnode1/subnode2

        .
        `key` - a `String` with which the specified values list is to be associated.
        `list` - a `String[]` is an array of values to be assosiated with the specified key.

    - #### addUser

          public void addUser(tigase.xmpp.BareJID user)

      Describe `addUser` method here.
      Specified by:
        `addUser` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user id consisting of user name and domain address.

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

    - #### getData

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

      Describe `getData` method here.
      Specified by:
        `getData` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
        `subnode` - a `String` value is a node path where data is stored. Node path has the same form as directory path on file system:

            /root/subnode1/subnode2

        .
        `key` - a `String` with which the needed value is associated.
        `def` - a `String` value which is returned in case if data for specified key does not exixist in repository.
      Returns:
        a `String` value of null always.

    - #### getData

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

      Describe `getData` method here.
      Specified by:
        `getData` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
        `subnode` - a `String` value is a node path where data is stored. Node path has the same form as directory path on file system:

            /root/subnode1/subnode2

        .
        `key` - a `String` with which the needed value is associated.
      Returns:
        a `String` value of null always.

    - #### getData

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

      Describe `getData` method here.
      Specified by:
        `getData` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
        `key` - a `String` with which the needed value is associated.
      Returns:
        a `String` value of null always.

    - #### getDataList

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

      Describe `getDataList` method here.
      Specified by:
        `getDataList` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
        `subnode` - a `String` value is a node path where data is stored. Node path has the same form as directory path on file system:

            /root/subnode1/subnode2

        .
        `key` - a `String` with which the needed values list is associated.
      Returns:
        a `String[]` value

    - #### getKeys

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

      Describe `getKeys` method here.
      Specified by:
        `getKeys` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
        `subnode` - a `String` value is a node path where data is stored. Node path has the same form as directory path on file system:

            /root/subnode1/subnode2

        .
      Returns:
        a `String[]` value

    - #### getKeys

          public String[] getKeys(tigase.xmpp.BareJID user)

      Describe `getKeys` method here.
      Specified by:
        `getKeys` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
      Returns:
        a `String[]` value

    - #### getResourceUri

          public String getResourceUri()

      Describe `getResourceUri` method here.
      Specified by:
        `getResourceUri` in interface `AuthRepository`
      Specified by:
        `getResourceUri` in interface `UserRepository`
      Returns:
        a `String` value

    - #### getSubnodes

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

      Describe `getSubnodes` method here.
      Specified by:
        `getSubnodes` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
        `subnode` - a `String` value is a node path where data is stored. Node path has the same form as directory path on file system:

            /root/subnode1/subnode2

        .
      Returns:
        a `String[]` value

    - #### getSubnodes

          public String[] getSubnodes(tigase.xmpp.BareJID user)

      Describe `getSubnodes` method here.
      Specified by:
        `getSubnodes` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
      Returns:
        a `String[]` value

    - #### 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()

      Describe `getUsers` method here.
      Specified by:
        `getUsers` in interface `UserRepository`
      Returns:
        a `List` value

    - #### getUsersCount

          public long getUsersCount()

      Describe `getUsersCount` method here.
      Specified by:
        `getUsersCount` in interface `AuthRepository`
      Specified by:
        `getUsersCount` in interface `UserRepository`
      Returns:
        a `long` value

    - #### getUsersCount

          public long getUsersCount(String domain)

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

    - #### initRepository

          public void initRepository(String string,
                            Map<String,String> params)

      Describe `initRepository` method here.
      Specified by:
        `initRepository` in interface `AuthRepository`
      Specified by:
        `initRepository` in interface `UserRepository`
      Parameters:
        `string` - a `String` value
        `params` -

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

    - #### removeData

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

      Describe `removeData` method here.
      Specified by:
        `removeData` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
        `subnode` - a `String` value is a node path where data is stored. Node path has the same form as directory path on file system:

            /root/subnode1/subnode2

        .
        `key` - a `String` for which the value is to be removed.

    - #### removeData

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

      Describe `removeData` method here.
      Specified by:
        `removeData` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
        `key` - a `String` for which the value is to be removed.

    - #### removeSubnode

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

      Describe `removeSubnode` method here.
      Specified by:
        `removeSubnode` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
        `subnode` - a `String` value is a node path to subnode which has to be removed. Node path has the same form as directory path on file system:

            /root/subnode1/subnode2

        .

    - #### removeUser

          public void removeUser(tigase.xmpp.BareJID user)

      Describe `removeUser` method here.
      Specified by:
        `removeUser` in interface `AuthRepository`
      Specified by:
        `removeUser` in interface `UserRepository`
      Parameters:
        `user` - a `String` value

    - #### setData

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

      Describe `setData` method here.
      Specified by:
        `setData` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
        `subnode` - a `String` value is a node path where data is stored. Node path has the same form as directory path on file system:

            /root/subnode1/subnode2

        .
        `key` - a `String` with which the specified value is to be associated.
        `value` - a `String` value to be associated with the specified key.

    - #### setData

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

      Describe `setData` method here.
      Specified by:
        `setData` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
        `key` - a `String` with which the specified value is to be associated.
        `value` - a `String` value to be associated with the specified key.

    - #### setDataList

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

      Describe `setDataList` method here.
      Specified by:
        `setDataList` in interface `UserRepository`
      Parameters:
        `user` - a `String` value of user ID for which data must be stored. User ID consists of user name and domain name.
        `subnode` - a `String` value is a node path where data is stored. Node path has the same form as directory path on file system:

            /root/subnode1/subnode2

        .
        `key` - a `String` with which the specified values list is to be associated.
        `list` - a `String[]` is an array of values to be assosiated with the specified key.

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

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