public enum MethodConvention extends Enum<MethodConvention>
Represents the built in conventions for mapping a method name to an HTTP Method and URI.
Enum Constant and Description |
---|
DELETE
The default delete method of controllers.
|
HEAD
The default head method of controllers.
|
INDEX
The index method of controllers.
|
OPTIONS
The default options method of controllers.
|
SAVE
The show method of controllers.
|
SHOW
The show method of controllers.
|
TRACE
The default trace method of controllers.
|
UPDATE
The default update method of controllers.
|
Modifier and Type | Method and Description |
---|---|
static Optional<MethodConvention> |
forMethod(String name)
Obtain the method convention for the given method.
|
String |
httpMethod() |
String |
methodName() |
String |
uri() |
static MethodConvention |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MethodConvention[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MethodConvention INDEX
public static final MethodConvention SHOW
public static final MethodConvention SAVE
public static final MethodConvention UPDATE
public static final MethodConvention DELETE
public static final MethodConvention OPTIONS
public static final MethodConvention HEAD
public static final MethodConvention TRACE
public static final String ID_PATH
public static MethodConvention[] values()
for (MethodConvention c : MethodConvention.values()) System.out.println(c);
public static MethodConvention valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String uri()
public String httpMethod()
public String methodName()
public static Optional<MethodConvention> forMethod(String name)
name
- The method name