public enum MethodConvention extends java.lang.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 | Field and Description |
---|---|
static java.lang.String |
ID_PATH
Path for the id.
|
Modifier and Type | Method and Description |
---|---|
static java.util.Optional<MethodConvention> |
forMethod(java.lang.String name)
Obtain the method convention for the given method.
|
java.lang.String |
httpMethod() |
java.lang.String |
methodName() |
java.lang.String |
uri() |
static MethodConvention |
valueOf(java.lang.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 java.lang.String ID_PATH
public static MethodConvention[] values()
for (MethodConvention c : MethodConvention.values()) System.out.println(c);
public static MethodConvention valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String uri()
public java.lang.String httpMethod()
public java.lang.String methodName()
public static java.util.Optional<MethodConvention> forMethod(java.lang.String name)
name
- The method name