01: /**
02: * $Revision$
03: * $Date$
04: *
05: * Copyright (C) 2006-2007 Jive Software. All rights reserved.
06: *
07: * This software is published under the terms of the GNU Public License (GPL),
08: * a copy of which is included in this distribution.
09: */package org.jivesoftware.openfire.gateway.protocols.yahoo;
10:
11: import org.jivesoftware.openfire.gateway.roster.TransportBuddy;
12: import org.jivesoftware.openfire.gateway.roster.TransportBuddyManager;
13: import org.jivesoftware.openfire.gateway.pseudoroster.PseudoRosterItem;
14: import org.openymsg.network.YahooUser;
15:
16: import java.util.Collection;
17:
18: /**
19: * @author Daniel Henninger
20: */
21: public class YahooBuddy extends TransportBuddy {
22:
23: public YahooBuddy(TransportBuddyManager manager,
24: YahooUser yahooUser, String nickname,
25: Collection<String> groups, PseudoRosterItem rosterItem) {
26: super (manager, yahooUser.getId(), nickname, groups);
27: this .yahooUser = yahooUser;
28: this .pseudoRosterItem = rosterItem;
29: String custommsg = this .yahooUser.getCustomStatusMessage();
30: if (custommsg != null) {
31: this .verboseStatus = custommsg;
32: }
33:
34: this .setPresenceAndStatus(((YahooTransport) getManager()
35: .getSession().getTransport())
36: .convertYahooStatusToXMPP(yahooUser.getStatus()),
37: yahooUser.getCustomStatusMessage());
38: }
39:
40: public YahooUser yahooUser = null;
41:
42: public PseudoRosterItem pseudoRosterItem = null;
43:
44: }
|