Package org.eclipse.graphiti.features
Interface IMappingProvider
- All Known Subinterfaces:
IFeatureProvider
- All Known Implementing Classes:
AbstractFeatureProvider
,ConfigurableFeatureProviderWrapper
,DefaultFeatureProvider
,DefaultFeatureProviderWithPatterns
,DefaultFeatureProviderWrapper
public interface IMappingProvider
The Interface IMappingProvider.
-
Method Summary
Modifier and TypeMethodDescriptionObject[]
getAllBusinessObjectsForPictogramElement
(PictogramElement pictogramElement) Returns all business objects which are linked to the given pictogram element.getAllPictogramElementsForBusinessObject
(Object businessObject) Provides the pictogram elements which represents the given business object.getBusinessObjectForPictogramElement
(PictogramElement pictogramElement) Returns the first of possibly several business objects which are linked to the given pictogram element.getPictogramElementForBusinessObject
(Object businessObject) This method is similar to the method getAllPictogramElementsForBusinessObject, but only return the first PictogramElement.boolean
hasPictogramElementForBusinessObject
(Object businessObject) Check does there have pictogram element linked to this business object.void
link
(PictogramElement pictogramElement, Object businessObject) Links the pictogram element with a business object.void
link
(PictogramElement pictogramElement, Object[] businessObjects) Links the pictogram element with several business objects.
-
Method Details
-
getAllBusinessObjectsForPictogramElement
Returns all business objects which are linked to the given pictogram element. Equality is determined by calling theEcoreUtil.equals(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)
method, but this might be changed by clients by overridingIToolBehaviorProvider.equalsBusinessObjects(Object, Object)
.- Parameters:
pictogramElement
- The pictogram element for which to return the business objects.- Returns:
- The business objects which are linked to the given pictogram element. Can be empty but not null.
- See Also:
-
getBusinessObjectForPictogramElement
Returns the first of possibly several business objects which are linked to the given pictogram element. Equality is determined by calling theEcoreUtil.equals(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)
method, but this might be changed by clients by overridingIToolBehaviorProvider.equalsBusinessObjects(Object, Object)
. This is a convenience method forgetAllBusinessObjectsForPictogramElement(PictogramElement)
, because in many usecases only a single business object is linked.- Parameters:
pictogramElement
- The pictogram element for which to return the business object.- Returns:
- The first of possibly several business objects which are linked to the given pictogram element. Can be null.
- See Also:
-
getAllPictogramElementsForBusinessObject
Provides the pictogram elements which represents the given business object.- Parameters:
businessObject
- the given business object- Returns:
- the pictogram elements
-
link
Links the pictogram element with a business object. This deletes all previous links of this pictogram element.- Parameters:
pictogramElement
- The pictogram element which to link to a new business object.businessObject
- The business object to link. Can be null to just delete previous links.
-
link
Links the pictogram element with several business objects. This deletes all previous links of this pictogram element.- Parameters:
pictogramElement
- The pictogram element which to link to new business objects.businessObjects
- The business objects to link. Can be null or empty to just delete previous links.
-
hasPictogramElementForBusinessObject
Check does there have pictogram element linked to this business object.- Parameters:
businessObject
- the business object- Returns:
- true when at least one pictogram element is linked, otherwise return false.
-
getPictogramElementForBusinessObject
This method is similar to the method getAllPictogramElementsForBusinessObject, but only return the first PictogramElement.- Parameters:
businessObject
- the business object- Returns:
- linked pictogram element
- See Also:
-