summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/builder
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-02-20 10:57:50 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-02-20 10:57:50 +0000
commit0ab7ca59190fe5ac1e37c0e0196d7701a765f478 (patch)
tree3fe4a656b7374ef9d2a380436c9a18a7c6ab841c /sca-java-2.x/trunk/modules/builder
parent56f088bdab52beb315c476a5a0a0742ab88aa078 (diff)
TUSCANY-3459 - Allow the remotable status of an interface to be overridden using the remotable attributed on the SCDL interface element as described by the OASIS assembly spec.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1291191 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/builder')
-rw-r--r--sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java
index 23bd33e806..d67cb65bb0 100644
--- a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java
+++ b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java
@@ -1509,6 +1509,15 @@ public class ComponentBuilderImpl {
if (topInterfaceContract == null) {
topContract.setInterfaceContract(bottomInterfaceContract);
} else if (bottomInterfaceContract != null) {
+ // apply remotable override if it has been specified in the SCDL for the
+ // higher level contract
+ if (topInterfaceContract.getInterface().isRemotableSetFromSCDL() == true){
+ if (bottomInterfaceContract.getInterface().isRemotable() == false &&
+ topInterfaceContract.getInterface().isRemotable() == true){
+ bottomInterfaceContract.getInterface().setRemotable(true);
+ }
+ }
+
// Check that the top and bottom interface contracts are compatible
boolean isCompatible = true;
String incompatibilityReason = "";
@@ -1569,6 +1578,14 @@ public class ComponentBuilderImpl {
if (topInterfaceContract == null) {
topContract.setInterfaceContract(bottomInterfaceContract);
} else if (bottomInterfaceContract != null) {
+ // apply remotable override if it has been specified in the SCDL for the
+ // higher level contract
+ if (topInterfaceContract.getInterface().isRemotableSetFromSCDL() == true){
+ if (bottomInterfaceContract.getInterface().isRemotable() == false &&
+ topInterfaceContract.getInterface().isRemotable() == true){
+ bottomInterfaceContract.getInterface().setRemotable(true);
+ }
+ }
// Check that the top and bottom interface contracts are compatible
boolean isCompatible = true;
String incompatibilityReason = "";