Class SubscriberChangeEvent
- java.lang.Object
-
- org.eclipse.team.core.subscribers.SubscriberChangeEvent
-
- All Implemented Interfaces:
ISubscriberChangeEvent
public class SubscriberChangeEvent extends Object implements ISubscriberChangeEvent
A concrete implementation ofISubscriberChangeEventthat can be used by clients.- Since:
- 3.0
- See Also:
ISubscriberChangeEvent,Subscriber
-
-
Field Summary
-
Fields inherited from interface org.eclipse.team.core.subscribers.ISubscriberChangeEvent
NO_CHANGE, ROOT_ADDED, ROOT_REMOVED, SYNC_CHANGED
-
-
Constructor Summary
Constructors Constructor Description SubscriberChangeEvent(Subscriber subscriber, int flags, IResource resource)Create a change event with the given flags for the given subscriber and resource.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SubscriberChangeEvent[]asSyncChangedDeltas(Subscriber subscriber, IResource[] resources)Returns an array of deltas for the resources withISubscriberChangeEvent.SYNC_CHANGEDas the flag.intgetFlags()Return the flags that describe the type of change.IResourcegetResource()Return the resource whose state with respect to the subscriber has changed.SubscribergetSubscriber()Return the subscriber to which this change event applies.
-
-
-
Constructor Detail
-
SubscriberChangeEvent
public SubscriberChangeEvent(Subscriber subscriber, int flags, IResource resource)
Create a change event with the given flags for the given subscriber and resource.- Parameters:
subscriber- the subscriber to which the state change appliesflags- the flags that describe the changeresource- the resource whose state has change
-
-
Method Detail
-
getFlags
public int getFlags()
Description copied from interface:ISubscriberChangeEventReturn the flags that describe the type of change. The returned value should be ANDed with the change type flags to determine whether the change event is of a particular type. For example,if (event.getFlags() & ISubscriberChangeEvent.SYNC_CHANGED) { // the sync info for the resource has changed }- Specified by:
getFlagsin interfaceISubscriberChangeEvent- Returns:
- the flags that describe the type of change
-
getResource
public IResource getResource()
Description copied from interface:ISubscriberChangeEventReturn the resource whose state with respect to the subscriber has changed.- Specified by:
getResourcein interfaceISubscriberChangeEvent- Returns:
- the resource whose state with respect to the subscriber has changed
-
getSubscriber
public Subscriber getSubscriber()
Description copied from interface:ISubscriberChangeEventReturn the subscriber to which this change event applies.- Specified by:
getSubscriberin interfaceISubscriberChangeEvent- Returns:
- the subscriber to which this change event applies
-
asSyncChangedDeltas
public static SubscriberChangeEvent[] asSyncChangedDeltas(Subscriber subscriber, IResource[] resources)
Returns an array of deltas for the resources withISubscriberChangeEvent.SYNC_CHANGEDas the flag.- Parameters:
subscriber- the subscriberresources- the resources whose sync info has changed- Returns:
- an array of change events
-
-