summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-10-17 13:54:43 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-10-17 13:54:43 +0000
commit04ba0404fe327a0932f88e8b803bda3add2786b6 (patch)
treeb8c7461683a8aa2d9da7d583c66e23a8e8000f02 /sca-java-2.x/trunk
parent2bbfb11e7d73a7cdf70d17db36efe00d92126155 (diff)
Correct JSR250 policy processor package name in services definition
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1185171 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/policy-security-jsr250/src/main/java/org/apache/tuscany/sca/policy/security/jsr250/JSR250PolicyProcessor.java7
-rw-r--r--sca-java-2.x/trunk/modules/policy-security-jsr250/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.java.introspect.JavaClassVisitor2
-rw-r--r--sca-java-2.x/trunk/testing/itest/interface-matching/pom.xml6
-rw-r--r--sca-java-2.x/trunk/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponentImpl.java9
4 files changed, 19 insertions, 5 deletions
diff --git a/sca-java-2.x/trunk/modules/policy-security-jsr250/src/main/java/org/apache/tuscany/sca/policy/security/jsr250/JSR250PolicyProcessor.java b/sca-java-2.x/trunk/modules/policy-security-jsr250/src/main/java/org/apache/tuscany/sca/policy/security/jsr250/JSR250PolicyProcessor.java
index ca1fb12f38..fffb366dfa 100644
--- a/sca-java-2.x/trunk/modules/policy-security-jsr250/src/main/java/org/apache/tuscany/sca/policy/security/jsr250/JSR250PolicyProcessor.java
+++ b/sca-java-2.x/trunk/modules/policy-security-jsr250/src/main/java/org/apache/tuscany/sca/policy/security/jsr250/JSR250PolicyProcessor.java
@@ -28,6 +28,8 @@ import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.xml.Constants;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.implementation.java.IntrospectionException;
import org.apache.tuscany.sca.implementation.java.JavaImplementation;
import org.apache.tuscany.sca.implementation.java.introspect.BaseJavaClassVisitor;
@@ -58,6 +60,11 @@ public class JSR250PolicyProcessor extends BaseJavaClassVisitor {
private PolicyFactory policyFactory;
+ public JSR250PolicyProcessor(ExtensionPointRegistry registry) {
+ super(registry.getExtensionPoint(FactoryExtensionPoint.class).getFactory(AssemblyFactory.class));
+ this.policyFactory = registry.getExtensionPoint(FactoryExtensionPoint.class).getFactory(PolicyFactory.class);
+ }
+
public JSR250PolicyProcessor(AssemblyFactory assemblyFactory, PolicyFactory policyFactory) {
super(assemblyFactory);
this.policyFactory = policyFactory;
diff --git a/sca-java-2.x/trunk/modules/policy-security-jsr250/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.java.introspect.JavaClassVisitor b/sca-java-2.x/trunk/modules/policy-security-jsr250/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.java.introspect.JavaClassVisitor
index 841d89fb9a..37bff7cc10 100644
--- a/sca-java-2.x/trunk/modules/policy-security-jsr250/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.java.introspect.JavaClassVisitor
+++ b/sca-java-2.x/trunk/modules/policy-security-jsr250/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.java.introspect.JavaClassVisitor
@@ -17,4 +17,4 @@
#
# NOTE: The ranking attribute is important for the JavaClassVistors
# Some visitors need to be called after the others
-org.apache.tuscany.sca.implementation.java.introspect.impl.JSR250PolicyProcessor;ranking=600 \ No newline at end of file
+org.apache.tuscany.sca.policy.security.jsr250.JSR250PolicyProcessor;ranking=600 \ No newline at end of file
diff --git a/sca-java-2.x/trunk/testing/itest/interface-matching/pom.xml b/sca-java-2.x/trunk/testing/itest/interface-matching/pom.xml
index f49d84a8f1..2d476ac232 100644
--- a/sca-java-2.x/trunk/testing/itest/interface-matching/pom.xml
+++ b/sca-java-2.x/trunk/testing/itest/interface-matching/pom.xml
@@ -70,6 +70,12 @@
</dependency>
<dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-policy-security-jsr250</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>wstx-asl</artifactId>
<version>3.2.9</version>
diff --git a/sca-java-2.x/trunk/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponentImpl.java b/sca-java-2.x/trunk/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponentImpl.java
index cfc53da0d4..aee96e4737 100644
--- a/sca-java-2.x/trunk/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponentImpl.java
+++ b/sca-java-2.x/trunk/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponentImpl.java
@@ -18,10 +18,12 @@
*/
package org.apache.tuscany.sca.itest.interfaces;
+import javax.annotation.security.RolesAllowed;
+
import org.oasisopen.sca.annotation.Callback;
-import org.oasisopen.sca.annotation.Reference;
import org.oasisopen.sca.annotation.Service;
+@RolesAllowed({"Role1"})
@Service(ServiceComponent.class)
public class ServiceComponentImpl implements ServiceComponent {
@@ -30,6 +32,7 @@ public class ServiceComponentImpl implements ServiceComponent {
private static ParameterObject po;
+ @RolesAllowed({"Role2", "Role3"})
public String foo(String str) {
return str;
}
@@ -46,9 +49,7 @@ public class ServiceComponentImpl implements ServiceComponent {
po = new ParameterObject("CallBack");
callback.modifyParameter(po);
}
-
-
-
+
public ParameterObject getPO() {
return po;
}