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 Summary

    Enum Constants
    Enum Constant
    Description
    The DELETE method requests that the target resource deletes its state.
    The GET method requests that the target resource transfers a representation of its state.
    The HEAD method 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.
    The OPTIONS method requests that the target resource transfers the HTTP methods that it supports.
    The PATCH method requests that the target resource modifies its state according to the partial update defined in the representation enclosed in the request.
    The POST method requests that the target resource processes the representation enclosed in the request according to the semantics of the target resource.
    The PUT method requests that the target resource creates or updates its state with the state defined by the representation enclosed in the request.
    The TRACE method requests that the target resource transfers the received request in the response body.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static boolean
     
    static boolean
     
    boolean
     
    static EHttpVerb
    ofName(String verb)
     
    static EHttpVerb
     
    static EHttpVerb
    Returns the enum constant of this type with the specified name.
    static EHttpVerb[]
    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 Details

    • DELETE

      public static final EHttpVerb DELETE
      The DELETE method requests that the target resource deletes its state.
    • GET

      public static final EHttpVerb GET
      The GET method requests that the target resource transfers a representation of its state. GET requests should only retrieve data and should have no other effect.
    • OPTIONS

      public static final EHttpVerb OPTIONS
      The OPTIONS method 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.
    • PATCH

      public static final EHttpVerb PATCH
      The PATCH method requests that the target resource modifies its state according to the partial update defined in the representation enclosed in the request.
    • POST

      public static final EHttpVerb POST
      The POST method requests that the target resource processes the representation enclosed in the request according to the semantics of the target resource.
    • PUT

      public static final EHttpVerb PUT
      The PUT method requests that the target resource creates or updates its state with the state defined by the representation enclosed in the request.
    • TRACE

      public static final EHttpVerb TRACE
      The TRACE method 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 Details

    • values

      public static EHttpVerb[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public 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
    • getMethodName

      public String getMethodName()
      Returns:
      The method name of this HTTP verb, as it should be used in the request line of an HTTP request.
    • isSupportsMessageBody

      public boolean isSupportsMessageBody()
      Returns:
      Whether this HTTP method supports sending content via an HTTP message body.
    • isNonStandard

      public static boolean isNonStandard(String verb)
      Parameters:
      verb - The name of an HTTP verb. This is case insensitive.
      Returns:
      true is the verb is not one of the pre-defined EHttpVerbs, false otherwise.
    • isStandard

      public static boolean isStandard(String verb)
      Parameters:
      verb - The name of an HTTP verb. This is case insensitive.
      Returns:
      true is the verb is one of the pre-defined EHttpVerbs, false otherwise.
    • 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.
    • ofNameOrNull

      @Nullable public static EHttpVerb ofNameOrNull(String verb)
      Parameters:
      verb - The name of an HTTP verb. This is case insensitive.
      Returns:
      The enum constant corresponding to the given name. null if either the given verb is null, or when the given verb is not a valid EHttpVerb.