Skip to content

Package: EMFFormsSegmentResolver

EMFFormsSegmentResolver

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2016 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: * Lucas Koehler - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.spi.core.services.databinding.emf;
15:
16: import org.eclipse.emf.ecore.EObject;
17: import org.eclipse.emf.ecore.EStructuralFeature.Setting;
18: import org.eclipse.emf.ecp.view.spi.model.VDomainModelReferenceSegment;
19: import org.eclipse.emfforms.spi.core.services.databinding.DatabindingFailedException;
20:
21: /**
22: * An EMFFormsSegmentResolver resolves a {@link VDomainModelReferenceSegment} from a {@link EObject domain object} to
23: * the corresponding {@link Setting}.
24: *
25: * @author Lucas Koehler
26: * @since 1.19
27: *
28: */
29: public interface EMFFormsSegmentResolver {
30:
31:         /**
32:          * Resolves the given {@link VDomainModelReferenceSegment segment} from the given {@link EObject domain object} and
33:          * returns the resulting {@link Setting}.
34:          *
35:          * @param segment The {@link VDomainModelReferenceSegment} to resolve
36:          * @param domainObject The segment's root for which the segment is resolved
37:          * @return The resolved {@link Setting}
38:          * @throws DatabindingFailedException if no {@link Setting} could be resolved
39:          */
40:         Setting resolveSegment(VDomainModelReferenceSegment segment, EObject domainObject)
41:                 throws DatabindingFailedException;
42: }