Class QuerySpecificationRegistry

    • Constructor Detail

      • QuerySpecificationRegistry

        protected QuerySpecificationRegistry()
        Hidden constructor for singleton instance
    • Method Detail

      • getInternalRegistry

        protected IQuerySpecificationRegistry getInternalRegistry()
        Returns:
        the internal registry after adding delayed source connectors
      • addDelayedSourceConnector

        protected void addDelayedSourceConnector​(IRegistrySourceConnector connector)
        When the registry adds itself as a listener to connectors, it must send all specification providers to the registry. However, when 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.
        Parameters:
        connector - that should be delayed before adding to the registry
      • addSource

        public boolean addSource​(IRegistrySourceConnector connector)
        Description copied from interface: IQuerySpecificationRegistry
        Cannot register connectors with the same identifier twice. No change occurs if the identifier is already used.
        Specified by:
        addSource in interface IQuerySpecificationRegistry
        Parameters:
        connector - cannot be null
        Returns:
        false if a connector with the given identifier has already been added, true otherwise
      • removeSource

        public boolean removeSource​(IRegistrySourceConnector connector)
        Description copied from interface: IQuerySpecificationRegistry
        Removes the connector if it was registered. No change occurs if the identifier of the connector was not used before.
        Specified by:
        removeSource in interface IQuerySpecificationRegistry
        Parameters:
        connector - cannot be null
        Returns:
        false if a registered connector with the given identifier was not found, true if it was successfully removed
      • getDefaultView

        public IDefaultRegistryView getDefaultView()
        Description copied from interface: IQuerySpecificationRegistry
        Returns a default view instance that contains query specification entries that indicate their inclusion in default views. If there are entries with the same FQN, only the last added will be included in the view to avoid duplicate FQNs.
        Specified by:
        getDefaultView in interface IQuerySpecificationRegistry
        Returns:
        the default view instance
      • createView

        public IRegistryView createView()
        Description copied from interface: IQuerySpecificationRegistry
        Creates a view which contains query specification entries that indicate their inclusion in default views. This view will also be incrementally updated on registry changes and accepts listeners to notify on changes.
        Specified by:
        createView in interface IQuerySpecificationRegistry
        Returns:
        a new view instance