Class CmsJspTagPdf

  • All Implemented Interfaces:
    java.io.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:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport

        bodyContent
      • Fields inherited from class javax.servlet.jsp.tagext.TagSupport

        id, pageContext
      • Fields inherited from interface javax.servlet.jsp.tagext.BodyTag

        EVAL_BODY_BUFFERED, EVAL_BODY_TAG
      • Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

        EVAL_BODY_AGAIN
      • Fields inherited from interface javax.servlet.jsp.tagext.Tag

        EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsJspTagPdf()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addParameter​(java.lang.String name, java.lang.String value)
      Add a parameter to this tag.
      int doEndTag()  
      int doStartTag()  
      static java.lang.String pdfTagAction​(javax.servlet.ServletRequest request, java.lang.String format, java.lang.String content, java.lang.String localeStr, java.lang.String filename, java.util.SortedMap<java.lang.String,​java.lang.String> params, java.lang.String paramEncoding)
      The implementation of the tag.
      void setContent​(java.lang.String content)
      Setter for the content path.
      void setFilename​(java.lang.String filename)
      Sets the file name for the PDF download link.
      void setFormat​(java.lang.String format)
      Setter for the format path.
      void setLocale​(java.lang.String locale)
      Sets the locale to use for the PDF link.
      void setParamEncoding​(java.lang.String encoding)
      Sets the parameter encoding.
      • Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport

        doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
      • Methods inherited from class javax.servlet.jsp.tagext.TagSupport

        findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.servlet.jsp.tagext.Tag

        getParent, setPageContext, setParent
    • Method Detail

      • pdfTagAction

        public static java.lang.String pdfTagAction​(javax.servlet.ServletRequest request,
                                                    java.lang.String format,
                                                    java.lang.String content,
                                                    java.lang.String localeStr,
                                                    java.lang.String filename,
                                                    java.util.SortedMap<java.lang.String,​java.lang.String> params,
                                                    java.lang.String paramEncoding)
                                             throws CmsException
        The implementation of the tag.

        Parameters:
        request - the current request
        format - the format path
        content - the content path
        localeStr - the name of the locale to include in the PDF link
        params - map of parameters
        paramEncoding - the character encoding to use for URL parameters
        Returns:
        the link to the PDF
        Throws:
        CmsException - if something goes wrong
      • doEndTag

        public int doEndTag()
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
        See Also:
        BodyTagSupport.doEndTag()
      • doStartTag

        public int doStartTag()
        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
        See Also:
        Tag.doStartTag()
      • setContent

        public void setContent​(java.lang.String content)
        Setter for the content path.

        Parameters:
        content - the content path
      • setFilename

        public void setFilename​(java.lang.String filename)
        Sets the file name for the PDF download link.
        Parameters:
        filename - the file name
      • setFormat

        public void setFormat​(java.lang.String format)
        Setter for the format path.

        Parameters:
        format - the format path
      • setLocale

        public void setLocale​(java.lang.String locale)
        Sets the locale to use for the PDF link.

        Parameters:
        locale - the locale to use
      • setParamEncoding

        public void setParamEncoding​(java.lang.String encoding)
        Sets the parameter encoding.
        Parameters:
        encoding - the parameter encoding