diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-30 05:44:04 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-30 05:44:04 +0000 |
commit | dcfff6e9e1292b702675ad52611e0c9148ab4a07 (patch) | |
tree | a4ec438b09db0df0e566bc96fc94ed1effe61ea5 /java | |
parent | 0b4c765d64d05105d1df0a2e8ad9245c0e56db68 (diff) |
Extending JSON-RPC model to support PolicySetAttachPoint interface
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@700345 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | java/sca/modules/binding-jsonrpc/pom.xml | 6 | ||||
-rw-r--r-- | java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java | 48 |
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(); - } + } } |