|
Openfire 3.6.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.privacy.PrivacyList
public class PrivacyList
A privacy list contains a set of rules that define if communication with the list owner is allowed or denied. Users may have zero, one or more privacy lists. When a list is the default list then that list is going to be used by default for all user sessions or analyze, when user is offline, if communication may proceed (e.g. define if a message should be stored offline). A user may configure is he wants to have a default list or not. When no default list is defined then communication will not be blocked. However, users may define an active list for a particular session. Active lists override default list (if there is one) and will be used only for the duration of the session.
Constructor Summary | |
---|---|
PrivacyList()
Constructor added for Externalizable. |
|
PrivacyList(String username,
String name,
boolean isDefault,
org.dom4j.Element listElement)
|
Method Summary | |
---|---|
org.dom4j.Element |
asElement()
Returns an Element with the privacy list XML representation. |
boolean |
equals(Object object)
|
int |
getCachedSize()
Returns the approximate size of the Object in bytes. |
String |
getName()
Returns the name that uniquely identifies this list among the users lists. |
JID |
getUserJID()
Returns the JID of the user that owns this privacy list. |
int |
hashCode()
|
boolean |
isDefault()
Returns true if this privacy list is the default list to apply for the user. |
void |
readExternal(ObjectInput in)
|
void |
setDefaultList(boolean isDefault)
Sets if this privacy list is the default list to apply for the user. |
boolean |
shouldBlockPacket(Packet packet)
Returns true if the specified packet must be blocked based on this privacy list rules. |
void |
updateList(org.dom4j.Element listElement)
Sets the new list items based on the specified Element. |
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrivacyList()
public PrivacyList(String username, String name, boolean isDefault, org.dom4j.Element listElement)
Method Detail |
---|
public JID getUserJID()
public String getName()
public boolean isDefault()
public void setDefaultList(boolean isDefault)
isDefault
- true if this privacy list is the default list to apply for the user.public boolean shouldBlockPacket(Packet packet)
packet
- the packet to analyze if it must be blocked.
public org.dom4j.Element asElement()
public void updateList(org.dom4j.Element listElement)
listElement
- the element containing a list of items.public int getCachedSize()
Cacheable
getCachedSize
in interface Cacheable
public int hashCode()
hashCode
in class Object
public boolean equals(Object object)
equals
in class Object
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
|
Openfire 3.6.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |