diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-03-10 10:40:26 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-03-10 10:40:26 +0000 |
commit | f5e3bee1d5f90091f33b290fe588e061bf273fb7 (patch) | |
tree | d557b125601ca257279415a13a823d8e3fb1061d /sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache | |
parent | bdffee9de1a3cbb551d65e108a26956152c4eb70 (diff) |
TUSCANY-242 add URI specific processing for binding uris and a couple of others I missed
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@921293 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache')
4 files changed, 11 insertions, 5 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java index 7d72e685cd..1b64c9aa33 100644 --- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java +++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java @@ -224,7 +224,7 @@ abstract class BaseAssemblyProcessor extends BaseStAXArtifactProcessor { * @param reader */ protected void readTargets(Reference reference, XMLStreamReader reader) { - String value = getURIString(reader, TARGET); + String value = getString(reader, TARGET); ComponentService target = null; if (value != null) { for (StringTokenizer tokens = new StringTokenizer(value); tokens.hasMoreTokens();) { diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java index 16874ff0d2..68791e2caa 100644 --- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java +++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java @@ -294,7 +294,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt compositeReference.setName(getString(reader, NAME)); readMultiplicity(compositeReference, reader); readTargets(compositeReference, reader); - String promote = getURIString(reader, Constants.PROMOTE); + String promote = getString(reader, Constants.PROMOTE); if (promote != null) { for (StringTokenizer tokens = new StringTokenizer(promote); tokens.hasMoreTokens();) { String refName = tokens.nextToken(); diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/DefaultBeanModelProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/DefaultBeanModelProcessor.java index 198ddfbfeb..e6e172a44b 100644 --- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/DefaultBeanModelProcessor.java +++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/DefaultBeanModelProcessor.java @@ -139,7 +139,12 @@ public class DefaultBeanModelProcessor<T> extends BaseAssemblyProcessor implemen String attributeName = reader.getAttributeLocalName(i); Method setter = setterMethods.get(attributeName); if (setter != null) { - String value = reader.getAttributeValue(i); + String value = null; + if (attributeName.equals("uri")){ + value = getURIString(reader, "uri"); + } else { + value = reader.getAttributeValue(i); + } setter.invoke(model, value); } } diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/SCABindingProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/SCABindingProcessor.java index 6d6594d735..28f4f9fb25 100644 --- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/SCABindingProcessor.java +++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/SCABindingProcessor.java @@ -28,6 +28,7 @@ import javax.xml.stream.XMLStreamWriter; import org.apache.tuscany.sca.assembly.SCABinding; import org.apache.tuscany.sca.assembly.SCABindingFactory; +import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; import org.apache.tuscany.sca.contribution.processor.ContributionWriteException; @@ -45,7 +46,7 @@ import org.apache.tuscany.sca.policy.PolicySubject; * @version $Rev$ $Date$ */ -public class SCABindingProcessor implements StAXArtifactProcessor<SCABinding> { +public class SCABindingProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<SCABinding> { private static final String NAME = "name"; private static final String URI = "uri"; @@ -91,7 +92,7 @@ public class SCABindingProcessor implements StAXArtifactProcessor<SCABinding> { } // Read binding URI - String uri = reader.getAttributeValue(null, URI); + String uri = getURIString(reader, URI); if (uri != null) { scaBinding.setURI(uri); } |