diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-10-12 15:16:07 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-10-12 15:16:07 +0000 |
commit | 1765edfcd534f3c08534924477a62fb0e250284f (patch) | |
tree | 93341e44214ffce44acb64a68c1697ba498e4c2b /sca-java-2.x/trunk/modules/implementation-java | |
parent | 91fabe9b130cfeb15efc7e804c2a152e4757579e (diff) |
TUSCANY-3960 - Create implementation level operation model and add jsr250 module into build
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1182420 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-java')
-rw-r--r-- | sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/PolicyProcessor.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/PolicyProcessor.java b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/PolicyProcessor.java index 15d31a5ad9..1c7ae6d0d7 100644 --- a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/PolicyProcessor.java +++ b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/PolicyProcessor.java @@ -33,6 +33,7 @@ import javax.xml.namespace.QName; import org.apache.tuscany.sca.assembly.AssemblyFactory; import org.apache.tuscany.sca.assembly.Reference; +import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.implementation.java.IntrospectionException; @@ -40,7 +41,10 @@ import org.apache.tuscany.sca.implementation.java.JavaElementImpl; import org.apache.tuscany.sca.implementation.java.JavaImplementation; import org.apache.tuscany.sca.implementation.java.JavaParameterImpl; import org.apache.tuscany.sca.implementation.java.introspect.BaseJavaClassVisitor; +import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; +import org.apache.tuscany.sca.interfacedef.java.JavaOperation; +import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceUtil; import org.apache.tuscany.sca.policy.Intent; import org.apache.tuscany.sca.policy.PolicyFactory; import org.apache.tuscany.sca.policy.PolicySet; @@ -79,9 +83,8 @@ public class PolicyProcessor extends BaseJavaClassVisitor { // Read intents on the Java implementation class readPolicySetAndIntents((PolicySubject)type, clazz); - /* - // FIXME: [rfeng] We might want to refactor this out // Find the business methods in the implementation class for all services + // this operation collection will have policy added to it relating to JSR250 annotations Set<Method> methods = new HashSet<Method>(); for (Service service : type.getServices()) { for (Operation op : service.getInterfaceContract().getInterface().getOperations()) { @@ -100,7 +103,9 @@ public class PolicyProcessor extends BaseJavaClassVisitor { JavaOperation op = javaInterfaceFactory.createJavaOperation(method); type.getOperations().add(op); } - + + /* In OASIS we don't generally read policy attached to arbitrary methods + * unless they relate to references // Read the operation-level policy settings for the implementation for (Operation op : type.getOperations()) { JavaOperation operation = (JavaOperation)op; @@ -122,7 +127,6 @@ public class PolicyProcessor extends BaseJavaClassVisitor { Reference reference = referenceMap.get(e.getKey()); readPolicySetAndIntents(reference, e.getValue().getAnchor()); } - } private void readPolicySetAndIntents(PolicySubject subject, AnnotatedElement element) { |