diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly/src/main/java/org')
2 files changed, 26 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Callback.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Callback.java index d34ec7d01f..a220f14159 100644 --- a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Callback.java +++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Callback.java @@ -35,5 +35,19 @@ public interface Callback extends Base, Extensible, PolicySubject { * @return the bindings supported for callbacks */ List<Binding> getBindings(); + + /** + * Returns the contract that holds this callback + * + * @return the contract that holds this callback + */ + Contract getParentContract(); + + /** + * Sets the contract that holds this callback + * + * @param contract the contract that holds this callback + */ + void setParentContract(Contract contract); } diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java index dcd6c7b08a..35f512bcbf 100644 --- a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java +++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java @@ -24,6 +24,7 @@ import java.util.List; import org.apache.tuscany.sca.assembly.Binding; import org.apache.tuscany.sca.assembly.Callback; +import org.apache.tuscany.sca.assembly.Contract; import org.apache.tuscany.sca.policy.ExtensionType; import org.apache.tuscany.sca.policy.Intent; import org.apache.tuscany.sca.policy.PolicySet; @@ -37,6 +38,7 @@ public class CallbackImpl extends ExtensibleImpl implements Callback { private List<Binding> bindings = new ArrayList<Binding>(); private List<Intent> requiredIntents = new ArrayList<Intent>(); private List<PolicySet> policySets = new ArrayList<PolicySet>(); + private Contract parentContract; public List<PolicySet> getPolicySets() { return policySets; @@ -63,5 +65,15 @@ public class CallbackImpl extends ExtensibleImpl implements Callback { public void setRequiredIntents(List<Intent> intents) { this.requiredIntents = intents; } + + @Override + public Contract getParentContract() { + return parentContract; + } + + @Override + public void setParentContract(Contract contract) { + this.parentContract = contract; + } } |