public class CmsPdfLink extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CmsPdfLink.CmsPdfLinkParseException
Exception which is thrown when parsing a link as a PDF link fails.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NOSLASH_GROUP
Group of characters without slashes.
|
static java.lang.String |
PDF_LINK_PREFIX
The prefix string for PDF links.
|
static java.lang.String |
PDF_LINK_REGEX
Regular expression for parsing PDF links.
|
static java.util.regex.Pattern |
PDF_LINK_REGEX_COMPILED
Compiled regular expression for parsing PDF links.
|
Constructor and Description |
---|
CmsPdfLink(CmsObject cms,
CmsResource formatter,
CmsResource content)
Creates a new PDF link object based on the formatter and content resources and the locale of the current CMS context.
|
CmsPdfLink(CmsObject cms,
java.lang.String link)
Creates a PDF link object by parsing it from a link string.
|
Modifier and Type | Method and Description |
---|---|
CmsResource |
getContent()
Returns the content.
|
CmsResource |
getFormatter()
Gets the formatter resource.
|
java.lang.String |
getLink()
Returns the link.
|
java.util.Locale |
getLocale()
Returns the locale.
|
public static final java.lang.String NOSLASH_GROUP
public static final java.lang.String PDF_LINK_PREFIX
public static final java.lang.String PDF_LINK_REGEX
public static final java.util.regex.Pattern PDF_LINK_REGEX_COMPILED
public CmsPdfLink(CmsObject cms, CmsResource formatter, CmsResource content) throws CmsException
cms
- the current CMS contextformatter
- the formatter resourcecontent
- the content resourceCmsException
- if something goes wrongpublic CmsPdfLink(CmsObject cms, java.lang.String link) throws CmsPdfLink.CmsPdfLinkParseException, CmsException
cms
- the current CMS contextlink
- the link as a stringCmsPdfLink.CmsPdfLinkParseException
- if the given link is not a PDF linkCmsException
- if something else goes wrongpublic CmsResource getContent()
public CmsResource getFormatter()
public java.lang.String getLink()
public java.util.Locale getLocale()