Schnittstelle SealedResourceLinkAssemblerModule<ResourceT>
- Typparameter:
ResourceT- the type of the object being wrapped, which contains the main data
- Alle bekannten Unterschnittstellen:
EmbeddingHalWrapperAssembler<ResourceT,,EmbeddedT> FlatHalWrapperAssembler<ResourceT>,SealedNonReactiveEmbeddingHalWrapperAssembler<ResourceT,,EmbeddedT> SealedNonReactiveFlatHalWrapperAssembler<ResourceT>
public sealed interface SealedResourceLinkAssemblerModule<ResourceT>
permits SealedNonReactiveFlatHalWrapperAssembler<ResourceT>, SealedNonReactiveEmbeddingHalWrapperAssembler<ResourceT,EmbeddedT>
Assembler module that builds links for an resource.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbuildLinksForResource(ResourceT resourceToWrap, org.springframework.web.server.ServerWebExchange exchange) Main method for building all links for a given resource, including a self-link and other contextual links.buildOtherLinksForResource(ResourceT resourceToWrap, org.springframework.web.server.ServerWebExchange exchange) Provides additional contextual links for a given resource, beyond the self-link.buildSelfLinkForResource(ResourceT resourceToWrap, org.springframework.web.server.ServerWebExchange exchange) Creates a self-link for a given resource, representing a URI that clients can use to access the resource directly.
-
Methodendetails
-
buildLinksForResource
default List<Link> buildLinksForResource(ResourceT resourceToWrap, org.springframework.web.server.ServerWebExchange exchange) Main method for building all links for a given resource, including a self-link and other contextual links. It aggregates results frombuildSelfLinkForResource(ResourceT, org.springframework.web.server.ServerWebExchange)andbuildOtherLinksForResource(ResourceT, org.springframework.web.server.ServerWebExchange).- Parameter:
resourceToWrap- the resource for which links are constructedexchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- a list of
Linkobjects representing hypermedia links for the resource
-
buildSelfLinkForResource
Link buildSelfLinkForResource(ResourceT resourceToWrap, org.springframework.web.server.ServerWebExchange exchange) Creates a self-link for a given resource, representing a URI that clients can use to access the resource directly.- Parameter:
resourceToWrap- the resource for which a self-link is createdexchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- a
Linkobject representing the self-link for the resource
-
buildOtherLinksForResource
default List<Link> buildOtherLinksForResource(ResourceT resourceToWrap, org.springframework.web.server.ServerWebExchange exchange) Provides additional contextual links for a given resource, beyond the self-link.- Parameter:
resourceToWrap- the resource for which additional links are generatedexchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- a list of
Linkobjects representing additional hypermedia links for the resource
-