Schnittstelle FlatHalWrapperAssembler<ResourceT>
- Typparameter:
ResourceT- the type of the object being wrapped, which contains the main data
- Alle Superschnittstellen:
SealedNonReactiveFlatHalWrapperAssembler<ResourceT>,SealedResourceLinkAssemblerModule<ResourceT>,SealedResourceListAssemblerModule<ResourceT,Void>
public non-sealed interface FlatHalWrapperAssembler<ResourceT>
extends SealedNonReactiveFlatHalWrapperAssembler<ResourceT>
Interface for managing the transformation of standalone resources into HAL-compliant representations,
supplemented with hypermedia links in a reactive programming context. This interface is tailored for reactive
environments, facilitating the enhancement of resource streams with the necessary fields and structure to comply
with HAL standards, enabling reactive streams of resources to become HAL-compliant.
While the interface's main focus is the transformation of reactive streams, it also comes equipped with the means to transform in an imperative manner, i.e., with direct objects and, for example, lists.
Core functionalities include:
- Enhancing streams of resources to meet HAL structure requirements reactively.
- Appending hypermedia links to resources within the stream to support navigability and resource interaction in a HAL-based API reactively.
- Supporting pagination and backpressure in reactive streams when wrapping resources to provide structured navigation across large datasets reactively.
- Siehe auch:
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdefault reactor.core.publisher.Mono<HalListWrapper<ResourceT, Void>> wrapInListWrapper(reactor.core.publisher.Flux<ResourceT> resourcesToWrap, org.springframework.web.server.ServerWebExchange exchange) Wraps the provided resources in a singleHalListWrapper.default reactor.core.publisher.Mono<HalListWrapper<ResourceT, Void>> wrapInListWrapper(reactor.core.publisher.Flux<ResourceT> resourcesToWrap, reactor.core.publisher.Mono<Long> totalElements, int pageSize, Long offset, List<SortCriteria> sortCriteria, org.springframework.web.server.ServerWebExchange exchange) Wraps the provided resources in a singleHalListWrapperwith paging information.default reactor.core.publisher.Mono<HalResourceWrapper<ResourceT, Void>> wrapInResourceWrapper(reactor.core.publisher.Mono<ResourceT> resourceToWrap, org.springframework.web.server.ServerWebExchange exchange) Wraps the provided resource in aHalResourceWrapperVon Schnittstelle geerbte Methoden de.kamillionlabs.hateoflux.assembler.SealedNonReactiveFlatHalWrapperAssembler
wrapInListWrapper, wrapInListWrapper, wrapInListWrapper, wrapInResourceWrapperVon Schnittstelle geerbte Methoden de.kamillionlabs.hateoflux.assembler.SealedResourceLinkAssemblerModule
buildLinksForResource, buildOtherLinksForResource, buildSelfLinkForResourceVon Schnittstelle geerbte Methoden de.kamillionlabs.hateoflux.assembler.SealedResourceListAssemblerModule
buildLinksForResourceList, buildLinksForResourceList, buildOtherLinksForResourceList, buildSelfLinkForResourceList, createEmptyListWrapper, createEmptyListWrapper, createEmptyListWrapper, createEmptyListWrapper, getResourceTClass
-
Methodendetails
-
wrapInListWrapper
default reactor.core.publisher.Mono<HalListWrapper<ResourceT,Void>> wrapInListWrapper(@NonNull reactor.core.publisher.Flux<ResourceT> resourcesToWrap, org.springframework.web.server.ServerWebExchange exchange) Wraps the provided resources in a singleHalListWrapper.- Parameter:
resourcesToWrap- resources to wrapexchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- wrapped resources
- Siehe auch:
-
wrapInListWrapper
default reactor.core.publisher.Mono<HalListWrapper<ResourceT,Void>> wrapInListWrapper(@NonNull reactor.core.publisher.Flux<ResourceT> resourcesToWrap, @NonNull reactor.core.publisher.Mono<Long> totalElements, int pageSize, @Nullable Long offset, List<SortCriteria> sortCriteria, org.springframework.web.server.ServerWebExchange exchange) Wraps the provided resources in a singleHalListWrapperwith paging information.- Parameter:
resourcesToWrap- resources to wraptotalElements- the total number of elements across all pagespageSize- the number of items per pageoffset- the starting offset of the page, if specifiedsortCriteria- sort criteria (property and direction) of the pageexchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- wrapped resources
- Siehe auch:
-
wrapInResourceWrapper
default reactor.core.publisher.Mono<HalResourceWrapper<ResourceT,Void>> wrapInResourceWrapper(@NonNull reactor.core.publisher.Mono<ResourceT> resourceToWrap, org.springframework.web.server.ServerWebExchange exchange) Wraps the provided resource in aHalResourceWrapper- Parameter:
resourceToWrap- resource to wrapexchange- provides the context of the current web exchange, such as the base URL- Gibt zurück:
- wrapped resource
-