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 class
ImageRequestParameter.EdgeSize
static class
ImageRequestParameter.Vector2
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImageRequestParameter
forRequest(javax.servlet.http.HttpServletRequest req)
Parses the parameters given to theFormPreviewImageServlet
and returns them.ImageRequestParameter.Vector2
getCrop()
ImageRequestParameter.Vector2
getDimension()
String
getFormat()
Projekt
getProject()
Long
getProjectId()
Double
getQuality()
Double
getScale()
ImageRequestParameter.EdgeSize
getSourceRectangle()
String
getType()
Boolean
isKeepAspectRatio()
String
toString()
-
-
-
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
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()
-
forRequest
public static ImageRequestParameter forRequest(javax.servlet.http.HttpServletRequest req)
Parses the parameters given to theFormPreviewImageServlet
and returns them.- Parameters:
req
- Request that was made to theFormPreviewImageServlet
.- Returns:
- The parsed parameters.
-
-