Interface ReactiveRepresentationModelAssembler<T,D extends RepresentationModel<?>>
- All Known Subinterfaces:
SimpleReactiveRepresentationModelAssembler<T>
public interface ReactiveRepresentationModelAssembler<T,D extends RepresentationModel<?>>
Reactive variant of
RepresentationModelAssembler
combined with SimpleRepresentationModelAssembler
.- Author:
- Greg Turnquist, Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptiondefault reactor.core.publisher.Mono<CollectionModel<D>>
toCollectionModel
(reactor.core.publisher.Flux<? extends T> entities, ServerWebExchange exchange) Converts anIterable
orT
s into anIterable
ofRepresentationModel
and wraps them in aCollectionModel
instance.reactor.core.publisher.Mono<D>
toModel
(T entity, ServerWebExchange exchange) Converts the given entity into aD
, which extendsRepresentationModel
.
-
Method Details
-
toModel
Converts the given entity into aD
, which extendsRepresentationModel
.- Parameters:
entity
-- Returns:
-
toCollectionModel
default reactor.core.publisher.Mono<CollectionModel<D>> toCollectionModel(reactor.core.publisher.Flux<? extends T> entities, ServerWebExchange exchange) Converts anIterable
orT
s into anIterable
ofRepresentationModel
and wraps them in aCollectionModel
instance.- Parameters:
entities
- must not be null.- Returns:
CollectionModel
containingD
.
-