Package org.eclipse.viatra.query.runtime.registry.connector

## Class QueryGroupProviderSourceConnector

- java.lang.Object
- - org.eclipse.viatra.query.runtime.registry.connector.AbstractRegistrySourceConnector
  - - org.eclipse.viatra.query.runtime.registry.connector.QueryGroupProviderSourceConnector

- All Implemented Interfaces:
    `IRegistrySourceConnector`

      public class QueryGroupProviderSourceConnector
      extends AbstractRegistrySourceConnector

  Source connector implementation that uses a `IQueryGroupProvider` to provide a query specifications into the registry. The query group can be later updated which triggers the removal of all specifications of the old group and the addition of all specifications from the new group.
  Since:
    1.3

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.registry.connector.AbstractRegistrySourceConnector

      `listeners`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `QueryGroupProviderSourceConnector​(java.lang.String identifier, IQueryGroupProvider provider, boolean includeInDefaultViews)` | Creates an instance of the connector with the given identifier and the query group provider.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `sendQuerySpecificationsToListener​(IConnectorListener listener)` | Subclasses should send add notifications for each specification in the connector to the given listener.
    `void` | `setQueryGroupProvider​(IQueryGroupProvider queryGroupProvider)` | Update the query group of the connector, which triggers the removal of all specifications on the old group and addition of all specifications in the given group.

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.registry.connector.AbstractRegistrySourceConnector

      `addListener, getIdentifier, includeSpecificationsInDefaultViews, removeListener`

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

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

- - ### Constructor Detail

    - #### QueryGroupProviderSourceConnector

          public QueryGroupProviderSourceConnector​(java.lang.String identifier,
                                                   IQueryGroupProvider provider,
                                                   boolean includeInDefaultViews)

      Creates an instance of the connector with the given identifier and the query group provider. The identifier should be unique if you want to add it to a registry as a source.
      Parameters:
        `identifier` - of the newly created connector
        `provider` - that contains the query specifications handled by the connector
        `includeInDefaultViews` - true if the specifications in the connector should be included in default views

  - ### Method Detail

    - #### setQueryGroupProvider

          public void setQueryGroupProvider​(IQueryGroupProvider queryGroupProvider)

      Update the query group of the connector, which triggers the removal of all specifications on the old group and addition of all specifications in the given group.
      Parameters:
        `queryGroupProvider` - the queryGroupProvider to set
        `includeInDefaultViews` - true if the specifications in the connector should be included in default views

    - #### sendQuerySpecificationsToListener

          protected void sendQuerySpecificationsToListener​(IConnectorListener listener)

      Description copied from class: `AbstractRegistrySourceConnector`
      Subclasses should send add notifications for each specification in the connector to the given listener.
      Specified by:
        `sendQuerySpecificationsToListener` in class `AbstractRegistrySourceConnector`
      Parameters:
        `listener` - that should receive the notifications