Eclipse Platform
Release 3.2

org.eclipse.team.core.subscribers
Class SubscriberScopeManager

java.lang.Object
  extended byorg.eclipse.core.runtime.PlatformObject
      extended byorg.eclipse.team.core.mapping.provider.SynchronizationScopeManager
          extended byorg.eclipse.team.core.subscribers.SubscriberScopeManager
All Implemented Interfaces:
EventListener, IAdaptable, ISubscriberChangeListener, ISynchronizationScopeManager

public class SubscriberScopeManager
extends SynchronizationScopeManager
implements ISubscriberChangeListener

A ISynchronizationScopeManager that uses a Subscriber to provide a RemoteResourceMappingContext and to notify participants when the remote state of resources change.

Since:
3.2

Constructor Summary
SubscriberScopeManager(String name, ResourceMapping[] inputMappings, Subscriber subscriber, boolean consultModels)
          Create a manager for the given subscriber and input.
SubscriberScopeManager(String name, ResourceMapping[] inputMappings, Subscriber subscriber, RemoteResourceMappingContext context, boolean consultModels)
          Create a manager for the given subscriber and input.
 
Method Summary
 void dispose()
          Method to be invoked when the scope of this manager is no longer needed.
protected  Subscriber getSubscriber()
          Return the subscriber for this manager.
 void initialize(IProgressMonitor monitor)
          Build the scope that is used to determine the complete set of resource mappings, and hence resources, that an operation should be performed on.
 ResourceTraversal[] refresh(ResourceMapping[] mappings, IProgressMonitor monitor)
          Refresh the scope of this manager for the given mappings.
 void subscriberResourceChanged(ISubscriberChangeEvent[] deltas)
          Notifies this listener that some resources' subscriber properties have changed.
 
Methods inherited from class org.eclipse.team.core.mapping.provider.SynchronizationScopeManager
addMappingToScope, adjustInputTraversals, createScope, getContext, getMappingsFromProviders, getName, getSchedulingRule, getScope, isInitialized, refresh, setHasAdditionalMappings, setHasAdditionalResources
 
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriberScopeManager

public SubscriberScopeManager(String name,
                              ResourceMapping[] inputMappings,
                              Subscriber subscriber,
                              boolean consultModels)
Create a manager for the given subscriber and input.

Parameters:
name - a human readable name for the scope
inputMappings - the input mappings
subscriber - the subscriber
consultModels - whether models should be consulted when calculating the scope

SubscriberScopeManager

public SubscriberScopeManager(String name,
                              ResourceMapping[] inputMappings,
                              Subscriber subscriber,
                              RemoteResourceMappingContext context,
                              boolean consultModels)
Create a manager for the given subscriber and input.

Parameters:
name - a human readable name for the scope
inputMappings - the input mappings
subscriber - the subscriber
context - a remote resource mapping conext for the subscriber
consultModels - whether models should be consulted when calculating the scope
Method Detail

getSubscriber

protected Subscriber getSubscriber()
Return the subscriber for this manager.

Returns:
the subscriber for this manager

dispose

public void dispose()
Description copied from interface: ISynchronizationScopeManager
Method to be invoked when the scope of this manager is no longer needed. It is typically the responsibility of the client that creates a scope manager to dispose of it.

Specified by:
dispose in interface ISynchronizationScopeManager
Overrides:
dispose in class SynchronizationScopeManager

initialize

public void initialize(IProgressMonitor monitor)
                throws CoreException
Description copied from interface: ISynchronizationScopeManager
Build the scope that is used to determine the complete set of resource mappings, and hence resources, that an operation should be performed on.

This method obtains a lock on the workspace root to avoid workspace changes while calculating the scope.

Specified by:
initialize in interface ISynchronizationScopeManager
Overrides:
initialize in class SynchronizationScopeManager
Throws:
CoreException

refresh

public ResourceTraversal[] refresh(ResourceMapping[] mappings,
                                   IProgressMonitor monitor)
                            throws CoreException
Description copied from interface: ISynchronizationScopeManager
Refresh the scope of this manager for the given mappings. Changes in the scope will be reported as a property change event fired from the scope. Clients should call this method when a change in the workspace or a change issued from this manager have resulted in a change in the resources that should be included in the scope.

Specified by:
refresh in interface ISynchronizationScopeManager
Overrides:
refresh in class SynchronizationScopeManager
Throws:
CoreException

subscriberResourceChanged

public void subscriberResourceChanged(ISubscriberChangeEvent[] deltas)
Description copied from interface: ISubscriberChangeListener
Notifies this listener that some resources' subscriber properties have changed. The changes have already happened. For example, a resource's base revision may have changed. The resource tree may or may not be open for modification when this method is invoked.

Specified by:
subscriberResourceChanged in interface ISubscriberChangeListener
Parameters:
deltas - detailing the kinds of changes

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.