- Add common annotations interfaces.
authorremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 6 Apr 2006 14:09:45 +0000 (14:09 +0000)
committerremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 6 Apr 2006 14:09:45 +0000 (14:09 +0000)
- The latest docs seem to indicate that it's Declare*s*Roles.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@391990 13f79535-47bb-0310-9956-ffa450edef68

java/javax/annotation/Generated.java [new file with mode: 0644]
java/javax/annotation/PostConstruct.java [new file with mode: 0644]
java/javax/annotation/PreDestroy.java [new file with mode: 0644]
java/javax/annotation/Resource.java [new file with mode: 0644]
java/javax/annotation/Resources.java [new file with mode: 0644]
java/javax/annotation/security/DeclaresRoles.java [new file with mode: 0644]
java/javax/annotation/security/DenyAll.java [new file with mode: 0644]
java/javax/annotation/security/PermitAll.java [new file with mode: 0644]
java/javax/annotation/security/RolesAllowed.java [new file with mode: 0644]
java/javax/annotation/security/RunAs.java [new file with mode: 0644]

diff --git a/java/javax/annotation/Generated.java b/java/javax/annotation/Generated.java
new file mode 100644 (file)
index 0000000..2ea7219
--- /dev/null
@@ -0,0 +1,40 @@
+/*\r
+ * Copyright 2006 The Apache Software Foundation.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+package javax.annotation;\r
+\r
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;\r
+import static java.lang.annotation.ElementType.CONSTRUCTOR;\r
+import static java.lang.annotation.ElementType.FIELD;\r
+import static java.lang.annotation.ElementType.LOCAL_VARIABLE;\r
+import static java.lang.annotation.ElementType.METHOD;\r
+import static java.lang.annotation.ElementType.PACKAGE;\r
+import static java.lang.annotation.ElementType.PARAMETER;\r
+import static java.lang.annotation.ElementType.TYPE;\r
+import static java.lang.annotation.RetentionPolicy.SOURCE;\r
+\r
+import java.lang.annotation.Retention;\r
+import java.lang.annotation.Target;\r
+\r
+@Target({ANNOTATION_TYPE, CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, PARAMETER, TYPE})\r
+@Retention(SOURCE)\r
+\r
+public @interface Generated {\r
+    public String[] value();\r
+    public String date() default "";\r
+    public String comment() default "";\r
+}\r
diff --git a/java/javax/annotation/PostConstruct.java b/java/javax/annotation/PostConstruct.java
new file mode 100644 (file)
index 0000000..5e1173c
--- /dev/null
@@ -0,0 +1,29 @@
+/*\r
+ * Copyright 2006 The Apache Software Foundation.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+package javax.annotation;\r
+\r
+import static java.lang.annotation.ElementType.METHOD;\r
+import static java.lang.annotation.RetentionPolicy.RUNTIME;\r
+\r
+import java.lang.annotation.Retention;\r
+import java.lang.annotation.Target;\r
+\r
+@Target({METHOD})\r
+@Retention(RUNTIME)\r
+public @interface PostConstruct {\r
+}\r
diff --git a/java/javax/annotation/PreDestroy.java b/java/javax/annotation/PreDestroy.java
new file mode 100644 (file)
index 0000000..6237c66
--- /dev/null
@@ -0,0 +1,29 @@
+/*\r
+ * Copyright 2006 The Apache Software Foundation.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+package javax.annotation;\r
+\r
+import static java.lang.annotation.ElementType.METHOD;\r
+import static java.lang.annotation.RetentionPolicy.RUNTIME;\r
+\r
+import java.lang.annotation.Retention;\r
+import java.lang.annotation.Target;\r
+\r
+@Target({METHOD})\r
+@Retention(RUNTIME)\r
+public @interface PreDestroy {\r
+}\r
diff --git a/java/javax/annotation/Resource.java b/java/javax/annotation/Resource.java
new file mode 100644 (file)
index 0000000..71df4ff
--- /dev/null
@@ -0,0 +1,40 @@
+/*\r
+ * Copyright 2006 The Apache Software Foundation.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+package javax.annotation;\r
+\r
+import static java.lang.annotation.ElementType.FIELD;\r
+import static java.lang.annotation.ElementType.METHOD;\r
+import static java.lang.annotation.ElementType.TYPE;\r
+import static java.lang.annotation.RetentionPolicy.RUNTIME;\r
+\r
+import java.lang.annotation.Retention;\r
+import java.lang.annotation.Target;\r
+\r
+@Target({TYPE, METHOD, FIELD})\r
+@Retention(RUNTIME)\r
+public @interface Resource {\r
+    public enum AuthenticationType {\r
+        CONTAINER,\r
+        APPLICATION\r
+    }\r
+    public String name() default "";\r
+    public Class type() default Object.class;\r
+    public AuthenticationType authenticationType() default AuthenticationType.CONTAINER;\r
+    public boolean shareable() default true;\r
+    public String description() default "";\r
+}\r
diff --git a/java/javax/annotation/Resources.java b/java/javax/annotation/Resources.java
new file mode 100644 (file)
index 0000000..22525cc
--- /dev/null
@@ -0,0 +1,30 @@
+/*\r
+ * Copyright 2006 The Apache Software Foundation.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+package javax.annotation;\r
+\r
+import static java.lang.annotation.ElementType.TYPE;\r
+import static java.lang.annotation.RetentionPolicy.RUNTIME;\r
+\r
+import java.lang.annotation.Retention;\r
+import java.lang.annotation.Target;\r
+\r
+@Target({TYPE})\r
+@Retention(RUNTIME)\r
+public @interface Resources {\r
+    public Resource[] value();\r
+}\r
diff --git a/java/javax/annotation/security/DeclaresRoles.java b/java/javax/annotation/security/DeclaresRoles.java
new file mode 100644 (file)
index 0000000..97bd716
--- /dev/null
@@ -0,0 +1,30 @@
+/*\r
+ * Copyright 2006 The Apache Software Foundation.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+package javax.annotation.security;\r
+\r
+import static java.lang.annotation.ElementType.TYPE;\r
+import static java.lang.annotation.RetentionPolicy.RUNTIME;\r
+\r
+import java.lang.annotation.Retention;\r
+import java.lang.annotation.Target;\r
+\r
+@Target({TYPE})\r
+@Retention(RUNTIME)\r
+public @interface DeclaresRoles {\r
+    public String[] value();\r
+}\r
diff --git a/java/javax/annotation/security/DenyAll.java b/java/javax/annotation/security/DenyAll.java
new file mode 100644 (file)
index 0000000..265d817
--- /dev/null
@@ -0,0 +1,30 @@
+/*\r
+ * Copyright 2006 The Apache Software Foundation.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+package javax.annotation.security;\r
+\r
+import static java.lang.annotation.ElementType.METHOD;\r
+import static java.lang.annotation.ElementType.TYPE;\r
+import static java.lang.annotation.RetentionPolicy.RUNTIME;\r
+\r
+import java.lang.annotation.Retention;\r
+import java.lang.annotation.Target;\r
+\r
+@Target({TYPE,METHOD})\r
+@Retention(RUNTIME)\r
+public @interface DenyAll {\r
+}\r
diff --git a/java/javax/annotation/security/PermitAll.java b/java/javax/annotation/security/PermitAll.java
new file mode 100644 (file)
index 0000000..5aad013
--- /dev/null
@@ -0,0 +1,30 @@
+/*\r
+ * Copyright 2006 The Apache Software Foundation.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+package javax.annotation.security;\r
+\r
+import static java.lang.annotation.ElementType.METHOD;\r
+import static java.lang.annotation.ElementType.TYPE;\r
+import static java.lang.annotation.RetentionPolicy.RUNTIME;\r
+\r
+import java.lang.annotation.Retention;\r
+import java.lang.annotation.Target;\r
+\r
+@Target({TYPE,METHOD})\r
+@Retention(RUNTIME)\r
+public @interface PermitAll {\r
+}\r
diff --git a/java/javax/annotation/security/RolesAllowed.java b/java/javax/annotation/security/RolesAllowed.java
new file mode 100644 (file)
index 0000000..6c9a9aa
--- /dev/null
@@ -0,0 +1,31 @@
+/*\r
+ * Copyright 2006 The Apache Software Foundation.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+package javax.annotation.security;\r
+\r
+import static java.lang.annotation.ElementType.METHOD;\r
+import static java.lang.annotation.ElementType.TYPE;\r
+import static java.lang.annotation.RetentionPolicy.RUNTIME;\r
+\r
+import java.lang.annotation.Retention;\r
+import java.lang.annotation.Target;\r
+\r
+@Target({TYPE,METHOD})\r
+@Retention(RUNTIME)\r
+public @interface RolesAllowed {\r
+    public String[] value();\r
+}\r
diff --git a/java/javax/annotation/security/RunAs.java b/java/javax/annotation/security/RunAs.java
new file mode 100644 (file)
index 0000000..f9ac28c
--- /dev/null
@@ -0,0 +1,30 @@
+/*\r
+ * Copyright 2006 The Apache Software Foundation.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+package javax.annotation.security;\r
+\r
+import static java.lang.annotation.ElementType.TYPE;\r
+import static java.lang.annotation.RetentionPolicy.RUNTIME;\r
+\r
+import java.lang.annotation.Retention;\r
+import java.lang.annotation.Target;\r
+\r
+@Target({TYPE})\r
+@Retention(RUNTIME)\r
+public @interface RunAs {\r
+    public String value();\r
+}\r