Enum Class MethodConvention
- All Implemented Interfaces:
Serializable
,Comparable<MethodConvention>
,Constable
Represents the built in conventions for mapping a method name to an HTTP Method and URI.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe default delete method of controllers.The default head method of controllers.The index method of controllers.The default options method of controllers.The show method of controllers.The show method of controllers.The default trace method of controllers.The default update method of controllers. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<MethodConvention>
Obtain the method convention for the given method.uri()
static MethodConvention
Returns the enum constant of this class with the specified name.static MethodConvention[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INDEX
The index method of controllers. -
SHOW
The show method of controllers. -
SAVE
The show method of controllers. -
UPDATE
The default update method of controllers. -
DELETE
The default delete method of controllers. -
OPTIONS
The default options method of controllers. -
HEAD
The default head method of controllers. -
TRACE
The default trace method of controllers.
-
-
Field Details
-
ID_PATH
Path for the id.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
uri
- Returns:
- The default URI to map to if non is specified
-
httpMethod
- Returns:
- The HTTP method name for this convention.
-
methodName
- Returns:
- The method name for this convention
-
forMethod
Obtain the method convention for the given method.- Parameters:
name
- The method name- Returns:
- An optional of the method convention
-