public static class Affordances.AffordanceBuilder extends Object implements AffordanceOperations
Affordance instances.| Modifier and Type | Method and Description |
|---|---|
Affordances.AffordanceBuilder |
addParameters(QueryParameter... parameters)
Adds the given
QueryParameters to the Affordance to build. |
Affordances.AffordanceBuilder |
andAfford(HttpMethod method)
Concludes the creation of the current
Affordance to build and starts a new one. |
Affordances |
build()
Builds the
Affordance currently under construction and returns in alongside the ones already contained in
the Link the buildup started from. |
Link |
toLink()
Returns a
Link equipped with the Affordance currently under construction. |
Affordances.AffordanceBuilder |
withInput(AffordanceModel.PayloadMetadata metadata)
Registers the given
AffordanceModel.PayloadMetadata as input model. |
Affordances.AffordanceBuilder |
withInput(Class<?> type)
Registers the given type as input model for the affordance.
|
Affordances.AffordanceBuilder |
withInput(ResolvableType type)
Registers the given
ResolvableType as input model for the affordance. |
Affordances.AffordanceBuilder |
withInputAndOutput(AffordanceModel.PayloadMetadata metadata)
Registers the given
AffordanceModel.PayloadMetadata as input and output model. |
Affordances.AffordanceBuilder |
withInputAndOutput(Class<?> type)
Registers the given type as input and output model for the affordance.
|
Affordances.AffordanceBuilder |
withInputAndOutput(ResolvableType type)
Registers the given
ResolvableType as input and output model for the affordance. |
Affordances.AffordanceBuilder |
withName(String name)
Create a new
Affordances.AffordanceBuilder by copying all attributes and replacing the name. |
Affordances.AffordanceBuilder |
withOutput(AffordanceModel.PayloadMetadata metadata)
Registers the given
AffordanceModel.PayloadMetadata as output model. |
Affordances.AffordanceBuilder |
withOutput(Class<?> type)
Registers the given type as the output model.
|
Affordances.AffordanceBuilder |
withOutput(ResolvableType type)
Registers the given
ResolvableType as the output model. |
Affordances.AffordanceBuilder |
withParameters(List<QueryParameter> parameters)
Replaces the current
QueryParameter list with the given ones. |
Affordances.AffordanceBuilder |
withParameters(QueryParameter... parameters)
Replaces the current
QueryParameter list with the given ones. |
Affordances.AffordanceBuilder |
withTarget(Link target)
Create a new
Affordances.AffordanceBuilder by copying all attributes and replacing the target. |
public Affordances.AffordanceBuilder withInputAndOutput(Class<?> type)
type - must not be null.public Affordances.AffordanceBuilder withInputAndOutput(ResolvableType type)
ResolvableType as input and output model for the affordance.type - must not be null.public Affordances.AffordanceBuilder withInputAndOutput(AffordanceModel.PayloadMetadata metadata)
AffordanceModel.PayloadMetadata as input and output model.metadata - must not be null.public Affordances.AffordanceBuilder withInput(Class<?> type)
type - must not be null.public Affordances.AffordanceBuilder withInput(ResolvableType type)
ResolvableType as input model for the affordance.type - must not be null.public Affordances.AffordanceBuilder withInput(AffordanceModel.PayloadMetadata metadata)
AffordanceModel.PayloadMetadata as input model.metadata - must not be null.public Affordances.AffordanceBuilder withOutput(Class<?> type)
type - must not be null.public Affordances.AffordanceBuilder withOutput(ResolvableType type)
ResolvableType as the output model.type - must not be null.public Affordances.AffordanceBuilder withOutput(AffordanceModel.PayloadMetadata metadata)
AffordanceModel.PayloadMetadata as output model.metadata - must not be null.public Affordances.AffordanceBuilder withParameters(QueryParameter... parameters)
QueryParameter list with the given ones.parameters - must not be null.public Affordances.AffordanceBuilder withParameters(List<QueryParameter> parameters)
QueryParameter list with the given ones.parameters - must not be null.public Affordances.AffordanceBuilder addParameters(QueryParameter... parameters)
QueryParameters to the Affordance to build.parameters - must not be null.public Affordances.AffordanceBuilder andAfford(HttpMethod method)
Affordance to build and starts a new one.public Link toLink()
AffordanceOperationsLink equipped with the Affordance currently under construction.toLink in interface AffordanceOperationspublic Affordances build()
Affordance currently under construction and returns in alongside the ones already contained in
the Link the buildup started from.public Affordances.AffordanceBuilder withTarget(Link target)
Affordances.AffordanceBuilder by copying all attributes and replacing the target.target - public Affordances.AffordanceBuilder withName(@Nullable String name)
Affordances.AffordanceBuilder by copying all attributes and replacing the name.name - Copyright © 2011–2020 Pivotal, Inc.. All rights reserved.