Interface AMFinder<B extends AMQueryBuilder<M,T>,M,T>


public interface AMFinder<B extends AMQueryBuilder<M,T>,M,T>
An AMFinder is responsible for locating and returning media related to a model.

All media matching the query is sorted by score and returned. Better matches are prioritized before worse ones.

  • Method Details

    • getAdaptiveMedias

      List<AdaptiveMedia<T>> getAdaptiveMedias(Function<B,AMQuery<M,T>> amQueryBuilderFunction) throws com.liferay.portal.kernel.exception.PortalException
      Returns all AdaptiveMedia instances for the model that matches the query. The function is invoked with an instance of an implementation dependent AMQueryBuilder, that callers must use to create the query.
      Parameters:
      amQueryBuilderFunction - a function to be invoked with an AMQueryBuilder argument. The query builder provides operations to filter and sort the returned media.
      Returns:
      a non-null, possibly empty list of all media instances matching the query ordered by score: better matches are prioritized first
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if an error occurred while calling any Liferay service