Package org.eclipse.emf.compare.ide.ui.subscriber

# Class SubscriberProviderRegistry

java.lang.Object
org.eclipse.emf.compare.ide.ui.subscriber.SubscriberProviderRegistry

public class SubscriberProviderRegistry extends Object
The registry managing the registered subscriber provider extension point information.

Since:
  4.4.3

## Constructor Summary

Constructors
Constructor
Description
`SubscriberProviderRegistry()`
Constructs and initialized this registry.

## Method Summary

Modifier and Type
Method
Description
`void`
`addProvider(String className, SubscriberProviderDescriptor descriptor)`
Adds the given `SubscriberProviderDescriptor` to this registry, using the given `className` as the identifier.
`void`
`clear()`
Clears out all registered providers from this registry.
`org.eclipse.team.core.subscribers.Subscriber`
`getSubscriber(org.eclipse.compare.ICompareContainer container, org.eclipse.compare.ITypedElement left, org.eclipse.compare.ITypedElement right, org.eclipse.compare.ITypedElement origin, org.eclipse.core.runtime.IProgressMonitor monitor)`
Returns the subscriber that provides the synchronization between local resources and remote resources based on the given comparison input.
`SubscriberProviderDescriptor`
`removeProvider(String className)`
Removes the `SubscriberProviderDescriptor` and its managed `ISubscriberProvider` identified by the given `className` from this registry.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SubscriberProviderRegistry

public SubscriberProviderRegistry()
Constructs and initialized this registry.

## Method Details

### addProvider

public void addProvider(String className, SubscriberProviderDescriptor descriptor)
Adds the given `SubscriberProviderDescriptor` to this registry, using the given `className` as the identifier.

Parameters:
  `className` - The identifier for the given `SubscriberProviderDescriptor`.
  `descriptor` - The `SubscriberProviderDescriptor` which is to be added to this registry.

### removeProvider

public SubscriberProviderDescriptor removeProvider(String className)
Removes the `SubscriberProviderDescriptor` and its managed `ISubscriberProvider` identified by the given `className` from this registry.

Parameters:
  `className` - Identifier of the provider we are to remove from this registry.
Returns:
  The removed `SubscriberProviderDescriptor`, if any.

### clear

public void clear()
Clears out all registered providers from this registry.

### getSubscriber

public org.eclipse.team.core.subscribers.Subscriber getSubscriber(org.eclipse.compare.ICompareContainer container, org.eclipse.compare.ITypedElement left, org.eclipse.compare.ITypedElement right, org.eclipse.compare.ITypedElement origin, org.eclipse.core.runtime.IProgressMonitor monitor)
Returns the subscriber that provides the synchronization between local resources and remote resources based on the given comparison input.

Parameters:
  `container` - The compare container input.
  `left` - Left of the compared elements.
  `right` - Right of the compared elements.
  `origin` - Common ancestor of the `left` and `right` compared elements.
  `monitor` - Monitor to report progress on.
Returns:
  The subscriber used for the comparison of the container or `null` if no subscriber could be determined.