Class TeaserUtils


  • public class TeaserUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TeaserUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.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 java.lang.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
      • Methods inherited from class java.lang.Object

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

      • TeaserUtils

        public TeaserUtils()
    • Method Detail

      • getImage

        public static java.lang.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 java.lang.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.