Package de.xima.fc.mdl.enums
Enum EHttpVerb
- java.lang.Object
- 
- java.lang.Enum<EHttpVerb>
- 
- de.xima.fc.mdl.enums.EHttpVerb
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<EHttpVerb>
 
 public enum EHttpVerb extends Enum<EHttpVerb> A list of well-known HTTP verbs, mostly those defined by the HTTP/1.0 and HTTP/1.1 standards.- Since:
- 7.0.1
- Author:
- XIMA MEDIA GmbH
 
- 
- 
Enum Constant SummaryEnum Constants Enum Constant Description DELETETheDELETEmethod requests that the target resource deletes its state.GETTheGETmethod requests that the target resource transfers a representation of its state.HEADTheHEADmethod requests that the target resource transfers a representation of its state, like for a GET request, but without the representation data enclosed in the response body.OPTIONSTheOPTIONSmethod requests that the target resource transfers the HTTP methods that it supports.PATCHThePATCHmethod requests that the target resource modifies its state according to the partial update defined in the representation enclosed in the request.POSTThePOSTmethod requests that the target resource processes the representation enclosed in the request according to the semantics of the target resource.PUTThePUTmethod requests that the target resource creates or updates its state with the state defined by the representation enclosed in the request.TRACETheTRACEmethod requests that the target resource transfers the received request in the response body.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMethodName()static booleanisNonStandard(String verb)static booleanisStandard(String verb)booleanisSupportsMessageBody()static EHttpVerbofName(String verb)static EHttpVerbofNameOrNull(String verb)static EHttpVerbvalueOf(String name)Returns the enum constant of this type with the specified name.static EHttpVerb[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
DELETEpublic static final EHttpVerb DELETE TheDELETEmethod requests that the target resource deletes its state.
 - 
GETpublic static final EHttpVerb GET TheGETmethod requests that the target resource transfers a representation of its state. GET requests should only retrieve data and should have no other effect.
 - 
HEADpublic static final EHttpVerb HEAD TheHEADmethod requests that the target resource transfers a representation of its state, like for a GET request, but without the representation data enclosed in the response body. This is useful for retrieving the representation metadata in the response header, without having to transfer the entire representation.
 - 
OPTIONSpublic static final EHttpVerb OPTIONS TheOPTIONSmethod requests that the target resource transfers the HTTP methods that it supports. This can be used to check the functionality of a web server by requesting '*' instead of a specific resource.
 - 
PATCHpublic static final EHttpVerb PATCH ThePATCHmethod requests that the target resource modifies its state according to the partial update defined in the representation enclosed in the request.
 - 
POSTpublic static final EHttpVerb POST ThePOSTmethod requests that the target resource processes the representation enclosed in the request according to the semantics of the target resource.
 - 
PUTpublic static final EHttpVerb PUT ThePUTmethod requests that the target resource creates or updates its state with the state defined by the representation enclosed in the request.
 - 
TRACEpublic static final EHttpVerb TRACE TheTRACEmethod requests that the target resource transfers the received request in the response body. That way a client can see what (if any) changes or additions have been made by intermediaries.
 
- 
 - 
Method Detail- 
valuespublic static EHttpVerb[] 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 (EHttpVerb c : EHttpVerb.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static EHttpVerb 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
 
 - 
getMethodNamepublic String getMethodName() - Returns:
- The method name of this HTTP verb, as it should be used in the request line of an HTTP request.
 
 - 
isSupportsMessageBodypublic boolean isSupportsMessageBody() - Returns:
- Whether this HTTP method supports sending content via an HTTP message body.
 
 - 
isNonStandardpublic static boolean isNonStandard(String verb) - Parameters:
- verb- The name of an HTTP verb. This is case insensitive.
- Returns:
- trueis the verb is not one of the pre-defined- EHttpVerbs,- falseotherwise.
 
 - 
isStandardpublic static boolean isStandard(String verb) - Parameters:
- verb- The name of an HTTP verb. This is case insensitive.
- Returns:
- trueis the verb is one of the pre-defined- EHttpVerbs,- falseotherwise.
 
 - 
ofName@Nonnull public static EHttpVerb ofName(String verb) throws NullPointerException, IllegalArgumentException - Parameters:
- verb- The name of an HTTP verb. This is case insensitive.
- Returns:
- The enum constant corresponding to the given name.
- Throws:
- NullPointerException- When the given verb is null.
- IllegalArgumentException- When the given verb is not a valid- EHttpVerb.
 
 
- 
 
-