Class SitePreviewTools
java.lang.Object
de.hybris.platform.cmscockpit.util.SitePreviewTools
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgeneratePreview(String url, String cutyCaptExecutable, String workingDir, int width, long timeout) static org.zkoss.zul.ImagegeneratePreviewImage(String url, String cutyCaptExecutable, String workingDir, int width, long timeout) Generates a screenshot from a websitestatic BufferedImagescaleToWidth(BufferedImage image, int width)
-
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 urlcutyCaptExecutable- 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 filestimeout- the amount of milliseconds to wait for the external process- Returns:
- the image, or null, if loading failed
-
generatePreview
-
scaleToWidth
-