summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/builder/src/main/java
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-04-08 09:08:59 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-04-08 09:08:59 +0000
commit142b72b19538405625992f9d2686d3d677784b24 (patch)
tree590a72c24714acb780201ae90eee295eca923484 /sca-java-2.x/trunk/modules/builder/src/main/java
parentc19a2b5570743ec02edc2d7339717e3c37d88e5e (diff)
TUSCANY-3527 report error id binding.sca at a service has a uri.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@931842 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/builder/src/main/java')
-rw-r--r--sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java22
1 files changed, 19 insertions, 3 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 2be14e4c6d..c8d60bd021 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
@@ -240,7 +240,7 @@ public class ComponentBuilderImpl {
calculateServiceInterfaceContract(component, componentService, componentTypeService, monitor);
// bindings
- calculateBindings(componentService, componentTypeService);
+ calculateBindings(component, componentService, componentTypeService, monitor);
// add callback reference model objects
createCallbackReference(component, componentService);
@@ -1183,7 +1183,7 @@ public class ComponentBuilderImpl {
* @param componentService the top service
* @param componentTypeService the bottom service
*/
- private void calculateBindings(Service componentService, Service componentTypeService) {
+ private void calculateBindings(Component component, Service componentService, Service componentTypeService, Monitor monitor) {
// forward bindings
if (componentService.getBindings().isEmpty()) {
componentService.getBindings().addAll(componentTypeService.getBindings());
@@ -1203,6 +1203,23 @@ public class ComponentBuilderImpl {
} else if (componentService.getCallback().getBindings().isEmpty() && componentTypeService.getCallback() != null) {
componentService.getCallback().getBindings().addAll(componentTypeService.getCallback().getBindings());
}
+
+ // [ASM90005] validate that binding.sca has no uri set
+ for (Binding binding : componentService.getBindings()){
+ if (binding instanceof SCABinding){
+ if ((binding.getURI() != null) &&
+ (binding.getURI().length() > 0)){
+ Monitor.error(monitor,
+ this,
+ Messages.BUILDER_VALIDATION_BUNDLE,
+ "URIFoundOnServiceSCABinding",
+ binding.getName(),
+ component.getName(),
+ componentService.getName(),
+ binding.getURI());
+ }
+ }
+ }
}
@@ -1224,7 +1241,6 @@ public class ComponentBuilderImpl {
} else if (componentReference.getCallback().getBindings().isEmpty() && componentTypeReference.getCallback() != null) {
componentReference.getCallback().getBindings().addAll(componentTypeReference.getCallback().getBindings());
}
-
}
}