summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-03-10 10:40:26 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-03-10 10:40:26 +0000
commitf5e3bee1d5f90091f33b290fe588e061bf273fb7 (patch)
treed557b125601ca257279415a13a823d8e3fb1061d /sca-java-2.x/trunk/modules
parentbdffee9de1a3cbb551d65e108a26956152c4eb70 (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')
-rw-r--r--sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java2
-rw-r--r--sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java2
-rw-r--r--sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/DefaultBeanModelProcessor.java7
-rw-r--r--sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/SCABindingProcessor.java5
-rw-r--r--sca-java-2.x/trunk/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java5
-rw-r--r--sca-java-2.x/trunk/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java2
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java2
7 files changed, 16 insertions, 9 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);
}
diff --git a/sca-java-2.x/trunk/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java b/sca-java-2.x/trunk/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java
index af0eb8ea08..71386db450 100644
--- a/sca-java-2.x/trunk/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java
+++ b/sca-java-2.x/trunk/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java
@@ -27,6 +27,7 @@ import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.assembly.xml.PolicySubjectProcessor;
import org.apache.tuscany.sca.binding.ejb.EJBBinding;
import org.apache.tuscany.sca.binding.ejb.EJBBindingFactory;
+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;
@@ -57,7 +58,7 @@ import org.apache.tuscany.sca.policy.PolicyFactory;
*
* @version $Rev$ $Date$
*/
-public class EJBBindingProcessor implements StAXArtifactProcessor<EJBBinding> {
+public class EJBBindingProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<EJBBinding> {
private PolicyFactory policyFactory;
private PolicySubjectProcessor policyProcessor;
@@ -106,7 +107,7 @@ public class EJBBindingProcessor implements StAXArtifactProcessor<EJBBinding> {
}
// Read binding URI
- String uri = reader.getAttributeValue(null, EJBBinding.URI);
+ String uri = getURIString(reader, EJBBinding.URI);
if (uri != null) {
ejbBinding.setURI(uri);
}
diff --git a/sca-java-2.x/trunk/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java b/sca-java-2.x/trunk/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java
index 056bb8a75e..bdec50bde0 100644
--- a/sca-java-2.x/trunk/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java
+++ b/sca-java-2.x/trunk/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java
@@ -84,7 +84,7 @@ public class HTTPBindingProcessor extends BaseStAXArtifactProcessor implements S
httpBinding.setName(name);
}
- String uri = getString(reader, URI);
+ String uri = getURIString(reader, URI);
if (uri != null) {
httpBinding.setURI(uri);
}
diff --git a/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java b/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
index c266ab33de..70e04a3ddd 100644
--- a/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
+++ b/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
@@ -128,7 +128,7 @@ public class WebServiceBindingProcessor extends BaseStAXArtifactProcessor implem
}
// Read URI
- String uri = reader.getAttributeValue(null, URI);
+ String uri = getURIString(reader, URI);
if (uri != null) {
wsBinding.setURI(uri);
}