diff options
Diffstat (limited to 'java/sca/modules')
15 files changed, 94 insertions, 52 deletions
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/Messages.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/Messages.java new file mode 100644 index 0000000000..d40d72ae98 --- /dev/null +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/Messages.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.assembly.builder; + +/** + * Constants for resource bundle names + */ +public interface Messages { + String RESOURCE_PACKAGE = "org.apache.tuscany.sca.assembly.builder."; + String ASSEMBLY_VALIDATION = RESOURCE_PACKAGE + "assembly-validation-messages"; + String ASSEMBLY_CONFORMANCE = RESOURCE_PACKAGE + "assembly-conformance-messages"; + String DEFINITIONS_VALIDATION = RESOURCE_PACKAGE + "definitions-validation-messages"; +} diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/definitions/util/DefinitionsUtil.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/definitions/util/DefinitionsUtil.java index ba5a792c64..ead5ecba72 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/definitions/util/DefinitionsUtil.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/definitions/util/DefinitionsUtil.java @@ -19,6 +19,8 @@ package org.apache.tuscany.sca.definitions.util; +import static org.apache.tuscany.sca.assembly.builder.Messages.DEFINITIONS_VALIDATION; + import java.util.HashSet; import org.apache.tuscany.sca.definitions.Definitions; @@ -49,7 +51,7 @@ public class DefinitionsUtil { if (intents.contains(intent)){ Monitor.error(monitor, target, - "definitions-validation-messages", + DEFINITIONS_VALIDATION, "DuplicateIntent", intent.getName().toString()); } else { @@ -62,7 +64,7 @@ public class DefinitionsUtil { if (policySets.contains(policySet)){ Monitor.error(monitor, target, - "definitions-validation-messages", + DEFINITIONS_VALIDATION, "DuplicatePolicySet", policySet.getName().toString()); } else { @@ -75,7 +77,7 @@ public class DefinitionsUtil { if (bindingTypes.contains(bindingType)){ Monitor.error(monitor, target, - "definitions-validation-messages", + DEFINITIONS_VALIDATION, "DuplicateBindingType", bindingType.getType().toString()); } else { @@ -88,7 +90,7 @@ public class DefinitionsUtil { if (implementationTypes.contains(implementationType)){ Monitor.error(monitor, target, - "definitions-validation-messages", + DEFINITIONS_VALIDATION, "DuplicateImplementationType", implementationType.getType().toString()); } else { diff --git a/java/sca/modules/assembly/src/main/resources/assembly-conformance-messages.properties b/java/sca/modules/assembly/src/main/resources/org/apache/tuscany/sca/assembly/builder/assembly-conformance-messages.properties index 8ded10c9db..8ded10c9db 100644 --- a/java/sca/modules/assembly/src/main/resources/assembly-conformance-messages.properties +++ b/java/sca/modules/assembly/src/main/resources/org/apache/tuscany/sca/assembly/builder/assembly-conformance-messages.properties diff --git a/java/sca/modules/assembly/src/main/resources/assembly-validation-messages.properties b/java/sca/modules/assembly/src/main/resources/org/apache/tuscany/sca/assembly/builder/assembly-validation-messages.properties index 37aa6eaa19..c8ad3d9201 100644 --- a/java/sca/modules/assembly/src/main/resources/assembly-validation-messages.properties +++ b/java/sca/modules/assembly/src/main/resources/org/apache/tuscany/sca/assembly/builder/assembly-validation-messages.properties @@ -68,4 +68,5 @@ PropertySourceXPathInvalid = The property source {0} for property {1} in compone PropertySourceXPathInvalid = The property file {0} for property {1} in component {2} is an invalid value. The following error was returned while processing the file name: {3} PolicyRelatedException = Policy Related Exception occured due to : {0} IntentNotFound = Intent {0} is not defined in SCA definitions +PolicySetNotFound = PolicySet {0} is not defined in SCA definitions MutuallyExclusiveIntents = Intent {0} and {1} are mutually exclusive [POL40009]
\ No newline at end of file diff --git a/java/sca/modules/assembly/src/main/resources/assembly-validation-messages_it.properties b/java/sca/modules/assembly/src/main/resources/org/apache/tuscany/sca/assembly/builder/assembly-validation-messages_it.properties index b94d37ba2d..b94d37ba2d 100644 --- a/java/sca/modules/assembly/src/main/resources/assembly-validation-messages_it.properties +++ b/java/sca/modules/assembly/src/main/resources/org/apache/tuscany/sca/assembly/builder/assembly-validation-messages_it.properties diff --git a/java/sca/modules/assembly/src/main/resources/definitions-validation-messages.properties b/java/sca/modules/assembly/src/main/resources/org/apache/tuscany/sca/assembly/builder/definitions-validation-messages.properties index 4cf9c01da5..4cf9c01da5 100644 --- a/java/sca/modules/assembly/src/main/resources/definitions-validation-messages.properties +++ b/java/sca/modules/assembly/src/main/resources/org/apache/tuscany/sca/assembly/builder/definitions-validation-messages.properties diff --git a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BaseBuilderImpl.java b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BaseBuilderImpl.java index ad2267a635..08a7515343 100644 --- a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BaseBuilderImpl.java +++ b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BaseBuilderImpl.java @@ -40,6 +40,7 @@ import org.apache.tuscany.sca.assembly.SCABindingFactory; import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.assembly.builder.BuilderExtensionPoint; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; +import org.apache.tuscany.sca.assembly.builder.Messages; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; @@ -111,7 +112,7 @@ public abstract class BaseBuilderImpl implements CompositeBuilder { if (monitor != null) { Problem problem = monitor.createProblem(this.getClass().getName(), - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, Severity.WARNING, model, message, @@ -132,7 +133,7 @@ public abstract class BaseBuilderImpl implements CompositeBuilder { if (monitor != null) { Problem problem = monitor.createProblem(this.getClass().getName(), - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, Severity.ERROR, model, message, @@ -153,7 +154,7 @@ public abstract class BaseBuilderImpl implements CompositeBuilder { Problem problem = null; problem = monitor.createProblem(this.getClass().getName(), - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, Severity.ERROR, model, message, diff --git a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BindingURIBuilderImpl.java b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BindingURIBuilderImpl.java index 57d0a7f639..bce2b9b2ea 100644 --- a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BindingURIBuilderImpl.java +++ b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/BindingURIBuilderImpl.java @@ -35,6 +35,7 @@ import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; import org.apache.tuscany.sca.assembly.builder.DeployedCompositeBuilder; +import org.apache.tuscany.sca.assembly.builder.Messages; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; @@ -279,7 +280,7 @@ public class BindingURIBuilderImpl implements CompositeBuilder, DeployedComposit } catch (URISyntaxException ex) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "URLSyntaxException", componentURIString, service.getName(), diff --git a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java index 2272d3d1a5..b97177f690 100644 --- a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java +++ b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java @@ -53,6 +53,7 @@ import org.apache.tuscany.sca.assembly.SCABindingFactory; import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.assembly.builder.BuilderExtensionPoint; import org.apache.tuscany.sca.assembly.builder.ImplementationBuilder; +import org.apache.tuscany.sca.assembly.builder.Messages; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; @@ -306,7 +307,7 @@ public class ComponentBuilderImpl { if (componentProperty.isMustSupply() && !isPropertyValueSet(componentProperty)) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "PropertyMustSupplyNull", component.getName(), componentProperty.getName()); @@ -323,7 +324,7 @@ public class ComponentBuilderImpl { if (service != component.getImplementation().getService(service.getName())){ Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "DuplicateImplementationServiceName", component.getName(), service.getName()); @@ -353,7 +354,7 @@ public class ComponentBuilderImpl { if (reference != component.getImplementation().getReference(reference.getName())){ Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "DuplicateImplementationReferenceName", component.getName(), reference.getName()); @@ -383,7 +384,7 @@ public class ComponentBuilderImpl { if (property != component.getImplementation().getProperty(property.getName())){ Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "DuplicateImplementationPropertyName", component.getName(), property.getName()); @@ -415,7 +416,7 @@ public class ComponentBuilderImpl { if (componentService != component.getService(componentService.getName())){ Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "DuplicateComponentServiceName", component.getName(), componentService.getName()); @@ -437,7 +438,7 @@ public class ComponentBuilderImpl { } else { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "ServiceNotFoundForComponentService", component.getName(), componentService.getName()); @@ -453,7 +454,7 @@ public class ComponentBuilderImpl { if (componentReference != component.getReference(componentReference.getName())){ Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "DuplicateComponentReferenceName", component.getName(), componentReference.getName()); @@ -475,7 +476,7 @@ public class ComponentBuilderImpl { } else { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "ReferenceNotFoundForComponentReference", component.getName(), componentReference.getName()); @@ -490,7 +491,7 @@ public class ComponentBuilderImpl { if (componentProperty != component.getProperty(componentProperty.getName())){ Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "DuplicateComponentPropertyName", component.getName(), componentProperty.getName()); @@ -503,7 +504,7 @@ public class ComponentBuilderImpl { } else { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "PropertyNotFound", component.getName(), componentProperty.getName()); @@ -519,7 +520,7 @@ public class ComponentBuilderImpl { .getMultiplicity())) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "ReferenceIncompatibleMultiplicity", component.getName(), componentReference.getName()); @@ -538,7 +539,7 @@ public class ComponentBuilderImpl { if (!componentTypeProperty.isMustSupply() && componentProperty.isMustSupply()) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "PropertyMustSupplyIncompatible", component.getName(), componentProperty.getName()); @@ -565,7 +566,7 @@ public class ComponentBuilderImpl { if (!componentTypeProperty.isMany() && componentProperty.isMany()) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "PropertyOverrideManyAttribute", component.getName(), componentProperty.getName()); @@ -586,7 +587,7 @@ public class ComponentBuilderImpl { if (componentProperty.getXSDElement() == null && componentProperty.getXSDType() == null) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "NoTypeForComponentProperty", component.getName(), componentProperty.getName()); @@ -628,7 +629,7 @@ public class ComponentBuilderImpl { if (sourceProp == null) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "PropertySourceNotFound", source, componentProperty.getName(), @@ -650,7 +651,7 @@ public class ComponentBuilderImpl { } catch (Exception ex) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "PropertySourceXpathInvalid", source, componentProperty.getName(), @@ -660,7 +661,7 @@ public class ComponentBuilderImpl { } else { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "PropertySourceValueInvalid", source, componentProperty.getName(), @@ -711,7 +712,7 @@ public class ComponentBuilderImpl { } catch (Exception ex) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "PropertyFileValueInvalid", file, componentProperty.getName(), @@ -1043,13 +1044,13 @@ public class ComponentBuilderImpl { if (topContract instanceof Reference) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "ReferenceInterfaceNotSubSet", topContract.getName()); } else { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "ServiceInterfaceNotSubSet", topContract.getName()); } diff --git a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeComponentTypeBuilderImpl.java b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeComponentTypeBuilderImpl.java index 4be688ae3b..f0889f3a2f 100644 --- a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeComponentTypeBuilderImpl.java +++ b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeComponentTypeBuilderImpl.java @@ -40,6 +40,7 @@ import org.apache.tuscany.sca.assembly.SCABinding; import org.apache.tuscany.sca.assembly.SCABindingFactory; import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.assembly.builder.BuilderExtensionPoint; +import org.apache.tuscany.sca.assembly.builder.Messages; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; @@ -107,7 +108,7 @@ public class CompositeComponentTypeBuilderImpl { if (composite.getComponent(component.getName()) == null) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "DuplicateComponentName", composite.getName().toString(), component.getName()); @@ -325,7 +326,7 @@ public class CompositeComponentTypeBuilderImpl { } else { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "PromotedServiceNotFound", ((Composite)componentType).getName().toString(), promotedServiceName); @@ -367,7 +368,7 @@ public class CompositeComponentTypeBuilderImpl { } else { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "PromotedReferenceNotFound", ((Composite)componentType).getName().toString(), componentReferenceName); @@ -427,13 +428,13 @@ public class CompositeComponentTypeBuilderImpl { if (topContract instanceof Reference) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "ReferenceInterfaceNotSubSet", topContract.getName()); } else { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "ServiceInterfaceNotSubSet", topContract.getName()); } diff --git a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeIncludeBuilderImpl.java b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeIncludeBuilderImpl.java index cd197f625b..8163b0bbe1 100644 --- a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeIncludeBuilderImpl.java +++ b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositeIncludeBuilderImpl.java @@ -26,6 +26,7 @@ import org.apache.tuscany.sca.assembly.Reference; import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; +import org.apache.tuscany.sca.assembly.builder.Messages; import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; @@ -72,7 +73,7 @@ public class CompositeIncludeBuilderImpl implements CompositeBuilder { for (Composite included : composite.getIncludes()) { if (included.isLocal() && !composite.isLocal()) { // ASM60041 - Monitor.error(monitor, this, "assembly-validation-messages", "IllegalCompositeIncusion", composite + Monitor.error(monitor, this, Messages.ASSEMBLY_VALIDATION, "IllegalCompositeIncusion", composite .getName().toString(), included.getName().toString()); return null; } diff --git a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java index 5f839f4505..5a2abf5f92 100644 --- a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java +++ b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java @@ -260,6 +260,7 @@ public class CompositePolicyBuilderImpl extends BaseBuilderImpl implements Compo policySets.add(definitions.getPolicySets().get(index)); } else { // PolicySet cannot be resolved + warning(monitor, "PolicySetNotFound", subject, policySet); } } } diff --git a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java index 06320316e5..a107880022 100644 --- a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java +++ b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java @@ -38,6 +38,7 @@ import org.apache.tuscany.sca.assembly.Reference; import org.apache.tuscany.sca.assembly.SCABinding; import org.apache.tuscany.sca.assembly.Wire; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; +import org.apache.tuscany.sca.assembly.builder.Messages; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; @@ -224,7 +225,7 @@ public class EndpointReferenceBuilderImpl { if (resolvedReference != null) { wire.setSource(resolvedReference); } else { - Monitor.warning(monitor, this, "assembly-validation-messages", "WireSourceNotFound", source + Monitor.warning(monitor, this, Messages.ASSEMBLY_VALIDATION, "WireSourceNotFound", source .getName()); } } else { @@ -238,7 +239,7 @@ public class EndpointReferenceBuilderImpl { if (resolvedService != null) { wire.setTarget(target); } else { - Monitor.warning(monitor, this, "assembly-validation-messages", "WireTargetNotFound", target + Monitor.warning(monitor, this, Messages.ASSEMBLY_VALIDATION, "WireTargetNotFound", target .getName()); } } else { @@ -260,7 +261,7 @@ public class EndpointReferenceBuilderImpl { } resolvedReference.getTargets().add(wire.getTarget()); } else { - Monitor.warning(monitor, this, "assembly-validation-messages", "WireIncompatibleInterface", source + Monitor.warning(monitor, this, Messages.ASSEMBLY_VALIDATION, "WireIncompatibleInterface", source .getName(), target.getName()); } } @@ -319,7 +320,7 @@ public class EndpointReferenceBuilderImpl { if (reference.getEndpointReferences().size() == 0) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "NoComponentReferenceTarget", reference.getName()); } @@ -333,7 +334,7 @@ public class EndpointReferenceBuilderImpl { if (bindingsIdentifyTargets(reference)) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "ReferenceEndPointMixWithTarget", composite.getName().toString(), component.getName(), @@ -383,7 +384,7 @@ public class EndpointReferenceBuilderImpl { reference.getEndpointReferences().add(endpointRef); Monitor.warning(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "ComponentReferenceTargetNotFound", composite.getName().toString(), targetName); @@ -401,7 +402,7 @@ public class EndpointReferenceBuilderImpl { } else { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "ReferenceIncompatibleInterface", composite.getName().toString(), component.getName() + "." + reference.getName(), @@ -416,7 +417,7 @@ public class EndpointReferenceBuilderImpl { reference.getEndpointReferences().add(endpointRef); Monitor.warning(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "ComponentReferenceTargetNotFound", composite.getName().toString(), targetName); @@ -509,7 +510,7 @@ public class EndpointReferenceBuilderImpl { reference.getEndpointReferences().add(endpointRef); Monitor.warning(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "ComponentReferenceTargetNotFound", composite.getName().toString(), targetName); @@ -528,7 +529,7 @@ public class EndpointReferenceBuilderImpl { } else { Monitor.warning(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "ReferenceIncompatibleInterface", composite.getName().toString(), reference.getName(), @@ -571,7 +572,7 @@ public class EndpointReferenceBuilderImpl { if (!promoted && !componentReference.isForCallback() && !componentReference.isWiredByImpl()) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "ReferenceWithoutTargets", composite.getName().toString(), componentReference.getName()); @@ -585,7 +586,7 @@ public class EndpointReferenceBuilderImpl { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "TooManyReferenceTargets", componentReference.getName()); } diff --git a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ReferenceConfigurationUtil.java b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ReferenceConfigurationUtil.java index cf25440528..67b143e95d 100644 --- a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ReferenceConfigurationUtil.java +++ b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ReferenceConfigurationUtil.java @@ -31,6 +31,7 @@ import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.assembly.Multiplicity; import org.apache.tuscany.sca.assembly.OptimizableBinding; import org.apache.tuscany.sca.assembly.Reference; +import org.apache.tuscany.sca.assembly.builder.Messages; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.monitor.Problem.Severity; @@ -53,7 +54,7 @@ abstract class ReferenceConfigurationUtil { if (monitor != null) { Problem problem = monitor.createProblem(ReferenceConfigurationUtil.class.getName(), - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, Severity.WARNING, model, message, diff --git a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java index d1942a3e4e..c013780c7b 100644 --- a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java +++ b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java @@ -39,6 +39,7 @@ import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; import org.apache.tuscany.sca.assembly.builder.DeployedCompositeBuilder; +import org.apache.tuscany.sca.assembly.builder.Messages; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.monitor.Monitor; @@ -72,12 +73,12 @@ public class StructuralURIBuilderImpl implements CompositeBuilder, DeployedCompo // Check that multiple bindings do not have the same name if (existed != null && existed != binding) { if (contract instanceof Service) { - Monitor.error(monitor, this, "assembly-validation-messages", "MultipleBindingsForService", contract + Monitor.error(monitor, this, Messages.ASSEMBLY_VALIDATION, "MultipleBindingsForService", contract .getName(), binding.getName()); } else { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "MultipleBindingsForReference", contract.getName(), binding.getName()); @@ -100,14 +101,14 @@ public class StructuralURIBuilderImpl implements CompositeBuilder, DeployedCompo if (contract instanceof Service) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "MultipleBindingsForServiceCallback", contract.getName(), binding.getName()); } else { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "MultipleBindingsForReferenceCallback", contract.getName(), binding.getName()); @@ -196,7 +197,7 @@ public class StructuralURIBuilderImpl implements CompositeBuilder, DeployedCompo } catch (URISyntaxException ex) { Monitor.error(monitor, this, - "assembly-validation-messages", + Messages.ASSEMBLY_VALIDATION, "URLSyntaxException", componentURIString, service.getName(), |