Wildfire 3.2.4 Javadoc

org.jivesoftware.wildfire.privacy
Class PrivacyListProvider

java.lang.Object
  extended by org.jivesoftware.wildfire.privacy.PrivacyListProvider

public class PrivacyListProvider
extends Object

Provider for the privacy lists system. Privacy lists are read and written from the jivePrivacyList 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.

Wildfire 3.2.4 Javadoc

Copyright © 2003-2007 Jive Software.