Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.contactlist.event
Class MetaContactGroupEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.java.sip.communicator.service.contactlist.event.MetaContactGroupEvent
All Implemented Interfaces:
Serializable

public class MetaContactGroupEvent
extends EventObject

Author:
Yana Stamcheva
See Also:
Serialized Form

Field Summary
static int CHILD_CONTACTS_REORDERED
          Indicates that the MetaContactGroupEvent instance was triggered by the fact that child contacts were reordered in the source group.
static int CONTACT_GROUP_ADDED_TO_META_GROUP
          Indicates that the MetaContactGroupEvent instance was triggered by adding a protocol specific ContactGroup to the source MetaContactGroup.
static int CONTACT_GROUP_REMOVED_FROM_META_GROUP
          Indicates that the MetaContactGroupEvent instance was triggered by the removal of a protocol specific ContactGroup in the source MetaContactGroup.
static int CONTACT_GROUP_RENAMED_IN_META_GROUP
          Indicates that the MetaContactGroupEvent instance was triggered by the renaming of a protocol specific ContactGroup in the source MetaContactGroup.
static int META_CONTACT_GROUP_ADDED
          Indicates that the MetaContactGroupEvent instance was triggered by adding a MetaContactGroup.
static int META_CONTACT_GROUP_REMOVED
          Indicates that the MetaContactGroupEvent instance was triggered by the removal of an existing MetaContactGroup.
static int META_CONTACT_GROUP_RENAMED
          Indicates that the MetaContactGroupEvent instance was triggered by the renaming of an existing MetaContactGroup.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MetaContactGroupEvent(MetaContactGroup source, ProtocolProviderService provider, ContactGroup sourceProtoGroup, int eventID)
          Creates a new MetaContactGroup event according to the specified parameters.
 
Method Summary
 int getEventID()
          Returns an event id specifying whether the type of this event (e.g.
 MetaContactGroup getSourceMetaContactGroup()
          Returns the source MetaContactGroup.
 ContactGroup getSourceProtoGroup()
          Returns the proto group associated with this event or null if the event does not concern a particular source group.
 ProtocolProviderService getSourceProvider()
          Returns the provider that the source contact belongs to.
 String toString()
          Returns a String representation of this MetaContactGroupEvent
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

META_CONTACT_GROUP_ADDED

public static final int META_CONTACT_GROUP_ADDED
Indicates that the MetaContactGroupEvent instance was triggered by adding a MetaContactGroup.

See Also:
Constant Field Values

META_CONTACT_GROUP_REMOVED

public static final int META_CONTACT_GROUP_REMOVED
Indicates that the MetaContactGroupEvent instance was triggered by the removal of an existing MetaContactGroup.

See Also:
Constant Field Values

CONTACT_GROUP_REMOVED_FROM_META_GROUP

public static final int CONTACT_GROUP_REMOVED_FROM_META_GROUP
Indicates that the MetaContactGroupEvent instance was triggered by the removal of a protocol specific ContactGroup in the source MetaContactGroup.

See Also:
Constant Field Values

CHILD_CONTACTS_REORDERED

public static final int CHILD_CONTACTS_REORDERED
Indicates that the MetaContactGroupEvent instance was triggered by the fact that child contacts were reordered in the source group.

See Also:
Constant Field Values

CONTACT_GROUP_RENAMED_IN_META_GROUP

public static final int CONTACT_GROUP_RENAMED_IN_META_GROUP
Indicates that the MetaContactGroupEvent instance was triggered by the renaming of a protocol specific ContactGroup in the source MetaContactGroup. Note that this does not in any way mean that the name of the MetaContactGroup itslef has changed. MetaContactGroups contain multiple protocol groups and their name cannot change each time one of them is renamed.

See Also:
Constant Field Values

CONTACT_GROUP_ADDED_TO_META_GROUP

public static final int CONTACT_GROUP_ADDED_TO_META_GROUP
Indicates that the MetaContactGroupEvent instance was triggered by adding a protocol specific ContactGroup to the source MetaContactGroup.

See Also:
Constant Field Values

META_CONTACT_GROUP_RENAMED

public static final int META_CONTACT_GROUP_RENAMED
Indicates that the MetaContactGroupEvent instance was triggered by the renaming of an existing MetaContactGroup.

See Also:
Constant Field Values
Constructor Detail

MetaContactGroupEvent

public MetaContactGroupEvent(MetaContactGroup source,
                             ProtocolProviderService provider,
                             ContactGroup sourceProtoGroup,
                             int eventID)
Creates a new MetaContactGroup event according to the specified parameters.

Parameters:
source - the MetaContactGroup instance that is added to the MetaContactList
provider - the ProtocolProviderService instance where this event occurred
sourceProtoGroup - the proto group associated with this event or null if the event does not concern a particular source group.
eventID - one of the METACONTACT_XXX static fields indicating the nature of the event.
Method Detail

getSourceProvider

public ProtocolProviderService getSourceProvider()
Returns the provider that the source contact belongs to.

Returns:
the provider that the source contact belongs to.

getSourceProtoGroup

public ContactGroup getSourceProtoGroup()
Returns the proto group associated with this event or null if the event does not concern a particular source group.

Returns:
the proto group associated with this event or null if the event does not concern a particular source group.

getSourceMetaContactGroup

public MetaContactGroup getSourceMetaContactGroup()
Returns the source MetaContactGroup.

Returns:
the source MetaContactGroup.

toString

public String toString()
Returns a String representation of this MetaContactGroupEvent

Overrides:
toString in class EventObject
Returns:
A String representation of this MetaContactGroupEvent.

getEventID

public int getEventID()
Returns an event id specifying whether the type of this event (e.g. METACONTACT_GROUP_ADDED, METACONTACT_GROUP_REMOVED and etc.)

Returns:
one of the METACONTACT_GROUP_XXX int fields of this class.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.