Package de.xima.fc.form.image
Class ImageRequestParameter
- java.lang.Object
-
- de.xima.fc.form.image.ImageRequestParameter
-
public class ImageRequestParameter extends Object
Represents the parsed parameters for theFormPreviewImageServlet.- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImageRequestParameter.EdgeSizestatic classImageRequestParameter.Vector2
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImageRequestParameterforRequest(javax.servlet.http.HttpServletRequest req)Parses the parameters given to theFormPreviewImageServletand returns them.ImageRequestParameter.Vector2getCrop()ImageRequestParameter.Vector2getDimension()StringgetFormat()ProjektgetProject()LonggetProjectId()DoublegetQuality()DoublegetScale()ImageRequestParameter.EdgeSizegetSourceRectangle()StringgetType()BooleanisKeepAspectRatio()StringtoString()
-
-
-
Method Detail
-
getCrop
public ImageRequestParameter.Vector2 getCrop()
-
getDimension
public ImageRequestParameter.Vector2 getDimension()
-
getFormat
public String getFormat()
- Returns:
- The format of the returned preview image, defaults to
png.
-
getProjectId
public Long getProjectId()
- Returns:
- The ID of the
Projektfor 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()
-
forRequest
public static ImageRequestParameter forRequest(javax.servlet.http.HttpServletRequest req)
Parses the parameters given to theFormPreviewImageServletand returns them.- Parameters:
req- Request that was made to theFormPreviewImageServlet.- Returns:
- The parsed parameters.
-
-