KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > core > subscribers > ISubscriberChangeEvent


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.team.core.subscribers;
12 import org.eclipse.core.resources.IResource;
13
14 /**
15  * A change event that describes a change in a resource
16  * that is or was supervised by a subscriber.
17  * <p>
18  * Clients are not intended to implement. Instead subclass {@link SubscriberChangeEvent}.
19  * </p>
20  * @see ISubscriberChangeListener
21  * @since 3.0
22  */

23 public interface ISubscriberChangeEvent {
24     /*====================================================================
25      * Constants defining the kinds of team changes to resources:
26      *====================================================================*/

27     /**
28      * Delta kind constant indicating that the resource has not been changed in any way
29      * @see org.eclipse.core.resources.IResourceDelta#getKind()
30      */

31     public static final int NO_CHANGE = 0;
32     /**
33      * Delta kind constant (bit mask) indicating that the synchronization state of a resource has changed.
34      * @see #getFlags
35      */

36     public static final int SYNC_CHANGED = 0x1;
37     /**
38      * Delta kind constant (bit mask) indicating that a team provider has been configured on the resource.
39      * @see #getFlags
40      */

41     public static final int ROOT_ADDED = 0x2;
42     /**
43      * Delta kind constant (bit mask) indicating that a team provider has been de-configured on the resource.
44      * @see #getFlags
45      */

46     public static final int ROOT_REMOVED = 0x4;
47     
48     /**
49      * Return the flags that describe the type of change.
50      * The returned value should be ANDed with the change type
51      * flags to determine whether the change event is of
52      * a particular type. For example,
53      * <pre>
54      * if (event.getFlags() & ISubscriberChangeEvent.SYNC_CHANGED) {
55      * // the sync info for the resource has changed
56      * }
57      * </pre>
58      * @return the flags that describe the type of change
59      */

60     public abstract int getFlags();
61     
62     /**
63      * Return the resource whose state with
64      * respect to the subscriber has changed.
65      * @return the resource whose state with
66      * respect to the subscriber has changed
67      */

68     public abstract IResource getResource();
69     
70     /**
71      * Return the subscriber to which this change event applies.
72      * @return the subscriber to which this change event applies
73      */

74     public abstract Subscriber getSubscriber();
75 }
76
Popular Tags