summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-03-04 23:27:14 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-03-04 23:27:14 +0000
commit099a783bef62a0b6084aad524011d8e26bad9b75 (patch)
tree2c0c948b8cfb1d6e2ae6db00acf8f54b641bab7c /java/sca
parent2520f4eef66b4ee43c114c630fc113896ec8745d (diff)
Minor cleanup to binding-sca and updates to use OASIS namespace
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@750226 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/DistributedSCABinding.java9
-rw-r--r--java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/DistributedSCABindingImpl.java50
-rw-r--r--java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/SCABindingImpl.java64
-rw-r--r--java/sca/modules/binding-sca/src/main/resources/org/apache/tuscany/sca/binding/sca/definitions.xml2
-rw-r--r--java/sca/modules/binding-sca/src/test/resources/Calculator.composite2
5 files changed, 19 insertions, 108 deletions
diff --git a/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/DistributedSCABinding.java b/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/DistributedSCABinding.java
index 167c93e86d..e4c7b495f2 100644
--- a/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/DistributedSCABinding.java
+++ b/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/DistributedSCABinding.java
@@ -31,7 +31,16 @@ import org.apache.tuscany.sca.assembly.SCABinding;
*/
public interface DistributedSCABinding extends Binding {
+ /**
+ * Return the wrapped SCA binding
+ * @return the SCA binding model element
+ */
SCABinding getSCABinding();
+
+ /**
+ * Set the wrapped SCA binding
+ * @param scaBinding the SCA binding model element
+ */
void setSCABinding(SCABinding scaBinding);
}
diff --git a/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/DistributedSCABindingImpl.java b/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/DistributedSCABindingImpl.java
index 43b0cd8f4e..06c244e11a 100644
--- a/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/DistributedSCABindingImpl.java
+++ b/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/DistributedSCABindingImpl.java
@@ -32,85 +32,39 @@ public class DistributedSCABindingImpl implements DistributedSCABinding {
private SCABinding scaBinding;
- /**
- * Getter for the wrapped sca binding model object
- *
- * @return the sca binding model element
- */
public SCABinding getSCABinding(){
return scaBinding;
}
- /**
- * Setter for the wrapped sca binding model element
- *
- * @param scaBinding the sca binding model element
- */
public void setSCABinding(SCABinding scaBinding){
this.scaBinding = scaBinding;
}
-
-
- // Operation implementations provided to make this class a
- // valid Binding
- /**
- * Returns the binding URI.
- *
- * @return the binding URI
- */
public String getURI(){
return null;
}
- /**
- * Sets the binding URI.
- *
- * @param uri the binding URI
- */
public void setURI(String uri){
}
- /**
- * Returns the binding name.
- *
- * @return the binding name
- */
public String getName(){
return null;
}
- /**
- * Sets the binding name.
- *
- * @param name the binding name
- */
public void setName(String name){
+
}
- /**
- * Returns true if the model element is unresolved.
- *
- * @return true if the model element is unresolved.
- */
public boolean isUnresolved(){
return false;
}
- /**
- * Sets whether the model element is unresolved.
- *
- * @param unresolved whether the model element is unresolved
- */
public void setUnresolved(boolean unresolved){
+
}
- /**
- * Clone the binding
- */
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
-
}
diff --git a/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/SCABindingImpl.java b/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/SCABindingImpl.java
index ec49035c78..336a0985ed 100644
--- a/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/SCABindingImpl.java
+++ b/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/SCABindingImpl.java
@@ -65,24 +65,10 @@ public class SCABindingImpl implements SCABinding, Extensible, PolicySubject, Op
protected SCABindingImpl() {
}
- // SCA Binding operations
-
- /**
- * Setters for the binding name. Defaults to the
- * name of the service or reference with which the binding is
- * associated
- *
- * @return the binding name
- */
public String getName() {
return name;
}
- /**
- * Setter for the binding name
- *
- * @param name the binding name
- */
public void setName(String name) {
this.name = name;
}
@@ -99,11 +85,6 @@ public class SCABindingImpl implements SCABinding, Extensible, PolicySubject, Op
return uri;
}
- /**
- * Setter for the binding URI
- *
- * @param uri the binding URI
- */
public void setURI(String uri) {
this.uri = uri;
}
@@ -116,12 +97,6 @@ public class SCABindingImpl implements SCABinding, Extensible, PolicySubject, Op
return attributeExtensions;
}
-
- /**
- * Returns true if the model element is unresolved.
- *
- * @return true if the model element is unresolved.
- */
public boolean isUnresolved() {
if (targetComponentService == null){
return true;
@@ -129,23 +104,10 @@ public class SCABindingImpl implements SCABinding, Extensible, PolicySubject, Op
return targetComponentService.isUnresolved();
}
}
-
- /**
- * Sets whether the model element is unresolved.
- *
- * @param unresolved whether the model element is unresolved
- */
+
public void setUnresolved(boolean unresolved) {
}
- /**
- * @see java.lang.Object#clone()
- */
- @Override
- public Object clone() throws CloneNotSupportedException {
- return super.clone();
- }
-
public List<PolicySet> getPolicySets() {
return policySets;
}
@@ -164,44 +126,26 @@ public class SCABindingImpl implements SCABinding, Extensible, PolicySubject, Op
// Wireable binding operations
- /**
- * @return the targetComponent
- */
public Component getTargetComponent() {
return targetComponent;
}
- /**
- * @param targetComponent the targetComponent to set
- */
public void setTargetComponent(Component targetComponent) {
this.targetComponent = targetComponent;
}
- /**
- * @return the targetComponentService
- */
public ComponentService getTargetComponentService() {
return targetComponentService;
}
- /**
- * @param targetComponentService the targetComponentService to set
- */
public void setTargetComponentService(ComponentService targetComponentService) {
this.targetComponentService = targetComponentService;
}
- /**
- * @return the targetBinding
- */
public Binding getTargetBinding() {
return targetBinding;
}
- /**
- * @param targetBinding the targetBinding to set
- */
public void setTargetBinding(Binding targetBinding) {
this.targetBinding = targetBinding;
}
@@ -213,7 +157,6 @@ public class SCABindingImpl implements SCABinding, Extensible, PolicySubject, Op
public void setRequiredIntents(List<Intent> intents) {
this.requiredIntents = intents;
}
-
public void setIsAutomatic(boolean isAutomatic){
this.isAutomatic = isAutomatic;
@@ -222,4 +165,9 @@ public class SCABindingImpl implements SCABinding, Extensible, PolicySubject, Op
public boolean getIsAutomatic(){
return this.isAutomatic;
}
+
+ @Override
+ public Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
}
diff --git a/java/sca/modules/binding-sca/src/main/resources/org/apache/tuscany/sca/binding/sca/definitions.xml b/java/sca/modules/binding-sca/src/main/resources/org/apache/tuscany/sca/binding/sca/definitions.xml
index f3c5cd0aa1..5578f597e8 100644
--- a/java/sca/modules/binding-sca/src/main/resources/org/apache/tuscany/sca/binding/sca/definitions.xml
+++ b/java/sca/modules/binding-sca/src/main/resources/org/apache/tuscany/sca/binding/sca/definitions.xml
@@ -20,7 +20,7 @@
<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712"
targetNamespace="http://docs.oasis-open.org/ns/opencsa/sca/200712"
xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200712"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
<sca:bindingType type="sca:binding.sca" mayProvide="" alwaysProvides=""/>
</sca:definitions> \ No newline at end of file
diff --git a/java/sca/modules/binding-sca/src/test/resources/Calculator.composite b/java/sca/modules/binding-sca/src/test/resources/Calculator.composite
index 37b26f3d68..aea7e62afc 100644
--- a/java/sca/modules/binding-sca/src/test/resources/Calculator.composite
+++ b/java/sca/modules/binding-sca/src/test/resources/Calculator.composite
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
-->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712"
xmlns:calc="http://calc"
targetNamespace="http://calc"
name="Calculator">