net.kano.joscar.ssiitem
Class PermitItem

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

public class PermitItem
extends SimpleNamedItem

An SSI item object representing a user on one's "allow" (or "permit" list. The allow list is an infrequently used privacy feature that allows one to block everyone but those on this list.

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
PermitItem(PermitItem other)
          Creates a new allowed user item object with the same properties as the given object.
PermitItem(SsiItem item)
          Creates a new allowed user item object generated from the data in the given SSI item.
PermitItem(java.lang.String sn, int id)
          Creates a new allowed user item object for the given user and with the given permit item ID.
PermitItem(java.lang.String sn, int id, TlvChain extraTlvs)
          Creates a new allowed user item object for the given properties..
 
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

PermitItem

public PermitItem(SsiItem item)
Creates a new allowed user item object generated from the data in the given SSI item.

Parameters:
item - a "permit" SSI item

PermitItem

public PermitItem(PermitItem other)
Creates a new allowed user item object with the same properties as the given object.

Parameters:
other - a permit item object to copy

PermitItem

public PermitItem(java.lang.String sn,
                  int id)
Creates a new allowed user item object for the given user and with the given permit item ID. Note that the given ID is in no way related to the buddy ID of the user.

Parameters:
sn - the screenname of the user being "allowed"
id - an ID number for this permit item

PermitItem

public PermitItem(java.lang.String sn,
                  int id,
                  TlvChain extraTlvs)
Creates a new allowed user item object for the given properties.. Note that the given ID is in no way related to the buddy ID of the user.

Parameters:
sn - the screenname of the user being "allowed"
id - an ID number for this permit item
extraTlvs - a list of extra TLV's to store in this permit item
Method Detail

getItemType

protected 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