|
Openfire 3.6.3 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.privacy.PrivacyListManager
public class PrivacyListManager
A Privacy list manager creates, gets, updates and removes privacy lists. Loaded lists are kept in memory using a cache that will keep them at most for 6 hours.
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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.
|
Openfire 3.6.3 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |