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.
|
protected void |
warn(String messageKey,
Object... arguments)
Issue a warning composed of the indicated localized string with positional
arguments. |
public void instantiate(ViewModelContext context)
ViewModelServiceinstantiate in interface ViewModelServicecontext - the ViewModelContextpublic void dispose()
ViewModelServicedispose in interface ViewModelServicepublic int getPriority()
ViewModelServicegetPriority in interface ViewModelServicepublic void validate(Collection<org.eclipse.emf.ecore.EObject> eObjects)
ValidationServicevalidate in interface ValidationServiceeObjects - the eObjects to validatepublic void validate(org.eclipse.emf.ecore.EObject eObject)
eObject - the eObject to validatepublic void notifyListeners()
public void addValidationProvider(ValidationProvider validationProvider)
ValidationServiceaddValidationProvider in interface ValidationServicevalidationProvider - the ValidationProvider to addpublic void addValidationProvider(ValidationProvider validationProvider, boolean revalidate)
ValidationServiceaddValidationProvider in interface ValidationServicevalidationProvider - the ValidationProvider to addrevalidate - whether to revalidate the domain model after the provider has been addedpublic void removeValidationProvider(ValidationProvider validationProvider)
ValidationServiceremoveValidationProvider in interface ValidationServicevalidationProvider - the ValidationProvider to removepublic void removeValidationProvider(ValidationProvider validationProvider, boolean revalidate)
ValidationServiceremoveValidationProvider in interface ValidationServicevalidationProvider - the ValidationProvider to removerevalidate - whether to revalidate the domain model after the provider has been removedpublic void registerValidationListener(ViewValidationListener listener)
ValidationServiceDiagnostics 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 registerpublic void deregisterValidationListener(ViewValidationListener listener)
ValidationServicederegisterValidationListener in interface ValidationServicelistener - the listener to deregisterpublic void childViewModelContextAdded(ViewModelContext childContext)
GlobalViewModelServiceViewModelContext is added as a child context to the root
ViewModelContext this GlobalViewModelService belongs to.childViewModelContextAdded in interface GlobalViewModelServicechildContext - The ViewModelContext that was added.public void childContextAdded(VElement parentElement, EMFFormsViewContext childContext)
EMFFormsContextListenerchildContextAdded in interface EMFFormsContextListenerparentElement - The VElement that is associated with the child contextchildContext - The EMFFormsViewContext that was addedpublic void childContextDisposed(EMFFormsViewContext childContext)
EMFFormsContextListenerchildContextDisposed in interface EMFFormsContextListenerchildContext - The EMFFormsViewContext that was disposedpublic void contextInitialised()
EMFFormsContextListenercontextInitialised in interface EMFFormsContextListenerpublic void contextDispose()
EMFFormsContextListenercontextDispose in interface EMFFormsContextListenerprotected ViewSubstitutionLabelProviderFactory getSubstitutionLabelProviderFactory()
ViewSubstitutionLabelProviderFactory, if any is registered.ViewSubstitutionLabelProviderFactory, if any is available,
null otherwiseCopyright © 2019. All rights reserved.