From: remm Date: Thu, 6 Apr 2006 14:09:45 +0000 (+0000) Subject: - Add common annotations interfaces. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=3dc941020b20ca29a73d3b49c5556afa47d93299;p=tomcat7.0 - Add common annotations interfaces. - 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 --- diff --git a/java/javax/annotation/Generated.java b/java/javax/annotation/Generated.java new file mode 100644 index 000000000..2ea72197a --- /dev/null +++ b/java/javax/annotation/Generated.java @@ -0,0 +1,40 @@ +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package javax.annotation; + +import static java.lang.annotation.ElementType.ANNOTATION_TYPE; +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.LOCAL_VARIABLE; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PACKAGE; +import static java.lang.annotation.ElementType.PARAMETER; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.SOURCE; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +@Target({ANNOTATION_TYPE, CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, PARAMETER, TYPE}) +@Retention(SOURCE) + +public @interface Generated { + public String[] value(); + public String date() default ""; + public String comment() default ""; +} diff --git a/java/javax/annotation/PostConstruct.java b/java/javax/annotation/PostConstruct.java new file mode 100644 index 000000000..5e1173c66 --- /dev/null +++ b/java/javax/annotation/PostConstruct.java @@ -0,0 +1,29 @@ +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package javax.annotation; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +@Target({METHOD}) +@Retention(RUNTIME) +public @interface PostConstruct { +} diff --git a/java/javax/annotation/PreDestroy.java b/java/javax/annotation/PreDestroy.java new file mode 100644 index 000000000..6237c66e3 --- /dev/null +++ b/java/javax/annotation/PreDestroy.java @@ -0,0 +1,29 @@ +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package javax.annotation; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +@Target({METHOD}) +@Retention(RUNTIME) +public @interface PreDestroy { +} diff --git a/java/javax/annotation/Resource.java b/java/javax/annotation/Resource.java new file mode 100644 index 000000000..71df4ffd1 --- /dev/null +++ b/java/javax/annotation/Resource.java @@ -0,0 +1,40 @@ +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package javax.annotation; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +@Target({TYPE, METHOD, FIELD}) +@Retention(RUNTIME) +public @interface Resource { + public enum AuthenticationType { + CONTAINER, + APPLICATION + } + public String name() default ""; + public Class type() default Object.class; + public AuthenticationType authenticationType() default AuthenticationType.CONTAINER; + public boolean shareable() default true; + public String description() default ""; +} diff --git a/java/javax/annotation/Resources.java b/java/javax/annotation/Resources.java new file mode 100644 index 000000000..22525ccb2 --- /dev/null +++ b/java/javax/annotation/Resources.java @@ -0,0 +1,30 @@ +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package javax.annotation; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +@Target({TYPE}) +@Retention(RUNTIME) +public @interface Resources { + public Resource[] value(); +} diff --git a/java/javax/annotation/security/DeclaresRoles.java b/java/javax/annotation/security/DeclaresRoles.java new file mode 100644 index 000000000..97bd7162c --- /dev/null +++ b/java/javax/annotation/security/DeclaresRoles.java @@ -0,0 +1,30 @@ +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package javax.annotation.security; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +@Target({TYPE}) +@Retention(RUNTIME) +public @interface DeclaresRoles { + public String[] value(); +} diff --git a/java/javax/annotation/security/DenyAll.java b/java/javax/annotation/security/DenyAll.java new file mode 100644 index 000000000..265d81743 --- /dev/null +++ b/java/javax/annotation/security/DenyAll.java @@ -0,0 +1,30 @@ +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package javax.annotation.security; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +@Target({TYPE,METHOD}) +@Retention(RUNTIME) +public @interface DenyAll { +} diff --git a/java/javax/annotation/security/PermitAll.java b/java/javax/annotation/security/PermitAll.java new file mode 100644 index 000000000..5aad01316 --- /dev/null +++ b/java/javax/annotation/security/PermitAll.java @@ -0,0 +1,30 @@ +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package javax.annotation.security; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +@Target({TYPE,METHOD}) +@Retention(RUNTIME) +public @interface PermitAll { +} diff --git a/java/javax/annotation/security/RolesAllowed.java b/java/javax/annotation/security/RolesAllowed.java new file mode 100644 index 000000000..6c9a9aa3f --- /dev/null +++ b/java/javax/annotation/security/RolesAllowed.java @@ -0,0 +1,31 @@ +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package javax.annotation.security; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +@Target({TYPE,METHOD}) +@Retention(RUNTIME) +public @interface RolesAllowed { + public String[] value(); +} diff --git a/java/javax/annotation/security/RunAs.java b/java/javax/annotation/security/RunAs.java new file mode 100644 index 000000000..f9ac28c78 --- /dev/null +++ b/java/javax/annotation/security/RunAs.java @@ -0,0 +1,30 @@ +/* + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package javax.annotation.security; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +@Target({TYPE}) +@Retention(RUNTIME) +public @interface RunAs { + public String value(); +}