Interface AffordanceModel.PropertyMetadata

All Superinterfaces:
AffordanceModel.Named
Enclosing class:
AffordanceModel

public static interface AffordanceModel.PropertyMetadata extends AffordanceModel.Named
Metadata about the property model of a representation.
Author:
Oliver Drotbohm
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the input type of the property.
    default Number
    Return the maximum value allowed for a numeric type.
    default Long
    Return the maximum length allowed for a string type.
    default Number
    Return the minimum value allowed for a numeric type.
    default Long
    Return the minimum length allowed for a string type.
    The name of the property.
    Returns the (regular expression) pattern the property has to adhere to.
    Return the type of the property.
    default boolean
    Whether the property has the given name.
    boolean
    Whether the property is read only, i.e. must not be manipulated in requests modifying state.
    boolean
    Whether the property is required to be submitted or always present in the representation returned.
  • Method Details

    • getName

      String getName()
      The name of the property.
      Specified by:
      getName in interface AffordanceModel.Named
      Returns:
      will never be null or empty.
    • hasName

      default boolean hasName(String name)
      Whether the property has the given name.
      Parameters:
      name - must not be null or empty.
      Returns:
    • isRequired

      boolean isRequired()
      Whether the property is required to be submitted or always present in the representation returned.
      Returns:
    • isReadOnly

      boolean isReadOnly()
      Whether the property is read only, i.e. must not be manipulated in requests modifying state.
      Returns:
    • getPattern

      Optional<String> getPattern()
      Returns the (regular expression) pattern the property has to adhere to.
      Returns:
      will never be null.
    • getType

      ResolvableType getType()
      Return the type of the property. If no type can be determined, return Object.
      Returns:
    • getMin

      @Nullable default Number getMin()
      Return the minimum value allowed for a numeric type.
      Returns:
      can be null.
      Since:
      1.3
    • getMax

      @Nullable default Number getMax()
      Return the maximum value allowed for a numeric type.
      Returns:
      can be null.
      Since:
      1.3
    • getMinLength

      @Nullable default Long getMinLength()
      Return the minimum length allowed for a string type.
      Returns:
      can be null.
      Since:
      1.3
    • getMaxLength

      @Nullable default Long getMaxLength()
      Return the maximum length allowed for a string type.
      Returns:
      can be null.
      Since:
      1.3
    • getInputType

      @Nullable String getInputType()
      Returns the input type of the property.
      Returns:
      See Also: