Interface CollectionHelper

  • public interface CollectionHelper
    Implementors provide easier access to DAM collections for managing the associated content of a content fragment.
    • Method Detail

      • getCollections

        Iterator<Resource> getCollections​(ResourceResolver resolver,
                                          boolean includeSmartCollections)
        Gets an iterator on all collections that can be added to a content fragment as "associated content".

        In this context, the term "collections" refers to DAM or other resource collections (technically implemented as Sling Resource Collections, see

        As some of the implementations use a "smart collection" approach (like a collection containing the dynamically updated list of last modified items), which you may or may not want included in your list, there's a parameter for defining if such smart collections should actually be included.

        resolver - The ResourceResolver for retrieving the collections
        includeSmartCollections - True if smart collections should be included
        The iterator on collections; resource type of each resource type is sling/collection