summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/sca-api/src
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/modules/sca-api/src')
-rw-r--r--java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Authorization.java30
-rw-r--r--java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/ManagedSharedTransaction.java29
-rw-r--r--java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/ManagedTransaction.java40
-rw-r--r--java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/MutualAuthentication.java30
-rw-r--r--java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/NoManagedTransaction.java29
5 files changed, 158 insertions, 0 deletions
diff --git a/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Authorization.java b/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Authorization.java
new file mode 100644
index 0000000000..76fcd866ae
--- /dev/null
+++ b/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/Authorization.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright(C) OASIS(R) 2005,2009. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ */
+package org.oasisopen.sca.annotation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.oasisopen.sca.Constants.SCA_PREFIX;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * The @Authorization annotation is used to indicate that
+ * an authorization policy is required - for a method, for an implementation class, for a reference
+ * (either injected as a method parameter or injected into a field)
+ */
+@Inherited
+@Target({TYPE, FIELD, METHOD, PARAMETER})
+@Retention(RUNTIME)
+@Intent(Authorization.AUTHORIZATION)
+public @interface Authorization {
+ String AUTHORIZATION = SCA_PREFIX + "authorization";
+}
+
diff --git a/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/ManagedSharedTransaction.java b/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/ManagedSharedTransaction.java
new file mode 100644
index 0000000000..b12050a3e3
--- /dev/null
+++ b/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/ManagedSharedTransaction.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright(C) OASIS(R) 2005,2009. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ */
+package org.oasisopen.sca.annotation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.oasisopen.sca.Constants.SCA_PREFIX;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * The @ManagedSharedTransaction annotation is used to indicate that
+ * a distributed ACID transaction is required.
+ */
+@Inherited
+@Target({TYPE, FIELD, METHOD, PARAMETER})
+@Retention(RUNTIME)
+@Intent(ManagedSharedTransaction.MANAGEDSHAREDTRANSACTION)
+public @interface ManagedSharedTransaction {
+ String MANAGEDSHAREDTRANSACTION = SCA_PREFIX + "managedSharedTransaction";
+}
+
diff --git a/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/ManagedTransaction.java b/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/ManagedTransaction.java
new file mode 100644
index 0000000000..7115e8a5e9
--- /dev/null
+++ b/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/ManagedTransaction.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright(C) OASIS(R) 2005,2009. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ */
+package org.oasisopen.sca.annotation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.oasisopen.sca.Constants.SCA_PREFIX;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * The @ManagedTransaction annotation is used to indicate the
+ * need for an ACID transaction environment.
+ */
+@Inherited
+@Target({TYPE, FIELD, METHOD, PARAMETER})
+@Retention(RUNTIME)
+@Intent(ManagedTransaction.MANAGEDTRANSACTION)
+public @interface ManagedTransaction {
+ String MANAGEDTRANSACTION = SCA_PREFIX + "managedTransaction";
+ String MANAGEDTRANSACTION_MESSAGE = MANAGEDTRANSACTION + ".local";
+ String MANAGEDTRANSACTION_TRANSPORT = MANAGEDTRANSACTION + ".global";
+
+ /**
+ * List of managedTransaction qualifiers (such as "global" or "local").
+ *
+ * @return managedTransaction qualifiers
+ */
+ @Qualifier
+ String[] value() default "";
+}
+
+
diff --git a/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/MutualAuthentication.java b/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/MutualAuthentication.java
new file mode 100644
index 0000000000..d0825cd8e3
--- /dev/null
+++ b/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/MutualAuthentication.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright(C) OASIS(R) 2005,2009. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ */
+package org.oasisopen.sca.annotation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.oasisopen.sca.Constants.SCA_PREFIX;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * The @MutualAuthentication annotation is used to indicate that
+ * a mutual authentication policy is needed.
+ */
+@Inherited
+@Target({TYPE, FIELD, METHOD, PARAMETER})
+@Retention(RUNTIME)
+@Intent(MutualAuthentication.MUTUALAUTHENTICATION)
+public @interface MutualAuthentication {
+ String MUTUALAUTHENTICATION = SCA_PREFIX + "mutualAuthentication";
+}
+
+
diff --git a/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/NoManagedTransaction.java b/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/NoManagedTransaction.java
new file mode 100644
index 0000000000..b5ff494ca2
--- /dev/null
+++ b/java/sca/modules/sca-api/src/main/java/org/oasisopen/sca/annotation/NoManagedTransaction.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright(C) OASIS(R) 2005,2009. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ */
+package org.oasisopen.sca.annotation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.oasisopen.sca.Constants.SCA_PREFIX;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * The @NoManagedTransaction annotation is used to indicate that
+ * a non-transactional environment is needed.
+ */
+@Inherited
+@Target({TYPE, FIELD, METHOD, PARAMETER})
+@Retention(RUNTIME)
+@Intent(NoManagedTransaction.NOMANAGEDTRANSACTION)
+public @interface NoManagedTransaction {
+ String NOMANAGEDTRANSACTION = SCA_PREFIX + "noManagedTransaction";
+}
+