Esempio n. 1
0
 /**
  * Create a roster item from the data in another one.
  *
  * @param item Item that contains the info of the roster item.
  */
 public RosterItem(org.xmpp.packet.Roster.Item item) {
   this(
       item.getJID(),
       getSubType(item),
       getAskStatus(item),
       RosterItem.RECV_NONE,
       item.getName(),
       new LinkedList<String>(item.getGroups()));
 }
Esempio n. 2
0
 /**
  * Update the cached item as a copy of the given item.
  *
  * <p>
  *
  * <p>A convenience for getting the item and setting each attribute.
  *
  * @param item The item who's settings will be copied into the cached copy
  * @throws org.jivesoftware.openfire.SharedGroupException if trying to remove shared group.
  */
 public void setAsCopyOf(org.xmpp.packet.Roster.Item item) throws SharedGroupException {
   setGroups(new LinkedList<String>(item.getGroups()));
   setNickname(item.getName());
 }