summaryrefslogtreecommitdiffstats
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
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 '')
-rw-r--r--sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java22
-rw-r--r--sca-java-2.x/trunk/modules/builder/src/main/resources/org/apache/tuscany/sca/builder/builder-validation-messages.properties3
2 files changed, 21 insertions, 4 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());
}
-
}
}
diff --git a/sca-java-2.x/trunk/modules/builder/src/main/resources/org/apache/tuscany/sca/builder/builder-validation-messages.properties b/sca-java-2.x/trunk/modules/builder/src/main/resources/org/apache/tuscany/sca/builder/builder-validation-messages.properties
index f16b24f0dc..f2cfafeda8 100644
--- a/sca-java-2.x/trunk/modules/builder/src/main/resources/org/apache/tuscany/sca/builder/builder-validation-messages.properties
+++ b/sca-java-2.x/trunk/modules/builder/src/main/resources/org/apache/tuscany/sca/builder/builder-validation-messages.properties
@@ -30,4 +30,5 @@ JaxWSClientAsyncMethodsNotAllowed = [CA100006] JAX-WS client-side asynchronous p
PolicySetNotFoundAtBuild = PolicySet {0} is not defined in SCA definitions
IntentNotSatisfiedAtBuild = The intent {0} associated with policy subject {1} has no matching policy set
MutuallyExclusiveIntentsAtBuild = [POL40009,ASM60009,ASM60010] Intent {0} and {1} are mutually exclusive
-IntentNotFoundAtBuild = = Intent {0} is not defined in SCA definitions
+IntentNotFoundAtBuild = Intent {0} is not defined in SCA definitions
+URIFoundOnServiceSCABinding = [ASM90005] The SCA binding {0} on component {1} service {2} should not have a URI and the URI is currently set to {3}