summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-07 20:57:13 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-07 20:57:13 +0000
commit591396b73d31e3b2fececffd38faa097cebe8ecd (patch)
tree0c5e628eb07e61f30b34cf9dd219bc8441b2b84e /java/sca
parent7c9fd36d980e08d012f68cc538f960af0af4b654 (diff)
Add some comments
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@822910 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java
index 5a2abf5f92..b76bb20b99 100644
--- a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java
+++ b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java
@@ -77,6 +77,7 @@ public class CompositePolicyBuilderImpl extends BaseBuilderImpl implements Compo
for (Object model : models) {
if (model instanceof PolicySubject) {
PolicySubject subject = (PolicySubject)model;
+ // FIXME: We should ignore the mutually exclusive intents from different levels
policySubject.getRequiredIntents().addAll(subject.getRequiredIntents());
policySubject.getPolicySets().addAll(subject.getPolicySets());
}
@@ -300,9 +301,11 @@ public class CompositePolicyBuilderImpl extends BaseBuilderImpl implements Compo
}
for (Component component : composite.getComponents()) {
+ // Check component against implementation
checkMutualExclusion(component, component.getImplementation(), monitor);
for (ComponentService componentService : component.getServices()) {
+ // Check component/service against componentType/service
checkMutualExclusion(componentService, componentService.getService(), monitor);
if (componentService.getInterfaceContract() != null && componentService.getService() != null) {
@@ -349,6 +352,7 @@ public class CompositePolicyBuilderImpl extends BaseBuilderImpl implements Compo
}
for (ComponentReference componentReference : component.getReferences()) {
+ // Check component/reference against componentType/reference
checkMutualExclusion(componentReference, componentReference.getReference(), monitor);
if (componentReference.getInterfaceContract() != null && componentReference.getReference() != null) {
@@ -397,6 +401,9 @@ public class CompositePolicyBuilderImpl extends BaseBuilderImpl implements Compo
}
Implementation implementation = component.getImplementation();
+ if (implementation != null) {
+ inherit(implementation, component, composite);
+ }
// How to deal with implementation level policySets/intents
}
}