public class PrivacyList extends Object implements Cacheable, Externalizable
| Constructor and Description |
|---|
PrivacyList()
Constructor added for Externalizable.
|
PrivacyList(String username,
String name,
boolean isDefault,
org.dom4j.Element listElement) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
org.xmpp.packet.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(org.xmpp.packet.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) |
public PrivacyList()
public org.xmpp.packet.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(org.xmpp.packet.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()
throws CannotCalculateSizeException
CacheablegetCachedSize in interface CacheableCannotCalculateSizeExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © 2003-2008 Jive Software.