diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-06-30 21:37:31 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-06-30 21:37:31 +0000 |
commit | f728f06486d700f7b7d318caac532aca4bd44b46 (patch) | |
tree | 9f48db3104803ed71503a4e5701384d7dd410309 /java/sca/modules/binding-corba | |
parent | 2515918a3959f4d2386c0f3f45859a261de8df55 (diff) |
Apply the patApply the patch from Wojtek for TUSCANY-2397. Thanks. (modules-dir.patch)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@672933 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-corba')
3 files changed, 22 insertions, 0 deletions
diff --git a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/CorbaBinding.java b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/CorbaBinding.java index 3fcff6b0d8..667bfa361b 100644 --- a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/CorbaBinding.java +++ b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/CorbaBinding.java @@ -37,4 +37,8 @@ public interface CorbaBinding extends Binding { int getPort(); void setPort(int port); + + String getId(); + + void setId(String id); } diff --git a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingImpl.java b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingImpl.java index 8d54cd4936..c98b41549b 100644 --- a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingImpl.java +++ b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingImpl.java @@ -36,6 +36,7 @@ public class CorbaBindingImpl implements CorbaBinding, PolicySetAttachPoint { private String uri; private String host; private int port; + private String id; private List<Intent> requiredIntents = new ArrayList<Intent>(); private List<PolicySet> policySets = new ArrayList<PolicySet>(); @@ -115,4 +116,12 @@ public class CorbaBindingImpl implements CorbaBinding, PolicySetAttachPoint { return super.clone(); } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + } diff --git a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingProcessor.java b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingProcessor.java index ce227bed1c..53333bd7aa 100644 --- a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingProcessor.java +++ b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingProcessor.java @@ -80,6 +80,11 @@ public class CorbaBindingProcessor implements StAXArtifactProcessor<CorbaBinding if (uri != null) { binding.setURI(uri); } + // Read CORBA id + String id = reader.getAttributeValue(null, "id"); + if (id != null) { + binding.setId(id); + } return binding; } @@ -105,6 +110,10 @@ public class CorbaBindingProcessor implements StAXArtifactProcessor<CorbaBinding if (model.getPort() != -1) { writer.writeAttribute("port", String.valueOf(model.getPort())); } + + if (model.getId() != null) { + writer.writeAttribute("id", model.getId()); + } writer.writeEndElement(); } |