org.eclipse.ecf.presence.roster
Class Roster

java.lang.Object
  extended by org.eclipse.ecf.presence.roster.RosterItem
      extended by org.eclipse.ecf.presence.roster.Roster
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IRoster, IRosterItem

public class Roster
extends RosterItem
implements IRoster

Base class implementation of IRoster. Subclasses may be created as appropriate.


Field Summary
protected  IPresenceContainerAdapter presenceContainer
           
protected  java.util.List rosteritems
           
protected  IUser rosterUser
           
 
Fields inherited from class org.eclipse.ecf.presence.roster.RosterItem
name, parent
 
Constructor Summary
Roster(IPresenceContainerAdapter presenceContainer)
           
Roster(IPresenceContainerAdapter pc, IUser user)
           
 
Method Summary
 boolean addItem(IRosterItem item)
           
 java.util.Collection getItems()
          Get the IRosterItems for this roster.
 java.lang.String getName()
          Return name of item.
 IPresenceContainerAdapter getPresenceContainerAdapter()
          Get the IPresenceContainerAdapter associated with this roster.
 IUser getUser()
          Get local user for this roster.
 boolean removeItem(IRosterItem item)
           
 void setUser(IUser user)
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ecf.presence.roster.RosterItem
getAdapter, getParent, getRoster
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ecf.presence.roster.IRosterItem
getParent, getRoster
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

rosteritems

protected java.util.List rosteritems

rosterUser

protected IUser rosterUser

presenceContainer

protected IPresenceContainerAdapter presenceContainer
Constructor Detail

Roster

public Roster(IPresenceContainerAdapter pc,
              IUser user)

Roster

public Roster(IPresenceContainerAdapter presenceContainer)
Method Detail

getItems

public java.util.Collection getItems()
Description copied from interface: IRoster
Get the IRosterItems for this roster. The collection returned will not be null, and will contain IRosterItems. The IRosterItems may be either IRosterGroups and/or IRosterEntries.

Specified by:
getItems in interface IRoster
Returns:
Collection of IRosterItems. Will not be null. May return an empty collection of items.

getName

public java.lang.String getName()
Description copied from interface: IRosterItem
Return name of item.

Specified by:
getName in interface IRosterItem
Overrides:
getName in class RosterItem
Returns:
String name of item. May return null.

getUser

public IUser getUser()
Description copied from interface: IRoster
Get local user for this roster. This is the user that owns this roster. If null, this means that the user is not yet logged in.

Specified by:
getUser in interface IRoster
Returns:
IUser local user associated with this roster. If null, this means that the user is not yet logged in.

addItem

public boolean addItem(IRosterItem item)

removeItem

public boolean removeItem(IRosterItem item)

setUser

public void setUser(IUser user)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
String this object as String

getPresenceContainerAdapter

public IPresenceContainerAdapter getPresenceContainerAdapter()
Description copied from interface: IRoster
Get the IPresenceContainerAdapter associated with this roster. The result will not be null.

Specified by:
getPresenceContainerAdapter in interface IRoster
Returns:
IPresenceContainerAdapter the presence container adapter associated with this roster.