summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/sca/modules/binding-jsonrpc/pom.xml6
-rw-r--r--java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java48
2 files changed, 51 insertions, 3 deletions
diff --git a/java/sca/modules/binding-jsonrpc/pom.xml b/java/sca/modules/binding-jsonrpc/pom.xml
index f479b2e07c..50b68f06ca 100644
--- a/java/sca/modules/binding-jsonrpc/pom.xml
+++ b/java/sca/modules/binding-jsonrpc/pom.xml
@@ -38,6 +38,12 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-policy</artifactId>
+ <version>1.4-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-interface-java</artifactId>
<version>1.4-SNAPSHOT</version>
</dependency>
diff --git a/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java b/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java
index 4160213e8c..754fc71bd2 100644
--- a/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java
+++ b/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java
@@ -19,16 +19,29 @@
package org.apache.tuscany.sca.binding.jsonrpc;
+import java.util.ArrayList;
+import java.util.List;
+
import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.policy.Intent;
+import org.apache.tuscany.sca.policy.IntentAttachPointType;
+import org.apache.tuscany.sca.policy.PolicySet;
+import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
/**
* A model for the JSONRPC binding.
*
* @version $Rev$ $Date$
*/
-public class JSONRPCBinding implements Binding {
+public class JSONRPCBinding implements Binding, PolicySetAttachPoint {
private String name;
private String uri;
+
+
+ private List<Intent> requiredIntents = new ArrayList<Intent>();
+ private List<PolicySet> policySets = new ArrayList<PolicySet>();
+ private IntentAttachPointType intentAttachPointType;
+ private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>();
public String getName() {
return name;
@@ -54,10 +67,39 @@ public class JSONRPCBinding implements Binding {
public void setUnresolved(boolean unresolved) {
// The binding is always resolved
}
+
+ //Policy related getters/setters
+
+ public List<PolicySet> getPolicySets() {
+ return policySets;
+ }
+
+ public List<Intent> getRequiredIntents() {
+ return requiredIntents;
+ }
+
+ public IntentAttachPointType getType() {
+ return intentAttachPointType;
+ }
+
+ public void setType(IntentAttachPointType intentAttachPointType) {
+ this.intentAttachPointType = intentAttachPointType;
+ }
+
+ public void setPolicySets(List<PolicySet> policySets) {
+ this.policySets = policySets;
+ }
+ public void setRequiredIntents(List<Intent> intents) {
+ this.requiredIntents = intents;
+ }
+
+ public List<PolicySet> getApplicablePolicySets() {
+ return applicablePolicySets;
+ }
+
@Override
public Object clone() throws CloneNotSupportedException {
- // TODO Auto-generated method stub
return super.clone();
- }
+ }
}