Interface IRegistryView
-
- All Superinterfaces:
IQuerySpecificationRegistryChangeListener
- All Known Subinterfaces:
IDefaultRegistryView
- All Known Implementing Classes:
AbstractRegistryView
public interface IRegistryView extends IQuerySpecificationRegistryChangeListener
The registry view is the primary interface for users to interact with the query specifications in anIQuerySpecificationRegistry
. Views are created using the createView methods of registry and their content is also dynamically updated by the registry. The view contains a set ofIQuerySpecificationRegistryEntry
objects that can be used to access the query specifications themselves through the get() method. Users can check the contents of the view and add listeners to get notifications on view changes (added or removed entries).- Since:
- 1.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addViewListener(IQuerySpecificationRegistryChangeListener listener)
Adds a listener to the view that will be notified when an entry is added to or removed from the view.java.lang.Iterable<IQuerySpecificationRegistryEntry>
getEntries()
java.util.Set<IQuerySpecificationRegistryEntry>
getEntries(java.lang.String fullyQualifiedName)
java.util.Set<java.lang.String>
getQuerySpecificationFQNs()
IQuerySpecificationRegistry
getRegistry()
boolean
hasQuerySpecificationFQN(java.lang.String fullyQualifiedName)
void
removeViewListener(IQuerySpecificationRegistryChangeListener listener)
Removes a listener that was previously added to the view.-
Methods inherited from interface org.eclipse.viatra.query.runtime.registry.IQuerySpecificationRegistryChangeListener
entryAdded, entryRemoved
-
-
-
-
Method Detail
-
getEntries
java.lang.Iterable<IQuerySpecificationRegistryEntry> getEntries()
- Returns:
- an immutable copy of all entries found in the view
-
getQuerySpecificationFQNs
java.util.Set<java.lang.String> getQuerySpecificationFQNs()
- Returns:
- the set of FQNs for the query specifications in the view
-
hasQuerySpecificationFQN
boolean hasQuerySpecificationFQN(java.lang.String fullyQualifiedName)
- Parameters:
fullyQualifiedName
- that is looked up in the view- Returns:
- true if the view contains an entry with given FQN, false otherwise
-
getEntries
java.util.Set<IQuerySpecificationRegistryEntry> getEntries(java.lang.String fullyQualifiedName)
- Parameters:
fullyQualifiedName
- of the entries that are requested- Returns:
- the possible empty set of entries with the given FQN
-
addViewListener
void addViewListener(IQuerySpecificationRegistryChangeListener listener)
Adds a listener to the view that will be notified when an entry is added to or removed from the view.- Parameters:
listener
- that is added
-
removeViewListener
void removeViewListener(IQuerySpecificationRegistryChangeListener listener)
Removes a listener that was previously added to the view.- Parameters:
listener
- that is removed
-
getRegistry
IQuerySpecificationRegistry getRegistry()
- Returns:
- the registry underlying the view
-
-