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 aIQueryGroupProvider
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
-
-
-
-
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 connectorprovider
- that contains the query specifications handled by the connectorincludeInDefaultViews
- 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 setincludeInDefaultViews
- 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 classAbstractRegistrySourceConnector
- Parameters:
listener
- that should receive the notifications
-
-