Class TeaserUtils

java.lang.Object
com.day.cq.personalization.TeaserUtils

public class TeaserUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    getImage(Page teaser)
    Returns a image for the teaser, based on the following logic: check for page image check for first par image component check for first par textimage component fallback, return page template thumbnail
    static String
    Returns a image for the teaser, based on the following logic: check for page image check for first par image component check for first par textimage component fallback, return page template thumbnail

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TeaserUtils

      public TeaserUtils()
  • Method Details

    • getImage

      public static String getImage(Page teaser)
      Returns a image for the teaser, based on the following logic:
      • check for page image
      • check for first par image component
      • check for first par textimage component
      • fallback, return page template thumbnail
      Parameters:
      teaser - Teaser page
      Returns:
      A URL to the image.
    • getImage

      public static String getImage(SlingHttpServletRequest request, Page teaser)
      Returns a image for the teaser, based on the following logic:
      • check for page image
      • check for first par image component
      • check for first par textimage component
      • fallback, return page template thumbnail
      Parameters:
      request - SlingHttpServletRequest used for resource mapping
      teaser - Teaser page
      Returns:
      A URL to the image.