Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire.privacy
Class PrivacyListProvider

    java.lang.Object
      org.jivesoftware.openfire.privacy.PrivacyListProvider

    public class PrivacyListProvider

extends Object

Provider for the privacy lists system. Privacy lists are read and written from the `ofPrivacyList` database table.

Author:
  Gaston Dombiak

Constructor Summary
`PrivacyListProvider()`

Method Summary
`void` | `createPrivacyList(String username, PrivacyList list)` Creates and saves the new privacy list to the database.
`void` | `deletePrivacyList(String username, String listName)` Deletes an existing privacy list from the database.
`void` | `deletePrivacyLists(String username)` Deletes all existing privacy list from the database for the given user.
`Map<String,Boolean>` | `getPrivacyLists(String username)` Returns the names of the existing privacy lists indicating which one is the default privacy list associated to a user.
`PrivacyList` | `loadDefaultPrivacyList(String username)` Loads the default privacy list of a given user from the database.
`PrivacyList` | `loadPrivacyList(String username, String listName)` Loads the requested privacy list from the database.
`void` | `updatePrivacyList(String username, PrivacyList list)` Updated the existing privacy list in the database.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PrivacyListProvider

    public PrivacyListProvider()

Method Detail

### getPrivacyLists

    public Map<String,Boolean> getPrivacyLists(String username)

  Returns the names of the existing privacy lists indicating which one is the default privacy list associated to a user.

  Parameters:
    `username` - the username of the user to get his privacy lists names.
  Returns:
    the names of the existing privacy lists with a default flag.

### loadPrivacyList

    public PrivacyList loadPrivacyList(String username,
                                       String listName)

  Loads the requested privacy list from the database. Returns `null` if a list with the specified name does not exist.

  Parameters:
    `username` - the username of the user to get his privacy list.
    `listName` - name of the list to load.
  Returns:
    the privacy list with the specified name or `null` if a list with the specified name does not exist.

### loadDefaultPrivacyList

    public PrivacyList loadDefaultPrivacyList(String username)

  Loads the default privacy list of a given user from the database. Returns `null` if no list was found.

  Parameters:
    `username` - the username of the user to get his default privacy list.
  Returns:
    the default privacy list or `null` if no list was found.

### createPrivacyList

    public void createPrivacyList(String username,
                                  PrivacyList list)

  Creates and saves the new privacy list to the database.

  Parameters:
    `username` - the username of the user that created a new privacy list.
    `list` - the PrivacyList to save.

### updatePrivacyList

    public void updatePrivacyList(String username,
                                  PrivacyList list)

  Updated the existing privacy list in the database.

  Parameters:
    `username` - the username of the user that updated a privacy list.
    `list` - the PrivacyList to update in the database.

### deletePrivacyList

    public void deletePrivacyList(String username,
                                  String listName)

  Deletes an existing privacy list from the database.

  Parameters:
    `username` - the username of the user that deleted a privacy list.
    `listName` - the name of the PrivacyList to delete.

### deletePrivacyLists

    public void deletePrivacyLists(String username)

  Deletes all existing privacy list from the database for the given user.

  Parameters:
    `username` - the username of the user whose privacy lists are going to be deleted.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.8.2 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.