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 givenQueryParameters to theAffordanceto build.andAfford(HttpMethod method) Concludes the creation of the currentAffordanceto build and starts a new one.build()Builds theAffordancecurrently under construction and returns in alongside the ones already contained in theLinkthe buildup started from.Registers the given type as input model for the affordance.withInput(ResolvableType type) Registers the givenResolvableTypeas input model for the affordance.withInput(AffordanceModel.PayloadMetadata metadata) Registers the givenAffordanceModel.PayloadMetadataas input model.withInputAndOutput(Class<?> type) Registers the given type as input and output model for the affordance.Registers the givenResolvableTypeas input and output model for the affordance.Registers the givenAffordanceModel.PayloadMetadataas input and output model.withInputMediaType(MediaType inputMediaType) Registers the input to expect to be of the givenMediaType.withInputMediaTypes(List<MediaType> inputMediaTypes) Registers the givenMediaTypes as input payload media types.Create a newConfigurableAffordanceby copying all attributes and replacing the name.withOutput(Class<?> type) Registers the given type as the output model.withOutput(ResolvableType type) Registers the givenResolvableTypeas the output model.withOutput(AffordanceModel.PayloadMetadata metadata) Registers the givenAffordanceModel.PayloadMetadataas output model.withParameters(List<QueryParameter> parameters) Replaces the currentQueryParameterlist with the given ones.withParameters(QueryParameter... parameters) Replaces the currentQueryParameterlist with the given ones.withTarget(Link target) Create a newConfigurableAffordanceby 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 givenResolvableTypeas input and output model for the affordance.- Parameters:
type- must not be null.- Returns:
- will never be null.
-
withInputAndOutput
Registers the givenAffordanceModel.PayloadMetadataas 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 givenResolvableTypeas input model for the affordance.- Parameters:
type- must not be null.- Returns:
- will never be null.
-
withInput
Registers the givenAffordanceModel.PayloadMetadataas 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 givenResolvableTypeas the output model.- Parameters:
type- must not be null.- Returns:
- will never be null.
-
withOutput
Registers the givenAffordanceModel.PayloadMetadataas 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 givenMediaTypes as input payload media types.- Parameters:
inputMediaTypes- must not be null.- Returns:
- will never be null.
-
withParameters
Replaces the currentQueryParameterlist with the given ones.- Parameters:
parameters- must not be null.- Returns:
- will never be null.
-
withParameters
Replaces the currentQueryParameterlist with the given ones.- Parameters:
parameters- must not be null.- Returns:
- will never be null.
-
addParameters
Adds the givenQueryParameters to theAffordanceto build.- Parameters:
parameters- must not be null.- Returns:
- will never be null.
-
andAfford
Concludes the creation of the currentAffordanceto build and starts a new one.- Parameters:
method- must not be null.- Returns:
- See Also:
-
build
Affordances build()Builds theAffordancecurrently under construction and returns in alongside the ones already contained in theLinkthe buildup started from.- Returns:
- will never be null.
-
withTarget
Create a newConfigurableAffordanceby copying all attributes and replacing the target.- Parameters:
target- must not be null.- Returns:
-
withName
Create a newConfigurableAffordanceby copying all attributes and replacing the name.- Parameters:
name- can be null.- Returns:
-