Interface SimpleReactiveRepresentationModelAssembler<T>
- All Superinterfaces:
ReactiveRepresentationModelAssembler<T,EntityModel<T>>
public interface SimpleReactiveRepresentationModelAssembler<T>
extends ReactiveRepresentationModelAssembler<T,EntityModel<T>>
Reactive variant of
RepresentationModelAssembler combined with SimpleRepresentationModelAssembler.- Author:
- Greg Turnquist, Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptiondefault CollectionModel<EntityModel<T>>addLinks(CollectionModel<EntityModel<T>> resources, org.springframework.web.server.ServerWebExchange exchange) Define links to add to theCollectionModelcollection.default EntityModel<T>addLinks(EntityModel<T> resource, org.springframework.web.server.ServerWebExchange exchange) Define links to add to every individualEntityModel.default reactor.core.publisher.Mono<CollectionModel<EntityModel<T>>>toCollectionModel(reactor.core.publisher.Flux<? extends T> entities, org.springframework.web.server.ServerWebExchange exchange) Converts all given entities into resources and wraps the collection as a resource as well.default reactor.core.publisher.Mono<EntityModel<T>>Converts the given entity into aEntityModelwrapped in aMono.
-
Method Details
-
toModel
default reactor.core.publisher.Mono<EntityModel<T>> toModel(T entity, org.springframework.web.server.ServerWebExchange exchange) Converts the given entity into aEntityModelwrapped in aMono.- Specified by:
toModelin interfaceReactiveRepresentationModelAssembler<T,EntityModel<T>> - Parameters:
entity- must not be null.exchange- must not be null.- Returns:
- will never be null.
-
addLinks
default EntityModel<T> addLinks(EntityModel<T> resource, org.springframework.web.server.ServerWebExchange exchange) Define links to add to every individualEntityModel.- Parameters:
resource- must not be null.exchange- must not be null.- Returns:
- will never be null.
-
toCollectionModel
default reactor.core.publisher.Mono<CollectionModel<EntityModel<T>>> toCollectionModel(reactor.core.publisher.Flux<? extends T> entities, org.springframework.web.server.ServerWebExchange exchange) Converts all given entities into resources and wraps the collection as a resource as well.- Specified by:
toCollectionModelin interfaceReactiveRepresentationModelAssembler<T,EntityModel<T>> - Parameters:
entities- must not be null.- Returns:
CollectionModelcontainingEntityModelofT, will never be null..- See Also:
-
addLinks
default CollectionModel<EntityModel<T>> addLinks(CollectionModel<EntityModel<T>> resources, org.springframework.web.server.ServerWebExchange exchange) Define links to add to theCollectionModelcollection.- Parameters:
resources- must not be null.- Returns:
- will never be null.
-