summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/assembly-xml
diff options
context:
space:
mode:
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
+
+ }
}