diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-09 18:26:35 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-09 18:26:35 +0000 |
commit | d7c580b31dc33e14f4a06bec256611a6b72a9e48 (patch) | |
tree | 4bf5b71df317a971dc3185e1685b6f256be504a4 /java/sca/modules/core-spi/src/main | |
parent | 20aaa2dfe837ec9ee2800d9a8e06a5ffc65e77f5 (diff) |
Add the jdk logging into the itest-policies
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@792626 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/core-spi/src/main')
-rw-r--r-- | java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/BasePolicyProvider.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/BasePolicyProvider.java b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/BasePolicyProvider.java index fe58c65a1c..37192104e8 100644 --- a/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/BasePolicyProvider.java +++ b/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/BasePolicyProvider.java @@ -29,6 +29,7 @@ import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.invocation.InvocationChain;
import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.policy.PolicyExpression;
import org.apache.tuscany.sca.policy.PolicySet;
import org.apache.tuscany.sca.policy.PolicySubject;
import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
@@ -55,6 +56,13 @@ public abstract class BasePolicyProvider<T> implements PolicyProvider { if (policyType.isInstance(p)) {
policies.add(policyType.cast(p));
}
+ if (p instanceof PolicyExpression) {
+ PolicyExpression exp = (PolicyExpression)p;
+ if (policyType.isInstance(exp.getPolicy())) {
+ policies.add(policyType.cast(exp.getPolicy()));
+ }
+ }
+
}
}
return policies;
@@ -68,6 +76,12 @@ public abstract class BasePolicyProvider<T> implements PolicyProvider { if (policyType.isInstance(p)) {
policies.add(ps);
}
+ if (p instanceof PolicyExpression) {
+ PolicyExpression exp = (PolicyExpression)p;
+ if (policyType.isInstance(exp.getPolicy())) {
+ policies.add(ps);
+ }
+ }
}
}
return policies;
@@ -80,6 +94,12 @@ public abstract class BasePolicyProvider<T> implements PolicyProvider { if (policyType.isInstance(p)) {
return ps;
}
+ if (p instanceof PolicyExpression) {
+ PolicyExpression exp = (PolicyExpression)p;
+ if (policyType.isInstance(exp.getPolicy())) {
+ return ps;
+ }
+ }
}
}
return null;
|