public class ValidationServiceImpl extends Object implements ValidationService, EMFFormsContextListener
| Constructor and Description |
|---|
ValidationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addValidationProvider(ValidationProvider validationProvider)
Adds a validation provider to the list of known validation providers.
|
void |
addValidationProvider(ValidationProvider validationProvider,
boolean revalidate)
Adds a validation provider to the list of known validation providers.
|
void |
childContextAdded(VElement parentElement,
EMFFormsViewContext childContext)
Called when a child context is added.
|
void |
childContextDisposed(EMFFormsViewContext childContext)
Called when a child context is disposed.
|
void |
childViewModelContextAdded(ViewModelContext childContext)
This method is called whenever a new
ViewModelContext is added as a child context to the root
ViewModelContext this GlobalViewModelService belongs to. |
void |
contextDispose()
Called by the context when the dispose is running.
|
void |
contextInitialised()
Called by the context when the initialization has finished.
|
void |
deregisterValidationListener(ViewValidationListener listener)
Deregisters the given listener.
|
void |
dispose()
Dispose.
|
int |
getPriority()
Returns the priority for this view service.
|
protected ViewSubstitutionLabelProviderFactory |
getSubstitutionLabelProviderFactory()
Returns a
ViewSubstitutionLabelProviderFactory, if any is registered. |
void |
instantiate(ViewModelContext context)
Instantiate the view service.
|
void |
notifyListeners()
Notifies all listeners.
|
void |
registerValidationListener(ViewValidationListener listener)
Registers a listener that will receive
Diagnostics with severity
higher than Diagnostic#OK. |
void |
removeValidationProvider(ValidationProvider validationProvider)
Removes a validation provider from the list of known validation providers.
|
void |
removeValidationProvider(ValidationProvider validationProvider,
boolean revalidate)
Removes a validation provider from the list of known validation providers.
|
void |
validate(Collection<org.eclipse.emf.ecore.EObject> eObjects)
Validates all given eObjects.
|
void |
validate(org.eclipse.emf.ecore.EObject eObject)
Validate the given eObject.
|
public void instantiate(ViewModelContext context)
instantiate in interface ViewModelServicecontext - the ViewModelContextViewModelService.instantiate(org.eclipse.emf.ecp.view.spi.context.ViewModelContext)public void dispose()
dispose in interface ViewModelServiceViewModelService.dispose()public int getPriority()
getPriority in interface ViewModelServiceViewModelService.getPriority()public void validate(Collection<org.eclipse.emf.ecore.EObject> eObjects)
validate in interface ValidationServiceeObjects - the eObjects to validateValidationService.validate(java.util.Collection)public void validate(org.eclipse.emf.ecore.EObject eObject)
eObject - the eObject to validatepublic void notifyListeners()
public void addValidationProvider(ValidationProvider validationProvider)
addValidationProvider in interface ValidationServicevalidationProvider - the ValidationProvider to addValidationService.addValidationProvider(org.eclipse.emf.ecp.view.spi.validation.ValidationProvider)public void addValidationProvider(ValidationProvider validationProvider, boolean revalidate)
addValidationProvider in interface ValidationServicevalidationProvider - the ValidationProvider to addrevalidate - whether to revalidate the domain model after the provider has been addedValidationService.addValidationProvider(org.eclipse.emf.ecp.view.spi.validation.ValidationProvider,
boolean)public void removeValidationProvider(ValidationProvider validationProvider)
removeValidationProvider in interface ValidationServicevalidationProvider - the ValidationProvider to removeValidationService.removeValidationProvider(org.eclipse.emf.ecp.view.spi.validation.ValidationProvider)public void removeValidationProvider(ValidationProvider validationProvider, boolean revalidate)
removeValidationProvider in interface ValidationServicevalidationProvider - the ValidationProvider to removerevalidate - whether to revalidate the domain model after the provider has been removedValidationService.removeValidationProvider(org.eclipse.emf.ecp.view.spi.validation.ValidationProvider,
boolean)public void registerValidationListener(ViewValidationListener listener)
Diagnostics with severity
higher than Diagnostic#OK. After
registration the listener's ViewValidationListener.onNewValidation(java.util.Set) will be called with
current
results.registerValidationListener in interface ValidationServicelistener - the listener to registerValidationService.registerValidationListener(org.eclipse.emf.ecp.view.spi.validation.ViewValidationListener)public void deregisterValidationListener(ViewValidationListener listener)
deregisterValidationListener in interface ValidationServicelistener - the listener to deregisterValidationService.deregisterValidationListener(org.eclipse.emf.ecp.view.spi.validation.ViewValidationListener)public void childViewModelContextAdded(ViewModelContext childContext)
ViewModelContext is added as a child context to the root
ViewModelContext this GlobalViewModelService belongs to.childViewModelContextAdded in interface GlobalViewModelServicechildContext - The ViewModelContext that was added.GlobalViewModelService.childViewModelContextAdded(org.eclipse.emf.ecp.view.spi.context.ViewModelContext)public void childContextAdded(VElement parentElement, EMFFormsViewContext childContext)
childContextAdded in interface EMFFormsContextListenerparentElement - The VElement that is associated with the child contextchildContext - The EMFFormsViewContext that was addedEMFFormsContextListener.childContextAdded(org.eclipse.emf.ecp.view.spi.model.VElement,
org.eclipse.emfforms.spi.core.services.view.EMFFormsViewContext)public void childContextDisposed(EMFFormsViewContext childContext)
childContextDisposed in interface EMFFormsContextListenerchildContext - The EMFFormsViewContext that was disposedEMFFormsContextListener.childContextDisposed(org.eclipse.emfforms.spi.core.services.view.EMFFormsViewContext)public void contextInitialised()
contextInitialised in interface EMFFormsContextListenerEMFFormsContextListener.contextInitialised()public void contextDispose()
contextDispose in interface EMFFormsContextListenerEMFFormsContextListener.contextDispose()protected ViewSubstitutionLabelProviderFactory getSubstitutionLabelProviderFactory()
ViewSubstitutionLabelProviderFactory, if any is registered.ViewSubstitutionLabelProviderFactory, if any is available,
null otherwiseCopyright © 2017. All rights reserved.