Interface ConfigurableAffordance
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptionaddParameters
(QueryParameter... parameters) Adds the givenQueryParameter
s to theAffordance
to build.andAfford
(HttpMethod method) Concludes the creation of the currentAffordance
to build and starts a new one.build()
Builds theAffordance
currently under construction and returns in alongside the ones already contained in theLink
the buildup started from.Registers the given type as input model for the affordance.withInput
(ResolvableType type) Registers the givenResolvableType
as input model for the affordance.withInput
(AffordanceModel.PayloadMetadata metadata) Registers the givenAffordanceModel.PayloadMetadata
as input model.withInputAndOutput
(Class<?> type) Registers the given type as input and output model for the affordance.Registers the givenResolvableType
as input and output model for the affordance.Registers the givenAffordanceModel.PayloadMetadata
as input and output model.withInputMediaType
(MediaType inputMediaType) Registers the input to expect to be of the givenMediaType
.withInputMediaTypes
(List<MediaType> inputMediaTypes) Registers the givenMediaType
s as input payload media types.Create a newConfigurableAffordance
by copying all attributes and replacing the name.withOutput
(Class<?> type) Registers the given type as the output model.withOutput
(ResolvableType type) Registers the givenResolvableType
as the output model.withOutput
(AffordanceModel.PayloadMetadata metadata) Registers the givenAffordanceModel.PayloadMetadata
as output model.withParameters
(List<QueryParameter> parameters) Replaces the currentQueryParameter
list with the given ones.withParameters
(QueryParameter... parameters) Replaces the currentQueryParameter
list with the given ones.withTarget
(Link target) Create a newConfigurableAffordance
by copying all attributes and replacing the target.Methods inherited from interface org.springframework.hateoas.mediatype.AffordanceOperations
toLink
-
Method Details
-
withInputAndOutput
Registers the given type as input and output model for the affordance.- Parameters:
type
- must not be null.- Returns:
- will never be null.
-
withInputAndOutput
Registers the givenResolvableType
as input and output model for the affordance.- Parameters:
type
- must not be null.- Returns:
- will never be null.
-
withInputAndOutput
Registers the givenAffordanceModel.PayloadMetadata
as input and output model.- Parameters:
metadata
- must not be null.- Returns:
- will never be null.
-
withInput
Registers the given type as input model for the affordance.- Parameters:
type
- must not be null.- Returns:
- will never be null.
-
withInput
Registers the givenResolvableType
as input model for the affordance.- Parameters:
type
- must not be null.- Returns:
- will never be null.
-
withInput
Registers the givenAffordanceModel.PayloadMetadata
as input model.- Parameters:
metadata
- must not be null.- Returns:
- will never be null.
-
withOutput
Registers the given type as the output model.- Parameters:
type
- must not be null.- Returns:
- will never be null.
-
withOutput
Registers the givenResolvableType
as the output model.- Parameters:
type
- must not be null.- Returns:
- will never be null.
-
withOutput
Registers the givenAffordanceModel.PayloadMetadata
as output model.- Parameters:
metadata
- must not be null.- Returns:
- will never be null.
-
withInputMediaType
Registers the input to expect to be of the givenMediaType
.- Parameters:
inputMediaType
- can be null.- Returns:
- will never be null.
-
withInputMediaTypes
Registers the givenMediaType
s as input payload media types.- Parameters:
inputMediaTypes
- must not be null.- Returns:
- will never be null.
-
withParameters
Replaces the currentQueryParameter
list with the given ones.- Parameters:
parameters
- must not be null.- Returns:
- will never be null.
-
withParameters
Replaces the currentQueryParameter
list with the given ones.- Parameters:
parameters
- must not be null.- Returns:
- will never be null.
-
addParameters
Adds the givenQueryParameter
s to theAffordance
to build.- Parameters:
parameters
- must not be null.- Returns:
- will never be null.
-
andAfford
Concludes the creation of the currentAffordance
to build and starts a new one.- Parameters:
method
- must not be null.- Returns:
- See Also:
-
build
Affordances build()Builds theAffordance
currently under construction and returns in alongside the ones already contained in theLink
the buildup started from.- Returns:
- will never be null.
-
withTarget
Create a newConfigurableAffordance
by copying all attributes and replacing the target.- Parameters:
target
- must not be null.- Returns:
-
withName
Create a newConfigurableAffordance
by copying all attributes and replacing the name.- Parameters:
name
- can be null.- Returns:
-