Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/qompass-designer/org.eclipse.papyrus.fcm.profile/src/org/eclipse/papyrus/FCM/util/IMappingRule.java')
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.fcm.profile/src/org/eclipse/papyrus/FCM/util/IMappingRule.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.fcm.profile/src/org/eclipse/papyrus/FCM/util/IMappingRule.java b/extraplugins/qompass-designer/org.eclipse.papyrus.fcm.profile/src/org/eclipse/papyrus/FCM/util/IMappingRule.java
new file mode 100644
index 00000000000..46354994409
--- /dev/null
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.fcm.profile/src/org/eclipse/papyrus/FCM/util/IMappingRule.java
@@ -0,0 +1,40 @@
+package org.eclipse.papyrus.FCM.util;
+
+import org.eclipse.papyrus.FCM.Port;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.Interface;
+
+/**
+ * Interface used by extension point for evaluation of interface mappings
+ *
+ */
+public interface IMappingRule {
+ static final int NONE = 0;
+ static final int PROVIDED = 1;
+ static final int REQUIRED = 2;
+ static final int BOTH = 3;
+
+ /**
+ * return true, if the getProvided call below needs a transaction, i.e.
+ * potentially modifies the model
+ */
+ public int needsTransaction ();
+
+ /**
+ * Return a list of provided interfaces for a given p (and in
+ * the context of a configuration c)
+ * @param p the port
+ * @param config the configuration
+ * @return the list of provided interfaces
+ */
+ public Interface getProvided(Port p, InstanceSpecification config);
+
+ /**
+ * Return a list of provided interfaces for a given p (and in
+ * the context of a configuration c)
+ * @param p the port
+ * @param config the configuration
+ * @return the list of provided interfaces
+ */
+ public Interface getRequired(Port p, InstanceSpecification config);
+}

Back to the top