Enum Class ResourcePathDeclaration.ComponentType

java.lang.Object
java.lang.Enum<ResourcePathDeclaration.ComponentType>
com.soklet.core.ResourcePathDeclaration.ComponentType
All Implemented Interfaces:
Serializable, Comparable<ResourcePathDeclaration.ComponentType>, Constable
Enclosing class:
ResourcePathDeclaration

How to interpret a ResourcePathDeclaration.Component of a ResourcePathDeclaration - is it literal text or a placeholder?

For example, given the path declaration /languages/{languageId}:

  • ComponentType at index 0 would be LITERAL
  • ComponentType at index 1 would be PLACEHOLDER

Note: this type is not normally used by Soklet applications unless they choose to implement a custom ResourceMethodResolver.

Author:
Mark Allen
See Also:
  • Enum Constant Details

    • LITERAL

      A literal component of a resource path declaration.

      For example, given resource path declaration /users/{userId}, the users component would be of type LITERAL.

    • PLACEHOLDER

      A placeholder component (that is, one whose value is provided at runtime) of a resource path declaration.

      For example, given resource path declaration /users/{userId}, the userId component would be of type PLACEHOLDER.

  • 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 name
      NullPointerException - if the argument is null