com.atlassian.xwork
Enum HttpMethod

java.lang.Object
  extended by java.lang.Enum<HttpMethod>
      extended by com.atlassian.xwork.HttpMethod
All Implemented Interfaces:
Serializable, Comparable<HttpMethod>

public enum HttpMethod
extends Enum<HttpMethod>

Enumeration of the different HTTP methods used by the RestrictHttpMethodInterceptor. Because this enumeration is designed for the use of the interceptor (for example it treats HEAD as a sub-method of GET), it probably isn't useful for more general cases.

Since:
1.6

Enum Constant Summary
ALL_DEFINED
          Matches any method defined in standard HTTP/1.1 or WEBDAV
ALL_RFC2616
          Matches any method defined in standard HTTP/1.1
ANY_METHOD
          Accept anything, even if it's not defined in this enumeration
CONNECT
          RFC2616 CONNECT method
COPY
          RFC2518 COPY method
DELETE
          RFC2616 DELETE method
GET
          RFC2616 GET method.
HEAD
          RFC2616 HEAD method
LOCK
          RFC2518 LOCK method
MKCOL
          RFC2518 MKCOL method
MOVE
          RFC2518 MOVE method
OPTIONS
          RFC2616 OPTIONS method
PATCH
          RFC2518 PATCH method
POST
          RFC2616 POST method
PROPFIND
          RFC2518 PROPFIND method
PROPPATCH
          RFC2518 PROPPATCH method
PUT
          RFC2616 PUT method
TRACE
          RFC2616 TRACE method
UNLOCK
          RFC2518 UNLOCK method
 
Method Summary
 boolean matches(String methodName)
           
static HttpMethod valueOf(String name)
          Returns the enum constant of this type with the specified name.
static HttpMethod[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GET

public static final HttpMethod GET
RFC2616 GET method. Will also match HEAD, as HEAD should be accepted anywhere GET is


POST

public static final HttpMethod POST
RFC2616 POST method


PUT

public static final HttpMethod PUT
RFC2616 PUT method


DELETE

public static final HttpMethod DELETE
RFC2616 DELETE method


HEAD

public static final HttpMethod HEAD
RFC2616 HEAD method


OPTIONS

public static final HttpMethod OPTIONS
RFC2616 OPTIONS method


TRACE

public static final HttpMethod TRACE
RFC2616 TRACE method


CONNECT

public static final HttpMethod CONNECT
RFC2616 CONNECT method


PROPFIND

public static final HttpMethod PROPFIND
RFC2518 PROPFIND method


PROPPATCH

public static final HttpMethod PROPPATCH
RFC2518 PROPPATCH method


MKCOL

public static final HttpMethod MKCOL
RFC2518 MKCOL method


COPY

public static final HttpMethod COPY
RFC2518 COPY method


MOVE

public static final HttpMethod MOVE
RFC2518 MOVE method


LOCK

public static final HttpMethod LOCK
RFC2518 LOCK method


UNLOCK

public static final HttpMethod UNLOCK
RFC2518 UNLOCK method


PATCH

public static final HttpMethod PATCH
RFC2518 PATCH method


ALL_RFC2616

public static final HttpMethod ALL_RFC2616
Matches any method defined in standard HTTP/1.1


ALL_DEFINED

public static final HttpMethod ALL_DEFINED
Matches any method defined in standard HTTP/1.1 or WEBDAV


ANY_METHOD

public static final HttpMethod ANY_METHOD
Accept anything, even if it's not defined in this enumeration

Method Detail

values

public static HttpMethod[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (HttpMethod c : HttpMethod.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static HttpMethod valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

matches

public boolean matches(String methodName)


Copyright © 2011 Atlassian Pty Ltd. All Rights Reserved.