summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/assembly-xml
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-01-06 12:35:01 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-01-06 12:35:01 +0000
commit31f71e8e078644469dd2ed93d5873fc1050062e4 (patch)
tree4b1cf757ba3437e4206a8ba6f06602ee87ec837f /sca-java-2.x/trunk/modules/assembly-xml
parentd0e15154ff66a8422425259d0b3b3a776a004cd5 (diff)
TUSCANY-3932 - First part of this JIRA is to remove some inconsistencies in the way that callbacks are handled now. See JIRA for more comments on this first change.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1228150 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly-xml')
-rw-r--r--sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/SCABindingProcessor.java24
-rw-r--r--sca-java-2.x/trunk/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.java24
2 files changed, 48 insertions, 0 deletions
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 bbc812582e..f0cbcc669f 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
@@ -51,6 +51,8 @@ import org.apache.tuscany.sca.policy.PolicySubject;
public class SCABindingProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<SCABinding> {
private static final String NAME = "name";
private static final String URI = "uri";
+ private static final String DELEGATE_BINDING_TYPE = "delegateBindingType";
+ private static final String DELEGATE_BINDING_URI = "delegateBindingURI";
private static final String SCA11_NS = "http://docs.oasis-open.org/ns/opencsa/sca/200912";
private static final String BINDING_SCA = "binding.sca";
@@ -100,6 +102,18 @@ public class SCABindingProcessor extends BaseStAXArtifactProcessor implements St
if (uri != null) {
scaBinding.setURI(uri);
}
+
+ // Read delegate binding type
+ String delegateBindingType = getString(reader, DELEGATE_BINDING_TYPE);
+ if (delegateBindingType != null) {
+ scaBinding.setDelegateBindingType(delegateBindingType);
+ }
+
+ // Read delegate binding URI
+ String delegateBindingURI = getURIString(reader, DELEGATE_BINDING_URI);
+ if (delegateBindingURI != null) {
+ scaBinding.setDelegateBindingURI(delegateBindingURI);
+ }
// Read any sub-elements
boolean endFound = false;
@@ -145,6 +159,16 @@ public class SCABindingProcessor extends BaseStAXArtifactProcessor implements St
writer.writeAttribute(URI, scaBinding.getURI());
}
+ // Write delegate binding type
+ if (scaBinding.getDelegateBindingType() != null) {
+ writer.writeAttribute(DELEGATE_BINDING_TYPE, scaBinding.getDelegateBindingType());
+ }
+
+ // Write delegate binding URI
+ if (scaBinding.getDelegateBindingURI() != null) {
+ writer.writeAttribute(DELEGATE_BINDING_URI, scaBinding.getDelegateBindingURI());
+ }
+
// write wireFormat
extensionProcessor.write(scaBinding.getRequestWireFormat(), writer, context);
diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.java b/sca-java-2.x/trunk/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.java
index f83a2ebd14..3845fff14a 100644
--- a/sca-java-2.x/trunk/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.java
+++ b/sca-java-2.x/trunk/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.java
@@ -159,4 +159,28 @@ public class TestSCABindingImpl implements SCABinding, PolicySubject {
public void setOperationSelector(OperationSelector operationSelector) {
}
+
+ @Override
+ public String getDelegateBindingType() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void setDelegateBindingType(String delegateBindingType) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public String getDelegateBindingURI() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void setDelegateBindingURI(String delegateBindingURI) {
+ // TODO Auto-generated method stub
+
+ }
}