Class ImageRequestParameter

java.lang.Object
de.xima.fc.form.image.ImageRequestParameter

public class ImageRequestParameter extends Object
Represents the parsed parameters for the FormPreviewImageServlet.
Author:
XIMA MEDIA GmbH
  • Method Details

    • getCrop

    • getDimension

      public ImageRequestParameter.Vector2 getDimension()
    • getFormat

      public String getFormat()
      Returns:
      The format of the returned preview image, defaults to png.
    • getProject

      public Projekt getProject()
      Returns:
      The Projekt for which to return the preview image.
    • getProjectId

      public Long getProjectId()
      Returns:
      The ID of the Projekt for which to return the preview image.
    • getQuality

      public Double getQuality()
      Returns:
      The (compression) quality of the returned preview image, between 0 (worst) and 1 (best). Defaults to 1.
    • getScale

      public Double getScale()
    • getSourceRectangle

      public ImageRequestParameter.EdgeSize getSourceRectangle()
    • getType

      public String getType()
      Returns:
      Whether to return the the full version of the preview image or a thumbnail.
    • isKeepAspectRatio

      public Boolean isKeepAspectRatio()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • forRequest

      public static ImageRequestParameter forRequest(javax.servlet.http.HttpServletRequest req)
      Parses the parameters given to the FormPreviewImageServlet and returns them.
      Parameters:
      req - Request that was made to the FormPreviewImageServlet.
      Returns:
      The parsed parameters.