Skip to content

Package: ObjectFilter

ObjectFilter

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2013 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Mat Hansen - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.common.spi.validation.filter;
15:
16: import org.eclipse.emf.ecore.EObject;
17:
18: /**
19: * Filter interface which allows to skip validation for certain {@link EObject}s
20: * or to ignore Diagnostics reported by EValidators and Validators.
21: * See ValidationService#registerValidationFilter(ValidationFilter).
22: *
23: * @author Mat Hansen <mhansen@eclipsesource.com>
24: */
25: public interface ObjectFilter extends ValidationFilter {
26:
27:         /**
28:          * Return true if the given {@link EObject} should NOT be validated.
29:          *
30:          * @param eObject the {@link EObject} about to be validated
31:          * @return true if the given {@link EObject} should be skipped during validation.
32:          * Note: if you use ValidationService#validate(java.util.Iterator) in conjunction with a
33:          * TreeIterator all eContents of the given {@link EObject} will be skipped as well.
34:          */
35:         boolean skipValidation(EObject eObject);
36:
37: }