public class QuerySpecificationRegistry extends java.lang.Object implements IQuerySpecificationRegistry
IRegistrySourceConnector
s.
When running as an OSGi plug-in, the generated query specifications registered through extensions are automatically loaded
into the registry by the ExtensionBasedQuerySpecificationLoader
class.
Modifier | Constructor and Description |
---|---|
protected |
QuerySpecificationRegistry()
Hidden constructor for singleton instance
|
Modifier and Type | Method and Description |
---|---|
protected void |
addDelayedSourceConnector(IRegistrySourceConnector connector)
When the registry adds itself as a listener to connectors, it must send all specification providers
to the registry.
|
boolean |
addSource(IRegistrySourceConnector connector)
Cannot register connectors with the same identifier twice.
|
IRegistryView |
createView()
Creates a view which contains query specification entries that indicate their inclusion in default views.
|
IRegistryView |
createView(IRegistryViewFactory factory)
Creates a view which is instantiated by the factory and is connected to the registry.
|
IRegistryView |
createView(IRegistryViewFilter filter)
Creates a view which contains registered query specifications that are considered relevant by the passed filter.
|
IDefaultRegistryView |
getDefaultView()
Returns a default view instance that contains query specification entries that indicate their inclusion in
default views.
|
static IQuerySpecificationRegistry |
getInstance() |
protected IQuerySpecificationRegistry |
getInternalRegistry() |
boolean |
removeSource(IRegistrySourceConnector connector)
Removes the connector if it was registered.
|
protected QuerySpecificationRegistry()
public static IQuerySpecificationRegistry getInstance()
protected IQuerySpecificationRegistry getInternalRegistry()
protected void addDelayedSourceConnector(IRegistrySourceConnector connector)
ExtensionBasedQuerySpecificationLoader
is triggered during the
activation of the plugin, the individual query specification classes cannot be loaded yet. To avoid this,
the connector of the loader is delayed until needed.connector
- that should be delayed before adding to the registrypublic boolean addSource(IRegistrySourceConnector connector)
IQuerySpecificationRegistry
addSource
in interface IQuerySpecificationRegistry
connector
- cannot be nullpublic boolean removeSource(IRegistrySourceConnector connector)
IQuerySpecificationRegistry
removeSource
in interface IQuerySpecificationRegistry
connector
- cannot be nullpublic IDefaultRegistryView getDefaultView()
IQuerySpecificationRegistry
getDefaultView
in interface IQuerySpecificationRegistry
public IRegistryView createView()
IQuerySpecificationRegistry
createView
in interface IQuerySpecificationRegistry
public IRegistryView createView(IRegistryViewFilter filter)
IQuerySpecificationRegistry
createView
in interface IQuerySpecificationRegistry
public IRegistryView createView(IRegistryViewFactory factory)
IQuerySpecificationRegistry
createView
in interface IQuerySpecificationRegistry