public class CmsPdfThumbnailLink extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CmsPdfThumbnailLink.ParseException
Exception which is thrown when parsing a thumbnail link fails.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MARKER
The marker string used to identify PDF thumbnails.
|
static java.lang.String |
PARAM_OPTIONS
The name of the request parameter for the thumbnail options.
|
static java.lang.String |
REGEX
The name of the reqex for parsing the thumbnail URI path.
|
static java.util.regex.Pattern |
REGEX_COMPILED
The compiled regular expression for matching thumbnail URI paths.
|
Constructor and Description |
---|
CmsPdfThumbnailLink(CmsObject cms,
CmsResource pdfResource,
int width,
int height,
java.lang.String format)
Creates a new thumbnail link for the given resource and options.
|
CmsPdfThumbnailLink(CmsObject cms,
java.lang.String link,
java.lang.String options)
Parses a thumbnail link object from the given link path and options.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFormat()
Gets the image format.
|
int |
getHeight()
Returns the height.
|
java.lang.String |
getLinkWithOptions()
Gets the link, with the options appended as a request parameter.
|
int |
getPage()
Returns the page.
|
int |
getWidth()
Returns the width.
|
public static final java.lang.String MARKER
public static final java.lang.String PARAM_OPTIONS
public static final java.lang.String REGEX
public static final java.util.regex.Pattern REGEX_COMPILED
public CmsPdfThumbnailLink(CmsObject cms, CmsResource pdfResource, int width, int height, java.lang.String format)
cms
- the current CMS contextpdfResource
- the PDF resource for which to create a thumbnail linkwidth
- thumbnail widthheight
- thumbnail heightformat
- the thumbnail image format (png, gif..,)public CmsPdfThumbnailLink(CmsObject cms, java.lang.String link, java.lang.String options) throws CmsPdfThumbnailLink.ParseException, CmsException
cms
- the current CMS contextlink
- the linkoptions
- the optionsCmsPdfThumbnailLink.ParseException
CmsException
public java.lang.String getFormat()
public int getHeight()
public java.lang.String getLinkWithOptions()
public int getPage()
public int getWidth()