You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2008/04/25 13:35:28 UTC

svn commit: r651576 - in /incubator/tuscany/java/sca/modules/assembly/src/main: java/org/apache/tuscany/sca/assembly/builder/impl/ resources/

Author: slaws
Date: Fri Apr 25 04:35:22 2008
New Revision: 651576

URL: http://svn.apache.org/viewvc?rev=651576&view=rev
Log:
A bit of tidying of warning messages. 

Modified:
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages_en.properties

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java?rev=651576&r1=651575&r2=651576&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java Fri Apr 25 04:35:22 2008
@@ -176,11 +176,6 @@
 
             // Index all components and check for duplicates
             if (components.containsKey(component.getName())) {
-                /*                
-                warning("Duplicate component name: " + composite.getName()
-                        + " : "
-                        + component.getName(), composite);
-                */
                 warning("DuplicateComponentName", component, composite.getName().toString(), component.getName());
             } else {
                 components.put(component.getName(), component);
@@ -321,10 +316,7 @@
             if (property != null) {
                 componentProperty.setProperty(property);
             } else {
-                /*warning("Property not found for component property: " + component.getName()
-                    + "/"
-                    + componentProperty.getName(), component);*/
-			warning("PropertyNotFound", component, component.getName().toString(), componentProperty.getName());
+                warning("PropertyNotFound", component, component.getName().toString(), componentProperty.getName());
             }
         }
 
@@ -351,12 +343,7 @@
                 // Check that a component property does not override the
                 // mustSupply attribute
                 if (!property.isMustSupply() && componentProperty.isMustSupply()) {
-                    /*warning("Component property mustSupply attribute incompatible with property: " + component
-                                .getName()
-                                + "/"
-                                + componentProperty.getName(),
-                            component);*/
-			warning("PropertyMustSupplyIncompatible", component, component.getName().toString(), componentProperty.getName());
+                    warning("PropertyMustSupplyIncompatible", component, component.getName().toString(), componentProperty.getName());
                 }
 
                 // Default to the mustSupply attribute specified on the property
@@ -375,21 +362,14 @@
 
                 // Check that a value is supplied
                 if (componentProperty.getValue() == null && property.isMustSupply()) {
-                    /*warning("No value configured on a mustSupply property: " + component.getName()
-                        + "/"
-                        + componentProperty.getName(), component);*/
-			warning("PropertyMustSupplyNull", component, component.getName().toString(), componentProperty.getName());
+                    warning("PropertyMustSupplyNull", component, component.getName().toString(), componentProperty.getName());
                 }
 
                 // Check that a a component property does not override the
                 // many attribute
                 if (!property.isMany() && componentProperty.isMany()) {
-                    /*warning("Component property many attribute incompatible with property: " + component
-                                .getName()
-                                + "/"
-                                + componentProperty.getName(),
-                            component);*/
-			warning("PropertyOverrideManyAttribute", component, component.getName().toString(), componentProperty.getName());
+
+                    warning("PropertyOverrideManyAttribute", component, component.getName().toString(), componentProperty.getName());
                 }
 
                 // Default to the many attribute defined on the property
@@ -436,10 +416,7 @@
                 componentReference.setReference(reference);
             } else {
                 if (!componentReference.getName().startsWith("$self$.")) {
-                    /*warning("Reference not found for component reference: " + component.getName()
-                        + "/"
-                        + componentReference.getName(), component);*/
-			warning("ReferenceNotFound", component, component.getName().toString(), componentReference.getName());
+                    warning("ReferenceNotFound", component, component.getName().toString(), componentReference.getName());
                 }
             }
         }
@@ -467,12 +444,7 @@
                     if (!ReferenceConfigurationUtil.isValidMultiplicityOverride(reference.getMultiplicity(),
                                                                    componentReference
                                                                        .getMultiplicity())) {
-                        /*warning("Component reference multiplicity incompatible with reference multiplicity: " + component
-                                    .getName()
-                                    + "/"
-                                    + componentReference.getName(),
-                                component);*/
-				warning("ReferenceIncompatibleMultiplicity", component, component.getName().toString(), componentReference.getName());
+                        warning("ReferenceIncompatibleMultiplicity", component, component.getName().toString(), componentReference.getName());
                     }
                 } else {
                     componentReference.setMultiplicity(reference.getMultiplicity());
@@ -485,11 +457,7 @@
                         .getInterfaceContract())) {
                         if (!interfaceContractMapper.isCompatible(componentReference.getInterfaceContract(),
                                                                   interfaceContract)) {
-                            /*warning("Component reference interface incompatible with reference interface: " + component
-                                .getName()
-                                + "/"
-                                + componentReference.getName(), component);*/
-					warning("ReferenceIncompatibleComponentInterface", component, component.getName().toString(), componentReference.getName());
+                            warning("ReferenceIncompatibleComponentInterface", component, component.getName().toString(), componentReference.getName());
                         }
                     }
                 } else {
@@ -549,10 +517,7 @@
             if (service != null) {
                 componentService.setService(service);
             } else {
-                /*warning("Service not found for component service: " + component.getName()
-                    + "/"
-                    + componentService.getName(), component);*/
-			warning("ServiceNotFoundForComponentService", component, component.getName().toString(), componentService.getName());
+                warning("ServiceNotFoundForComponentService", component, component.getName().toString(), componentService.getName());
             }
         }
 
@@ -618,30 +583,21 @@
                                                                Map<String, ComponentProperty> componentProperties) {
         for (ComponentService componentService : component.getServices()) {
             if (componentServices.containsKey(componentService.getName())) {
-                /*warning("Duplicate component service name: " + component.getName()
-                    + "/"
-                    + componentService.getName(), component);*/
-			warning("DuplicateComponentServiceName", component, component.getName().toString(), componentService.getName());
+                warning("DuplicateComponentServiceName", component, component.getName().toString(), componentService.getName());
             } else {
                 componentServices.put(componentService.getName(), componentService);
             }
         }
         for (ComponentReference componentReference : component.getReferences()) {
             if (componentReferences.containsKey(componentReference.getName())) {
-                /*warning("Duplicate component reference name: " + component.getName()
-                    + "/"
-                    + componentReference.getName(), component);*/
-			warning("DuplicateComponentReferenceName", component, component.getName().toString(), componentReference.getName());
+                warning("DuplicateComponentReferenceName", component, component.getName().toString(), componentReference.getName());
             } else {
                 componentReferences.put(componentReference.getName(), componentReference);
             }
         }
         for (ComponentProperty componentProperty : component.getProperties()) {
             if (componentProperties.containsKey(componentProperty.getName())) {
-                /*warning("Duplicate component property name: " + component.getName()
-                    + "/"
-                    + componentProperty.getName(), component);*/
-			warning("DuplicateComponentPropertyName", component, component.getName().toString(), componentProperty.getName());
+                warning("DuplicateComponentPropertyName", component, component.getName().toString(), componentProperty.getName());
             } else {
                 componentProperties.put(componentProperty.getName(), componentProperty);
             }
@@ -656,18 +612,13 @@
         // First check that the component has a resolved implementation
         Implementation implementation = component.getImplementation();
         if (implementation == null) {
-
             // A component must have an implementation
-            /*warning("No implementation for component: " + component.getName(), component);*/
-		warning("NoComponentImplementation", component, component.getName().toString());
+            warning("NoComponentImplementation", component, component.getName().toString());
 
         } else if (implementation.isUnresolved()) {
 
             // The implementation must be fully resolved
-            /*warning("Component implementation not found: " + component.getName()
-                + " : "
-                + implementation.getURI(), component);*/
-		warning("UnresolvedComponentImplementation", component, component.getName().toString(), implementation.getURI());
+            warning("UnresolvedComponentImplementation", component, component.getName().toString(), implementation.getURI());
 
         } else {
 
@@ -675,10 +626,7 @@
             // duplicates
             for (Property property : implementation.getProperties()) {
                 if (properties.containsKey(property.getName())) {
-                    /*warning("Duplicate property name: " + component.getName()
-                        + "/"
-                        + property.getName(), component);*/
-			warning("DuplicateImplementationPropertyName", component, component.getName().toString(), property.getName());
+                    warning("DuplicateImplementationPropertyName", component, component.getName().toString(), property.getName());
                 } else {
                     properties.put(property.getName(), property);
                 }
@@ -694,10 +642,7 @@
             }
             for (Reference reference : implementation.getReferences()) {
                 if (references.containsKey(reference.getName())) {
-                    /*warning("Duplicate reference name: " + component.getName()
-                        + "/"
-                        + reference.getName(), component);*/
-			warning("DuplicateImplementationReferenceName", component, component.getName().toString(), reference.getName());
+                    warning("DuplicateImplementationReferenceName", component, component.getName().toString(), reference.getName());
                 } else {
                     references.put(reference.getName(), reference);
                 }
@@ -1183,12 +1128,7 @@
                 continue;
             }
             if (binding.getName().equals(otherBinding.getName())) {
-                /*warning("Multiple bindings for service " + 
-                                                    service.getName() + 
-                                                    " have the same binding type and name " +
-                                                    binding.getName() +
-                                                    ". Tuscany SCA can't create unique URIs to differentiate these bindings ", binding);*/
-			warning("MultipleBindingsForService", binding, service.getName(), binding.getName());
+                warning("MultipleBindingsForService", binding, service.getName(), binding.getName());
             }
         }
     }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java?rev=651576&r1=651575&r2=651576&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java Fri Apr 25 04:35:22 2008
@@ -142,7 +142,6 @@
                         }
                     }
                     if (!promoted && !componentReference.isCallback()) {
-                        /*warning("No targets for reference: " + componentReference.getName(), composite);*/
                         warning("ReferenceWithoutTargets", composite, composite.getName().toString(), componentReference.getName());
                     }
                 } else {
@@ -277,8 +276,7 @@
                     }
     
                 } else {
-                    /*warning("Promoted component service not found: " + promotedServiceName, composite);*/
-                    warning("PromotedServiceNotFound", composite, promotedServiceName);
+                    warning("PromotedServiceNotFound", composite, composite.getName().toString(), promotedServiceName);
                 }
             }
         }
@@ -341,8 +339,7 @@
                         	}
                         }
                     } else {
-                        /*warning("Promoted component reference not found: " + componentReferenceName, composite);*/
-                        warning("PromotedReferenceNotFound", composite, componentReferenceName);
+                        warning("PromotedReferenceNotFound", composite, composite.getName().toString(), componentReferenceName);
                     }
                 }
             }
@@ -411,11 +408,6 @@
                         // see if an sca binding is associated with a resolved target or not
                         componentService.setUnresolved(false);
                     } else {
-                        /*warning("Incompatible interfaces on component reference and target: " + componentReference
-                                    .getName()
-                                    + " : "
-                                    + componentService.getName(),
-                                composite);*/
                         warning("ReferenceIncompatibleInterface", composite, composite.getName().toString(), componentReference.getName(), componentService.getName());
                     }
                 } else {
@@ -425,8 +417,6 @@
                     
                     // The bindings will be cloned back into the reference when the 
                     // target is finally resolved. 
-              
-                    /*warning("Component reference target not found, it might be a remote service: " + componentService.getName(), composite);*/
                     warning("ComponentReferenceTargetNotFound", composite, composite.getName().toString(), componentService.getName());
                 }
             }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages_en.properties
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages_en.properties?rev=651576&r1=651575&r2=651576&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages_en.properties (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages_en.properties Fri Apr 25 04:35:22 2008
@@ -31,13 +31,13 @@
 PropertyMustSupplyIncompatible = Component property mustSupply attribute incompatible with property: Component = {0} Property = {1}
 PropertyMustSupplyNull = No value configured on a mustSupply property: Component = {0} Property = {1}
 PropertyOverrideManyAttribute = Component property many attribute incompatible with property: Component = {0} Property = {1}
-ReferenceNotFound = Component property many attribute incompatible with property: Component = {0} Reference = {1}
+ReferenceNotFound = Reference not found for component reference: Component = {0} Reference = {1}
 ReferenceIncompatibleMultiplicity = Component reference multiplicity incompatible with reference multiplicity: Component = {0} Reference = {1}
 ReferenceIncompatibleInterface = Incompatible interfaces on component reference and target: Composite = {0} Reference = {1} Service = {2}
 ReferenceIncompatibleComponentInterface = Component reference interface incompatible with reference interface: Component = {0} Reference = {1}
-MultipleBindingsForService = Multiple bindings for service: Binding = {0} Service = {1} Binding = {2}
+MultipleBindingsForService = Multiple bindings with the same name for a service: Binding = {0} Service = {1} Binding = {2}
 ReferenceWithoutTargets = No targets for reference: Composite = {0} Reference = {1}
 PromotedReferenceNotFound = Promoted component reference not found: Composite = {0} Reference = {1}
 PromotedServiceNotFound = Promoted component service not found: Composite = {0} Service = {1}
-ComponentReferenceTargetNotFound = Component reference target not found, it might be a remote service: Composite = {0} Service = {1}
+ComponentReferenceTargetNotFound = Component reference target not found, it might be a remote service running elsewhere in the SCA Domain: Composite = {0} Service = {1}
 NoSCABindingAvailableForUnresolvedService = A local service cannot be found for reference {0} target {1} and there is no SCA binding available to represent the unresolved target