public class PrivacyListManager extends Object
Modifier and Type | Method and Description |
---|---|
void |
addListener(PrivacyListEventListener listener)
Registers a listener to receive events when a privacy list is created, updated or deleted.
|
void |
changeDefaultList(String username,
PrivacyList newDefault,
PrivacyList oldDefault)
Sets a given privacy list as the new default list of the user.
|
PrivacyList |
createPrivacyList(String username,
String listName,
org.dom4j.Element listElement)
Creates a new privacy list for the specified user.
|
void |
deletePrivacyList(String username,
String listName)
Deletes an existing privacy list of a user.
|
void |
deletePrivacyLists(String username)
Deletes all privacy lists of a user.
|
PrivacyList |
getDefaultPrivacyList(String username)
Returns the default privacy list of the specified user or null if
none was found.
|
static PrivacyListManager |
getInstance()
Returns the unique instance of this class.
|
PrivacyList |
getPrivacyList(String username,
String listName)
Returns a specific privacy list of the specified user or null if
none was found.
|
void |
removeListener(PrivacyListEventListener listener)
Unregisters a listener to receive events.
|
public static PrivacyListManager getInstance()
public PrivacyList createPrivacyList(String username, String listName, org.dom4j.Element listElement)
username
- the username of the list owner.listName
- the name of the new privacy list.listElement
- the XML that specifies the list and its items.public void deletePrivacyList(String username, String listName)
username
- the username of the list owner.listName
- the name of the list being deleted.public void deletePrivacyLists(String username)
username
- the username of the list owner.public PrivacyList getDefaultPrivacyList(String username)
username
- the name of the user to get his default list.public PrivacyList getPrivacyList(String username, String listName)
username
- the name of the user to get his privacy list.listName
- the name of the list to get.public void changeDefaultList(String username, PrivacyList newDefault, PrivacyList oldDefault)
username
- the name of the user that is setting a new default list.newDefault
- the new default privacy list.oldDefault
- the previous privacy list or null if no default list existed.public void addListener(PrivacyListEventListener listener)
listener
- the listener.public void removeListener(PrivacyListEventListener listener)
listener
- the listener.Copyright © 2003-2008 Jive Software.