Skip to content

Releases: pellse/assembler

Assembler v0.0.9

20 Jun 20:36
Compare
Choose a tag to compare

This version adds support for Akka Stream through the AkkaSourceAdapter

Assembler v0.0.8

31 May 15:03
29b4ea2
Compare
Choose a tag to compare

The following changes are available in this release:

  • Support for RxJava through ObservableAdapter and FlowableAdapter
  • Implementations of AssemblerAdapter are not responsible anymore to handle error conversion, this is now done in the core code

Assembler v0.0.7

30 May 05:48
Compare
Choose a tag to compare

This release contains the following changes:

  • Removed SynchronousAdapter and replaced with StreamAdapter
    • This allows the new StreamAdapter to be configurable to process Java 8 Streams synchronously or in parallel through a new parallel flag
  • CompletableFutureAdapter now converts any exception according to the supplied errorConverter
  • DSL previously exposed by AssemblerBuilder is now part of Assembler
  • Added withErrorConverter() to Assembler to add the ability to specify a custom error converter
  • Removed dependency on the Lombok library as it is used only for testing

Assembler v0.0.6

29 May 13:59
91ec1c1
Compare
Choose a tag to compare

The following changes were integrated into this release:

  • Deleted assembler-synchronous module and move the assembler synchronous implementation in assembler-core
  • Fixed issue #2 by adding support for CompletableFuture in assembler-core, so now supporting aggregation of service calls asynchronously is just a matter of switching from a SynchronousAdapter to a CompletableFutureAdapter:
CompletableFuture<List<Transaction>> transactions = assemblerOf(Transaction.class)
    .fromSupplier(this::getCustomers, Customer::getCustomerId)
    .assembleWith(
        oneToOne(this::getBillingInfoForCustomers, BillingInfo::getCustomerId)
        oneToManyAsList(this::getAllOrdersForCustomers, OrderItem::getCustomerId),
        Transaction::new)
    .using(completableFutureAdapter());

Assembler v0.0.5

28 May 15:46
c7cdf9b
Compare
Choose a tag to compare

2 major changes were introduced in this release:

  • A new fluent api to construct the assembler, here is a usage example:
List<Transaction> transactions = assemblerOf(Transaction.class)
    .fromSupplier(this::getCustomers, Customer::getCustomerId)
    .assembleWith(
        oneToOne(this::getBillingInfoForCustomers, BillingInfo::getCustomerId),
        oneToManyAsList(this::getAllOrdersForCustomers, OrderItem::getCustomerId),
        Transaction::new)
    .using(synchronousAssemblerAdapter())
    .collect(toList());
  • Fixed issue #8, by default it is assumed to be an ArrayList when no id collection supplier is specified, but now we can also specify a per mapper id collection supplier e.g.:
oneToOne(this::getBillingInfoForCustomers, BillingInfo::getCustomerId, HashSet::new),
oneToManyAsList(this::getAllOrdersForCustomers, OrderItem::getCustomerId, LinkedList::new)