|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.columbia.coms6901.pingtel.pingim.HelperClass | +--edu.columbia.coms6901.pingtel.pingim.BuddyList
Buddy List implementation. Operates as a collection of buddies. Includes methods for adding, deleting, and querying the vector of buddies.
Field Summary | |
private static java.util.Vector |
buddies
the list of buddies |
protected static int |
MSG_PROMPT
Display buddy list and prompt for message for this buddy |
protected static int |
NO_PROMPT
Display the buddy list without prompting for information |
Fields inherited from class edu.columbia.coms6901.pingtel.pingim.HelperClass |
application |
Constructor Summary | |
BuddyList()
Creates a new instance of BuddyList |
Method Summary | |
void |
add(Buddy buddy)
Adds a buddy to the list |
private void |
addViaInsertionSort(Buddy buddy)
Adds a buddy into the buddy list using an insertion sort |
static boolean |
delete(Buddy buddy)
Deletes a buddy from the list. |
protected void |
display(MenuSystem menuSystem)
Displays the buddy list and prompts for an action. |
protected static java.util.Vector |
getBuddyList()
Returns a vector of all the buddies |
static Buddy |
isBuddy(java.lang.String sSIP)
Determines if a buddy has in our buddy list corresponds to a SIP address |
static void |
reset()
Resets the buddy-list |
protected static java.lang.String |
simplifySIPAddress(java.lang.String sSIP)
Given a SIP address in String form, returns the SIP address in it's most basic form, i.e., username@host. |
static void |
subscribeToBuddies()
Subscribes to all buddies in our buddy-list |
static boolean |
subscribeToBuddy(Buddy buddy)
Subscribes to a buddy. |
static void |
unsubscribeToBuddies()
Unsubscribes to all subscribed buddies in our buddy-list |
static boolean |
unsubscribeToBuddy(Buddy buddy)
Unsubscribes to a buddy. |
Methods inherited from class edu.columbia.coms6901.pingtel.pingim.HelperClass |
setApplication |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static java.util.Vector buddies
protected static final int MSG_PROMPT
protected static final int NO_PROMPT
Constructor Detail |
public BuddyList()
Method Detail |
public static void reset()
public void add(Buddy buddy)
buddy
- Buddy to be added to buddy-listprivate void addViaInsertionSort(Buddy buddy)
buddy
- The buddy to be insertedpublic static boolean delete(Buddy buddy) throws IMException
buddy
- Buddy to be delete from the buddy-listIMException
- thrown if delete failsprotected void display(MenuSystem menuSystem)
menuSystem
- The PingIM menusystem objectpublic static boolean subscribeToBuddy(Buddy buddy)
buddy
- Buddy that we're addingpublic static boolean unsubscribeToBuddy(Buddy buddy)
buddy
- Buddy that we're no longer subscribing topublic static void subscribeToBuddies()
public static void unsubscribeToBuddies()
public static Buddy isBuddy(java.lang.String sSIP)
sSIP
- the SIP address we're looking forprotected static java.lang.String simplifySIPAddress(java.lang.String sSIP)
sSIP
- SIP address, in String formprotected static java.util.Vector getBuddyList()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |