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, org.springframework.web.server.ServerWebExchange exchange) Converts anIterableorTs into anIterableofRepresentationModeland wraps them in aCollectionModelinstance.reactor.core.publisher.Mono<D>Converts the given entity into aD, which extendsRepresentationModel.
-
Method Details
-
toModel
reactor.core.publisher.Mono<D> toModel(T entity, org.springframework.web.server.ServerWebExchange exchange) 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, org.springframework.web.server.ServerWebExchange exchange) Converts anIterableorTs into anIterableofRepresentationModeland wraps them in aCollectionModelinstance.- Parameters:
entities- must not be null.- Returns:
CollectionModelcontainingD.
-