diff options
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(); } |