From 286e08fe4d7d7ca853e1384e18bdbfbeb84d2cd3 Mon Sep 17 00:00:00 2001 From: rfeng Date: Tue, 18 Aug 2009 17:04:59 +0000 Subject: Fix for ASM_4008 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@805498 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/assembly/builder/impl/PropertyConfigurationUtil.java | 12 +++++------- .../main/resources/assembly-validation-messages.properties | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'java/sca/modules/assembly/src/main') diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PropertyConfigurationUtil.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PropertyConfigurationUtil.java index abbcf5591d..b9da3301ea 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PropertyConfigurationUtil.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PropertyConfigurationUtil.java @@ -18,6 +18,8 @@ */ package org.apache.tuscany.sca.assembly.builder.impl; +import static org.apache.tuscany.sca.assembly.Base.SCA11_NS; + import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; @@ -52,10 +54,6 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; import org.xml.sax.InputSource; -import static org.apache.tuscany.sca.assembly.xsd.Constants.PROPERTY; -import static org.apache.tuscany.sca.assembly.xsd.Constants.SCA11_NS; -import static org.apache.tuscany.sca.assembly.xsd.Constants.VALUE; - /** * Utility class to deal with processing of component properties that are taking values from the parent * composite's properties or an external file. @@ -92,14 +90,14 @@ abstract class PropertyConfigurationUtil { return (Document)result; } else { Document document = documentBuilderFactory.newDocumentBuilder().newDocument(); - Element newProperty = document.createElementNS(SCA11_NS, PROPERTY); + Element newProperty = document.createElementNS(SCA11_NS, "property"); - if( VALUE.equals(result.getLocalName()) ) { + if( "value".equals(result.getLocalName()) ) { // If the result is a element, use it directly in the result newProperty.appendChild(document.importNode(result, true)); } else { // If the result is not a element, create a element to contain the result - Element newValue = document.createElementNS(SCA11_NS, VALUE); + Element newValue = document.createElementNS(SCA11_NS, "value"); newValue.appendChild(document.importNode(result, true)); newProperty.appendChild(newValue); } // end if diff --git a/java/sca/modules/assembly/src/main/resources/assembly-validation-messages.properties b/java/sca/modules/assembly/src/main/resources/assembly-validation-messages.properties index b4e987df02..d5915393f7 100644 --- a/java/sca/modules/assembly/src/main/resources/assembly-validation-messages.properties +++ b/java/sca/modules/assembly/src/main/resources/assembly-validation-messages.properties @@ -30,7 +30,7 @@ DuplicateImplementationServiceName = Duplicate service name: Component = {0} Ser DuplicateImplementationReferenceName = Duplicate reference name: Component = {0} Reference = {1} PropertyNotFound = Property not found for component property: Component = {0} Property = {1} PropertyMustSupplyIncompatible = Component property mustSupply attribute incompatible with property: Component = {0} Property = {1} -PropertyMustSupplyNull = No value configured on a mustSupply property: Component = {0} Property = {1} +PropertyMustSupplyNull = [ASM_4008] No value configured on a mustSupply property: Component = {0} Property = {1} PropertyOverrideManyAttribute = Component property many attribute incompatible with property: Component = {0} Property = {1} ReferenceNotFound = Reference not found for component reference: Component = {0} Reference = {1} ReferenceIncompatibleMultiplicity = Component reference multiplicity incompatible with reference multiplicity: Component = {0} Reference = {1} -- cgit v1.2.3