net.kano.joscar.ssiitem
Class DenyItem

java.lang.Object
  extended byAbstractItemObj
      extended bySimpleNamedItem
          extended byDenyItem
All Implemented Interfaces:
SsiItemObj

public class DenyItem
extends SimpleNamedItem

An SSI item object representing a user who has been "blocked," or "denied."

Note that this class is only used to store data and that changes to this object are not reflected on the server without sending the changes to the server with a ModifyItemsCmd.


Constructor Summary
DenyItem(DenyItem other)
          Creates a new blocked user item object with the same properties as the given deny item.
DenyItem(SsiItem item)
          Creates a new blocked user item object generated from the given SSI item.
DenyItem(java.lang.String sn, int id)
          Creates a new blocked user item object representing the given user and with the given blocked user ID.
DenyItem(java.lang.String sn, int id, TlvChain extraTlvs)
          Creates a new blocked user item object representing the given user and with the given blocked user ID and with the given set of additional TLV's to store in this item.
 
Method Summary
protected  int getItemType()
          Returns the SSI item type of this item.
 
Methods inherited from class SimpleNamedItem
getId, getScreenname, toSsiItem, toString
 
Methods inherited from class AbstractItemObj
addExtraTlvs, copyExtraTlvs, generateItem, generateSsiItems, getExtraTlvs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DenyItem

public DenyItem(SsiItem item)
Creates a new blocked user item object generated from the given SSI item.

Parameters:
item - a new deny item object generated from the data in the given SSI item

DenyItem

public DenyItem(DenyItem other)
Creates a new blocked user item object with the same properties as the given deny item.

Parameters:
other - a deny item to copy

DenyItem

public DenyItem(java.lang.String sn,
                int id)
Creates a new blocked user item object representing the given user and with the given blocked user ID. Note that this ID is not related to the user's buddy ID; the given ID is a unique ID for this deny item.

Parameters:
sn - the screenname of the user to block
id - a unique item ID for this deny item

DenyItem

public DenyItem(java.lang.String sn,
                int id,
                TlvChain extraTlvs)
Creates a new blocked user item object representing the given user and with the given blocked user ID and with the given set of additional TLV's to store in this item. Note that this ID is not related to the user's buddy ID; the given ID is a unique ID for this deny item.

Parameters:
sn - the screenname of the user to block
id - a unique item ID for this deny item
extraTlvs - a list of extra TLV's to store in this item
Method Detail

getItemType

protected final int getItemType()
Description copied from class: SimpleNamedItem
Returns the SSI item type of this item. This should normally return one of the SsiItem.TYPE_* constants.

Specified by:
getItemType in class SimpleNamedItem
Returns:
the SSI item type of this item