Class SitePreviewTools

java.lang.Object
de.hybris.platform.cmscockpit.util.SitePreviewTools

public class SitePreviewTools extends Object
  • Constructor Details

    • SitePreviewTools

      public SitePreviewTools()
  • Method Details

    • generatePreviewImage

      public static org.zkoss.zul.Image generatePreviewImage(String url, String cutyCaptExecutable, String workingDir, int width, long timeout)
      Generates a screenshot from a website
      Parameters:
      url - the website's url
      cutyCaptExecutable - the command line executable which is used to generate the preview, must be invokable in the syntax "captureExecutable URL OUTPUTFILE"
      workingDir - the working directory for the temporary files
      timeout - the amount of milliseconds to wait for the external process
      Returns:
      the image, or null, if loading failed
    • generatePreview

      public static String generatePreview(String url, String cutyCaptExecutable, String workingDir, int width, long timeout)
    • scaleToWidth

      public static BufferedImage scaleToWidth(BufferedImage image, int width)