Resource Streams in Apache Sling

Published on by Dan KlcoPicture of Me Dan Klco

Jörg Hoh recently wrote an interesting post on Content Architecture where he discussed how expensive JCR Queries could instead be replaced with targeted content structure traversals to allow finding relevant content without searching the whole AEM repository. Unfortunately, from a developer perspective, this means writing a fair amount of boilerplate code to traverse the AEM repository and then identify the relevant Resources. Fortunately, a new API was just released by the Apache Sling team. This API was created by Jason Bailey and adds support for using Lambda expressions to filter a stream of Resources in from Sling repository.