From 0ab7ca59190fe5ac1e37c0e0196d7701a765f478 Mon Sep 17 00:00:00 2001 From: slaws Date: Mon, 20 Feb 2012 10:57:50 +0000 Subject: 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 --- .../tuscany/sca/builder/impl/ComponentBuilderImpl.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'sca-java-2.x/trunk/modules/builder') 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 = ""; -- cgit v1.2.3