Interface IFilteredViewProvider
-
- All Superinterfaces:
IViewProvider
- All Known Implementing Classes:
ExtensionXMIViewModelProvider
public interface IFilteredViewProvider extends IViewProvider
A specialized view provider that filters views by properties in the loading properties. The mechanism by which matching of filters is performed is unspecified, but filters are specified as key-value pairs in theproperties
parameter of each API method.- Since:
- 1.22
-
-
Field Summary
-
Fields inherited from interface org.eclipse.emf.ecp.view.spi.provider.IViewProvider
NOT_APPLICABLE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default double
canProvideViewModel(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties)
Queries whether I can provide without any filter properties being required.double
canProvideViewModel(org.eclipse.emf.ecore.EObject object, VViewModelProperties properties, java.util.Collection<java.lang.String> requiredKeys)
Queries the confidence with which I can provide a view model for the given domain modelobject
where some keys in theproperties
are required to be matched in an implementation-specific way by the view models the I have access to.default VView
provideViewModel(org.eclipse.emf.ecore.EObject object, VViewModelProperties properties)
Obtains a view model without any filter properties being required.VView
provideViewModel(org.eclipse.emf.ecore.EObject object, VViewModelProperties properties, java.util.Collection<java.lang.String> requiredKeys)
Obtains the view model that I can provide for the given domain modelobject
.
-
-
-
Method Detail
-
canProvideViewModel
default double canProvideViewModel(org.eclipse.emf.ecore.EObject eObject, VViewModelProperties properties)
Queries whether I can provide without any filter properties being required.- Specified by:
canProvideViewModel
in interfaceIViewProvider
- Parameters:
eObject
- theEObject
to create aproperties
- theproperties
for providing the view- Returns:
- a positive double indicating how well this provider is fitted to provide a
VView
for the providedEObject
orIViewProvider.NOT_APPLICABLE
if it doesn't fit
-
canProvideViewModel
double canProvideViewModel(org.eclipse.emf.ecore.EObject object, VViewModelProperties properties, java.util.Collection<java.lang.String> requiredKeys)
Queries the confidence with which I can provide a view model for the given domain modelobject
where some keys in theproperties
are required to be matched in an implementation-specific way by the view models the I have access to.- Parameters:
object
- the domain model object for which a view is to be requestedproperties
- theproperties
for providing the view, that may or may not include matching filtersrequiredKeys
- a subset (possibly empty) of the keys in theproperties
that must be matched by any view model that I would provide. If any of these keys does not match a view model, then that view model must not be provided. Otherwise, it may just be less preferred than some other view model that does match- Returns:
- a positive double indicating how well I am suited to
provide a
VView
for the givenobject
, orIViewProvider.NOT_APPLICABLE
if I cannot provide a view model
-
provideViewModel
default VView provideViewModel(org.eclipse.emf.ecore.EObject object, VViewModelProperties properties)
Obtains a view model without any filter properties being required.- Specified by:
provideViewModel
in interfaceIViewProvider
- Parameters:
object
- theEObject
to generate theVView
forproperties
- theproperties
for providing the view- Returns:
- the generated
VView
-
provideViewModel
VView provideViewModel(org.eclipse.emf.ecore.EObject object, VViewModelProperties properties, java.util.Collection<java.lang.String> requiredKeys)
Obtains the view model that I can provide for the given domain modelobject
. This method is only called if a previous invocation ofcanProvideViewModel(EObject, VViewModelProperties, Collection)
with the same arguments returned the highest positive result amongst all available providers.- Parameters:
object
- the domain model object for which a view is to be requestedproperties
- theproperties
for providing the view, that may or may not include matching filtersrequiredKeys
- a subset (possibly empty) of the keys in theproperties
that must be matched by any view model that I would provide. If any of these keys does not match a view model, then that view model must not be provided. Otherwise, it may just be less preferred than some other view model that does match- Returns:
- the view model
-
-