summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/testing
diff options
context:
space:
mode:
Diffstat (limited to '')
-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
2 files changed, 11 insertions, 4 deletions
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;
}