Class DynamicCollectionViews

java.lang.Object
io.goobi.viewer.model.cms.collections.DynamicCollectionViews

public final class DynamicCollectionViews extends Object
Factory for building a CollectionView whose entries are the database-defined DynamicCollections. Used by every rendering path that supports the SolrConstants.DC_DYNAMIC pseudo field (server-side collection listings and the IIIF collection REST API backing the client-side accordion widget), so that all paths produce the same flat set of entries with the same labels, thumbnails, links and hit counts.
  • Method Details

    • build

      public static CollectionView build(String subtheme, String filterQuery) throws IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
      Builds a flat CollectionView of all dynamic collections, populated and with each entry's DynamicCollection attached as its browse-element info (so label, description, thumbnail and link resolve from the DB).
      Parameters:
      subtheme - subtheme discriminator value to keep links within, may be empty
      filterQuery - additional filter query (component filter + subtheme) AND-combined with each collection's query for the hit count, may be blank
      Returns:
      the populated collection view
      Throws:
      IndexUnreachableException - if any.
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException - if any.
    • buildMap

      public static Map<String,CollectionResult> buildMap(String filterQuery)
      Builds the collection map for the dynamic-collection listing: one entry per DynamicCollection with a non-blank query, keyed by its identifier, with the record count of its stored query AND-combined with the given filter query.
      Parameters:
      filterQuery - additional filter query to AND-combine with each collection's query, may be blank
      Returns:
      map of identifier to CollectionResult