com.skype
Class Group

java.lang.Object
  extended by com.skype.Group
All Implemented Interfaces:
Serializable

public final class Group
extends Object

Implementation of the SKYPE GROUP object. The GROUP object enables users to group contacts. There are two types of GROUP ; custom groups and hardwired groups.

Author:
Koji Hisano
See Also:
https://developer.skype.com/Docs/ApiDoc/GROUP_object, Serialized Form

Nested Class Summary
static class Group.Type
          Enumeration of the type attribute.
 
Method Summary
 void addFriend(Friend friend)
          Add friend to this GROUP.
 void addPSTN(String pstn)
          Add a regular phonenumber (PSTN) to this group.
 void changeFriendDisplayName(Friend friend, String displayName)
          changes the display name for a contact.
 void changePSTNDisplayName(String pstn, String displayName)
          changes the display name for a contact.
 void dispose()
          Remove this GROUP.
 boolean equals(Object compared)
          Compare an other GROUP with this one based in their ID's.
 Friend[] getAllFriends()
          Return all authorized users.
 Object getData(String name)
          Returns the user data to which this object maps to the specified by the name.
 String getDisplayName()
          Return the displayname of this GROUP.
 String getId()
          Return the value of ID of this GROUP.
 Group.Type getType()
          Get the type of this GROUP.
 boolean hasFriend(Friend checked)
          Check for any friends.
 int hashCode()
          Return the ID as an hashcode.
 boolean isExpanded()
          Check if GROUP is expanded.
 boolean isVisible()
          Check if GROUP is visible.
 void removeFriend(Friend friend)
          Remove a friend from this GROUP.
 void removePSTN(String pstn)
          Remove a regular phonenumber (PSTN) from this group.
 void setData(String name, Object userData)
          Associates the specified user data with the specified name in this object.
 void setDisplayName(String newValue)
          Set the displayname of this GROUP.
 String toString()
          Return the GROUP ID as a string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

hashCode

public int hashCode()
Return the ID as an hashcode.

Overrides:
hashCode in class Object
Returns:
ID of this GROUP.

equals

public boolean equals(Object compared)
Compare an other GROUP with this one based in their ID's.

Overrides:
equals in class Object
Parameters:
compared - the object to compare to.
Returns:
true if object ID's are the same.

toString

public String toString()
Return the GROUP ID as a string.

Overrides:
toString in class Object
Returns:
ID as a string.

getId

public String getId()
Return the value of ID of this GROUP.

Returns:
ID.

addFriend

public void addFriend(Friend friend)
               throws SkypeException
Add friend to this GROUP.

Parameters:
friend - to add.
Throws:
SkypeException - when the connection has gone bad.

addPSTN

public void addPSTN(String pstn)
             throws SkypeException
Add a regular phonenumber (PSTN) to this group.

Parameters:
pstn - the regular phonenumber.
Throws:
SkypeException - when connection has gone bad.

removeFriend

public void removeFriend(Friend friend)
                  throws SkypeException
Remove a friend from this GROUP.

Parameters:
friend - The User to remove from this group.
Throws:
SkypeException - when connection has gone bad.

removePSTN

public void removePSTN(String pstn)
                throws SkypeException
Remove a regular phonenumber (PSTN) from this group.

Parameters:
pstn - The number to remove from this group.
Throws:
SkypeException - when the connection has gone bad.

changeFriendDisplayName

public void changeFriendDisplayName(Friend friend,
                                    String displayName)
                             throws SkypeException
changes the display name for a contact.

Parameters:
friend - The User to change this for.
displayName - The new name.
Throws:
SkypeException - when connection has gone bad.

changePSTNDisplayName

public void changePSTNDisplayName(String pstn,
                                  String displayName)
                           throws SkypeException
changes the display name for a contact.

Parameters:
pstn - The pstn to change this for.
displayName - The new name.
Throws:
SkypeException - when connection has gone bad.

getAllFriends

public Friend[] getAllFriends()
                       throws SkypeException
Return all authorized users.

Returns:
Array of Friends.
Throws:
SkypeException - when the connection has gone bad.

hasFriend

public boolean hasFriend(Friend checked)
                  throws SkypeException
Check for any friends.

Parameters:
checked - the friend to check against.
Returns:
True if friend is authorized.
Throws:
SkypeException - when connection has gone bad.

isVisible

public boolean isVisible()
                  throws SkypeException
Check if GROUP is visible.

Returns:
true if group is visible.
Throws:
SkypeException - when connection has gone bad.

isExpanded

public boolean isExpanded()
                   throws SkypeException
Check if GROUP is expanded.

Returns:
true if group is expanded.
Throws:
SkypeException - when the connection has gone bad.

getDisplayName

public String getDisplayName()
                      throws SkypeException
Return the displayname of this GROUP.

Returns:
the displayname of this group.
Throws:
SkypeException - when the connection has gone bad.

setDisplayName

public void setDisplayName(String newValue)
                    throws SkypeException
Set the displayname of this GROUP.

Parameters:
newValue - the new name.
Throws:
SkypeException - when the connection has gone bad.

getType

public Group.Type getType()
                   throws SkypeException
Get the type of this GROUP.

Returns:
the group type.
Throws:
SkypeException - when the connection has gone bad.

dispose

public void dispose()
             throws SkypeException
Remove this GROUP.

Throws:
SkypeException - when the connection has gone bad.

getData

public final Object getData(String name)
Returns the user data to which this object maps to the specified by the name. Returns null if this object contains no mapping for the name.

Parameters:
name - name whose associated user data is to be returned.
Returns:
the user data to which this object maps the specified name, or null if this object contains no mapping for the name.
See Also:
Map.get(Object)

setData

public final void setData(String name,
                          Object userData)
Associates the specified user data with the specified name in this object.

Parameters:
name - name with which the specified user data is to be associated.
userData - user data to be associated with the specified name.
See Also:
Map.put(Object, Object)


Copyright © 2004-2011. All Rights Reserved.