Interface ReactiveRepresentationModelAssembler<T,D extends RepresentationModel<?>>

All Known Subinterfaces:
SimpleReactiveRepresentationModelAssembler<T>

public interface ReactiveRepresentationModelAssembler<T,D extends RepresentationModel<?>>
Author:
Greg Turnquist, Oliver Drotbohm
  • Method Summary

    Modifier and Type
    Method
    Description
    default reactor.core.publisher.Mono<CollectionModel<D>>
    toCollectionModel(reactor.core.publisher.Flux<? extends T> entities, org.springframework.web.server.ServerWebExchange exchange)
    Converts an Iterable or Ts into an Iterable of RepresentationModel and wraps them in a CollectionModel instance.
    reactor.core.publisher.Mono<D>
    toModel(T entity, org.springframework.web.server.ServerWebExchange exchange)
    Converts the given entity into a D, which extends RepresentationModel.
  • Method Details

    • toModel

      reactor.core.publisher.Mono<D> toModel(T entity, org.springframework.web.server.ServerWebExchange exchange)
      Converts the given entity into a D, which extends RepresentationModel.
      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 an Iterable or Ts into an Iterable of RepresentationModel and wraps them in a CollectionModel instance.
      Parameters:
      entities - must not be null.
      Returns:
      CollectionModel containing D.