Interface ConfigurableAffordance

All Superinterfaces:
AffordanceOperations

public interface ConfigurableAffordance extends AffordanceOperations
An affordance in creation. API to build up affordances manually to clearly distinguish between building the affordance and consuming the configured state.
Since:
1.3
Author:
Oliver Drotbohm
  • Method Details

    • withInputAndOutput

      ConfigurableAffordance withInputAndOutput(Class<?> type)
      Registers the given type as input and output model for the affordance.
      Parameters:
      type - must not be null.
      Returns:
      will never be null.
    • withInputAndOutput

      ConfigurableAffordance withInputAndOutput(org.springframework.core.ResolvableType type)
      Registers the given ResolvableType as input and output model for the affordance.
      Parameters:
      type - must not be null.
      Returns:
      will never be null.
    • withInputAndOutput

      Registers the given AffordanceModel.PayloadMetadata as input and output model.
      Parameters:
      metadata - must not be null.
      Returns:
      will never be null.
    • withInput

      ConfigurableAffordance withInput(Class<?> type)
      Registers the given type as input model for the affordance.
      Parameters:
      type - must not be null.
      Returns:
      will never be null.
    • withInput

      ConfigurableAffordance withInput(org.springframework.core.ResolvableType type)
      Registers the given ResolvableType as input model for the affordance.
      Parameters:
      type - must not be null.
      Returns:
      will never be null.
    • withInput

      Registers the given AffordanceModel.PayloadMetadata as input model.
      Parameters:
      metadata - must not be null.
      Returns:
      will never be null.
    • withOutput

      ConfigurableAffordance withOutput(Class<?> type)
      Registers the given type as the output model.
      Parameters:
      type - must not be null.
      Returns:
      will never be null.
    • withOutput

      ConfigurableAffordance withOutput(org.springframework.core.ResolvableType type)
      Registers the given ResolvableType as the output model.
      Parameters:
      type - must not be null.
      Returns:
      will never be null.
    • withOutput

      Registers the given AffordanceModel.PayloadMetadata as output model.
      Parameters:
      metadata - must not be null.
      Returns:
      will never be null.
    • withInputMediaType

      ConfigurableAffordance withInputMediaType(org.springframework.http.MediaType inputMediaType)
      Registers the input to expect to be of the given MediaType.
      Parameters:
      inputMediaType - can be null.
      Returns:
      will never be null.
    • withInputMediaTypes

      ConfigurableAffordance withInputMediaTypes(List<org.springframework.http.MediaType> inputMediaTypes)
      Registers the given MediaTypes as input payload media types.
      Parameters:
      inputMediaTypes - must not be null.
      Returns:
      will never be null.
    • withParameters

      ConfigurableAffordance withParameters(QueryParameter... parameters)
      Replaces the current QueryParameter list with the given ones.
      Parameters:
      parameters - must not be null.
      Returns:
      will never be null.
    • withParameters

      ConfigurableAffordance withParameters(List<QueryParameter> parameters)
      Replaces the current QueryParameter list with the given ones.
      Parameters:
      parameters - must not be null.
      Returns:
      will never be null.
    • addParameters

      ConfigurableAffordance addParameters(QueryParameter... parameters)
      Adds the given QueryParameters to the Affordance to build.
      Parameters:
      parameters - must not be null.
      Returns:
      will never be null.
    • andAfford

      ConfigurableAffordance andAfford(org.springframework.http.HttpMethod method)
      Concludes the creation of the current Affordance to build and starts a new one.
      Parameters:
      method - must not be null.
      Returns:
      See Also:
    • build

      Affordances build()
      Builds the Affordance currently under construction and returns in alongside the ones already contained in the Link the buildup started from.
      Returns:
      will never be null.
    • withTarget

      ConfigurableAffordance withTarget(Link target)
      Create a new ConfigurableAffordance by copying all attributes and replacing the target.
      Parameters:
      target - must not be null.
      Returns:
    • withName

      ConfigurableAffordance withName(@Nullable String name)
      Create a new ConfigurableAffordance by copying all attributes and replacing the name.
      Parameters:
      name - can be null.
      Returns: