aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/service/contactsource/ContactChangedEvent.java
blob: ae8893237da8448b6975a5b8c45df877acbfce58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
 * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package net.java.sip.communicator.service.contactsource;

import java.util.*;

/**
 * The <tt>ContactChangedEvent</tt> indicates that a
 * <tt>SourceContact</tt> has been updated as a result of a
 * <tt>ContactQuery</tt>.
 * @author Yana Stamcheva
 */
public class ContactChangedEvent
    extends EventObject
{
    /**
     * Serial version UID.
     */
    private static final long serialVersionUID = 0L;

    /**
     * The contact that has been updated.
     */
    private final SourceContact contact;

    /**
     * Creates a <tt>ContactChangedEvent</tt> by specifying the contact search
     * source and the updated <tt>searchContact</tt>.
     * @param source the source that triggered this event
     * @param contact the updated contact
     */
    public ContactChangedEvent(ContactQuery source,
                               SourceContact contact)
    {
        super(source);

        this.contact = contact;
    }

    /**
     * Returns the <tt>ContactQuery</tt> that triggered this event.
     * @return the <tt>ContactQuery</tt> that triggered this event
     */
    public ContactQuery getQuerySource()
    {
        return (ContactQuery) source;
    }

    /**
     * Returns the updated contact.
     * @return the updated contact
     */
    public SourceContact getContact()
    {
        return contact;
    }
}