コード例 #1
0
ファイル: RosterItem.java プロジェクト: team-lab/openfire
 /**
  * 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()));
 }
コード例 #2
0
ファイル: RosterItem.java プロジェクト: team-lab/openfire
 /**
  * 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());
 }