Class PreSetValidationServiceImpl
- java.lang.Object
-
- org.eclipse.emfforms.internal.common.prevalidation.PreSetValidationServiceImpl
-
- All Implemented Interfaces:
IFeatureConstraint,PreSetValidationService
public class PreSetValidationServiceImpl extends java.lang.Object implements PreSetValidationService
Implementation of thePreSetValidationService.- Author:
- emueller
-
-
Field Summary
-
Fields inherited from interface org.eclipse.emfforms.spi.common.validation.IFeatureConstraint
E_ROOT_OBJECT
-
-
Constructor Summary
Constructors Constructor Description PreSetValidationServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidactivate(org.osgi.framework.BundleContext bundleContext)Called by the framework when the component gets activated.voidaddConstraintValidator(org.eclipse.emf.ecore.ENamedElement element, IFeatureConstraint constraint)Add a customIFeatureConstraint.protected voiddeactivate(org.osgi.framework.BundleContext bundleContext)Called by the framework when the component gets deactivated.org.eclipse.emf.common.util.Diagnosticvalidate(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, java.lang.Object value)Validate a given value against constraints defined by the EDataType of theEStructuralFeature.org.eclipse.emf.common.util.Diagnosticvalidate(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, java.lang.Object value, java.util.Map<java.lang.Object,java.lang.Object> context)Validate a given value against constraints defined by theEDataTypeof theEStructuralFeature.org.eclipse.emf.common.util.DiagnosticvalidateLoose(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, java.lang.Object value)Validate a given value against loose constraints defined by the EDataType of theEStructuralFeature.
-
-
-
Method Detail
-
validate
public org.eclipse.emf.common.util.Diagnostic validate(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, java.lang.Object value)Description copied from interface:PreSetValidationServiceValidate a given value against constraints defined by the EDataType of theEStructuralFeature.- Specified by:
validatein interfacePreSetValidationService- Parameters:
eStructuralFeature- the feature that defines any constraintsvalue- the value to be validated- Returns:
- a
Diagnosticdescribing any potential errors
-
validate
public org.eclipse.emf.common.util.Diagnostic validate(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, java.lang.Object value, java.util.Map<java.lang.Object,java.lang.Object> context)Description copied from interface:IFeatureConstraintValidate a given value against constraints defined by theEDataTypeof theEStructuralFeature.- Specified by:
validatein interfaceIFeatureConstraint- Parameters:
eStructuralFeature- the feature that defines any constraintsvalue- the value to be validatedcontext- the validation context, may benull- Returns:
- a
Diagnosticdescribing any potential errors
-
validateLoose
public org.eclipse.emf.common.util.Diagnostic validateLoose(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, java.lang.Object value)Validate a given value against loose constraints defined by the EDataType of theEStructuralFeature.- Specified by:
validateLoosein interfacePreSetValidationService- Parameters:
eStructuralFeature- the feature that defines any constraintsvalue- the value to be validated- Returns:
- a
Diagnosticdescribing any potential errors - See Also:
PreSetValidationService.validateLoose(org.eclipse.emf.ecore.EStructuralFeature, java.lang.Object)
-
addConstraintValidator
public void addConstraintValidator(org.eclipse.emf.ecore.ENamedElement element, IFeatureConstraint constraint)Description copied from interface:PreSetValidationServiceAdd a customIFeatureConstraint.- Specified by:
addConstraintValidatorin interfacePreSetValidationService- Parameters:
element-ENamedElementto add a validation constraint forconstraint- the behavioral validation constraint
-
activate
protected void activate(org.osgi.framework.BundleContext bundleContext)
Called by the framework when the component gets activated.- Parameters:
bundleContext- TheBundleContext
-
deactivate
protected void deactivate(org.osgi.framework.BundleContext bundleContext)
Called by the framework when the component gets deactivated.- Parameters:
bundleContext- TheBundleContext
-
-