Package org.opencms.jsp
Class CmsJspTagPdf
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.opencms.jsp.CmsJspTagPdf
- All Implemented Interfaces:
Serializable,javax.servlet.jsp.tagext.BodyTag,javax.servlet.jsp.tagext.IterationTag,javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.tagext.Tag,I_CmsJspTagParamParent
public class CmsJspTagPdf
extends javax.servlet.jsp.tagext.BodyTagSupport
implements I_CmsJspTagParamParent
JSP tag to generate a link to a PDF produced from a given XML content.
- See Also:
-
Field Summary
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContentFields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAGFields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParameter(String name, String value) Add a parameter to this tag.intdoEndTag()intstatic StringpdfTagAction(javax.servlet.ServletRequest request, String format, String content, String localeStr, String filename, SortedMap<String, String> params, String paramEncoding) The implementation of the tag.voidsetContent(String content) Setter for the content path.voidsetFilename(String filename) Sets the file name for the PDF download link.voidSetter for the format path.voidSets the locale to use for the PDF link.voidsetParamEncoding(String encoding) Sets the parameter encoding.Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContentMethods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
-
Constructor Details
-
CmsJspTagPdf
public CmsJspTagPdf()
-
-
Method Details
-
pdfTagAction
public static String pdfTagAction(javax.servlet.ServletRequest request, String format, String content, String localeStr, String filename, SortedMap<String, String> params, String paramEncoding) throws CmsExceptionThe implementation of the tag.- Parameters:
request- the current requestformat- the format pathcontent- the content pathlocaleStr- the name of the locale to include in the PDF linkparams- map of parametersparamEncoding- the character encoding to use for URL parameters- Returns:
- the link to the PDF
- Throws:
CmsException- if something goes wrong
-
addParameter
Description copied from interface:I_CmsJspTagParamParentAdd a parameter to this tag. The intent is that the <param> subtag will call this to register parameters. Assumes that 'name' and 'value' are appropriately encoded and do not contain any meaningful metacharacters; in order words, escaping is the responsibility of the caller.- Specified by:
addParameterin interfaceI_CmsJspTagParamParent- Parameters:
name- the name of the parametervalue- the value of the parameter- See Also:
-
doEndTag
- Specified by:
doEndTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjavax.servlet.jsp.tagext.BodyTagSupport- See Also:
-
doStartTag
- Specified by:
doStartTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjavax.servlet.jsp.tagext.BodyTagSupport- See Also:
-
setContent
Setter for the content path.- Parameters:
content- the content path
-
setFilename
Sets the file name for the PDF download link.- Parameters:
filename- the file name
-
setFormat
Setter for the format path.- Parameters:
format- the format path
-
setLocale
Sets the locale to use for the PDF link.- Parameters:
locale- the locale to use
-
setParamEncoding
Sets the parameter encoding.- Parameters:
encoding- the parameter encoding
-