public class HttpMethodValidationInterceptor
extends com.atlassian.xwork.interceptors.RestrictHttpMethodInterceptor
@HttpMethodRequired(HttpMethod.POST) public String doExecute() { // Do something return Action.SUCCESS; }
If the Http method of the request doesn't match the method (or methods) listed in the annotation value,
the interceptor will not invoke the action method. It will instead return RestrictHttpMethodInterceptor.INVALID_METHOD_RESULT
.
Constructor and Description |
---|
HttpMethodValidationInterceptor() |
Modifier and Type | Method and Description |
---|---|
protected com.atlassian.xwork.HttpMethod[] |
getPermittedHttpMethods(com.opensymphony.xwork.ActionInvocation invocation,
Method invocationMethod) |
protected com.atlassian.xwork.interceptors.RestrictHttpMethodInterceptor.SecurityLevel |
getSecurityLevel() |
protected com.atlassian.xwork.HttpMethod[] getPermittedHttpMethods(com.opensymphony.xwork.ActionInvocation invocation, Method invocationMethod)
getPermittedHttpMethods
in class com.atlassian.xwork.interceptors.RestrictHttpMethodInterceptor
protected com.atlassian.xwork.interceptors.RestrictHttpMethodInterceptor.SecurityLevel getSecurityLevel()
getSecurityLevel
in class com.atlassian.xwork.interceptors.RestrictHttpMethodInterceptor
Copyright © 2003–2020 Atlassian. All rights reserved.