This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch http-interceptor in repository https://gitbox.apache.org/repos/asf/struts.git
commit e6f4cc5dafa82fa5e19338e0daaa9b4b6aa1b9e0 Author: Lukasz Lenart <[email protected]> AuthorDate: Sun Apr 20 22:13:58 2014 +0200 Updates JavaDocs in annotations --- .../org/apache/struts2/interceptor/httpmethod/AllowedMethod.java | 6 ++++++ .../java/org/apache/struts2/interceptor/httpmethod/GetOnly.java | 6 ++++++ .../java/org/apache/struts2/interceptor/httpmethod/GetPostOnly.java | 6 ++++++ .../java/org/apache/struts2/interceptor/httpmethod/HttpMethod.java | 6 ++++++ .../org/apache/struts2/interceptor/httpmethod/HttpMethodAware.java | 1 + .../java/org/apache/struts2/interceptor/httpmethod/PostOnly.java | 6 ++++++ 6 files changed, 31 insertions(+) diff --git a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/AllowedMethod.java b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/AllowedMethod.java index 05d3795f9..435e60e9a 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/AllowedMethod.java +++ b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/AllowedMethod.java @@ -5,6 +5,12 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +/** + * Use this annotation to limit with what http method action or action's method can be called + * + * @see HttpMethodInterceptor + * @since 2.3.18 + */ @Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface AllowedMethod { diff --git a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/GetOnly.java b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/GetOnly.java index 2c782bd5c..6cf2dc6d4 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/GetOnly.java +++ b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/GetOnly.java @@ -5,6 +5,12 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +/** + * Use this annotation to allow call action or action's method via GET request only + * + * @see HttpMethodInterceptor + * @since 2.3.18 + */ @Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface GetOnly { diff --git a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/GetPostOnly.java b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/GetPostOnly.java index 9f8df0230..0668784b5 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/GetPostOnly.java +++ b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/GetPostOnly.java @@ -5,6 +5,12 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +/** + * Use this annotation to allow call action or action's method via GET or POST request only + * + * @see HttpMethodInterceptor + * @since 2.3.18 + */ @Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface GetPostOnly { diff --git a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethod.java b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethod.java index 30f4ea3d6..e1437f4bd 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethod.java +++ b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethod.java @@ -1,5 +1,11 @@ package org.apache.struts2.interceptor.httpmethod; +/** + * Enum represents possible http request types + * + * @see HttpMethodInterceptor + * @since 2.3.18 + */ public enum HttpMethod { GET, diff --git a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethodAware.java b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethodAware.java index cfdc7826c..d6561f7ac 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethodAware.java +++ b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethodAware.java @@ -7,6 +7,7 @@ package org.apache.struts2.interceptor.httpmethod; * Another function of this interface is to return result which should be returned when action * was called with wrong http method * + * @see HttpMethodInterceptor * @since 2.3.18 */ public interface HttpMethodAware { diff --git a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/PostOnly.java b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/PostOnly.java index 1163188f1..0f3bcd537 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/PostOnly.java +++ b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/PostOnly.java @@ -5,6 +5,12 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +/** + * Use this annotation to allow call action or action's method via POST request only + * + * @see HttpMethodInterceptor + * @since 2.3.18 + */ @Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface PostOnly {
