Enum JsonApiConfiguration.AffordanceType
- java.lang.Object
-
- java.lang.Enum<JsonApiConfiguration.AffordanceType>
-
- com.toedter.spring.hateoas.jsonapi.JsonApiConfiguration.AffordanceType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<JsonApiConfiguration.AffordanceType>
- Enclosing class:
- JsonApiConfiguration
public static enum JsonApiConfiguration.AffordanceType extends java.lang.Enum<JsonApiConfiguration.AffordanceType>
The list of possible affordance types. Those affordance types are used byJsonApiConfiguration.withAffordancesRenderedAsLinkMeta(com.toedter.spring.hateoas.jsonapi.JsonApiConfiguration.AffordanceType)
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HAL_FORMS
Affordances will be rendered as link meta (HAL-FORMS format).NONE
Default, affordances will NOT be rendered as link meta.SPRING_HATEOAS
Affordances will be rendered as link meta (proprietary format).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JsonApiConfiguration.AffordanceType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static JsonApiConfiguration.AffordanceType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final JsonApiConfiguration.AffordanceType NONE
Default, affordances will NOT be rendered as link meta.
-
SPRING_HATEOAS
public static final JsonApiConfiguration.AffordanceType SPRING_HATEOAS
Affordances will be rendered as link meta (proprietary format). The format is close to the internal Spring HATEOAS internal model.
-
HAL_FORMS
public static final JsonApiConfiguration.AffordanceType HAL_FORMS
Affordances will be rendered as link meta (HAL-FORMS format). See https://rwcbook.github.io/hal-forms/#templates-element.
-
-
Method Detail
-
values
public static JsonApiConfiguration.AffordanceType[] 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 (JsonApiConfiguration.AffordanceType c : JsonApiConfiguration.AffordanceType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JsonApiConfiguration.AffordanceType valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-