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

    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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addParameter(String name, String value)
    Add a parameter to this tag.
    int
     
    int
     
    static String
    pdfTagAction(javax.servlet.ServletRequest request, String format, String content, String localeStr, String filename, SortedMap<String,String> params, String paramEncoding)
    The implementation of the tag.
    void
    setContent(String content)
    Setter for the content path.
    void
    setFilename(String filename)
    Sets the file name for the PDF download link.
    void
    setFormat(String format)
    Setter for the format path.
    void
    setLocale(String locale)
    Sets the locale to use for the PDF link.
    void
    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
  • Constructor Details

  • 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 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
    • addParameter

      public void addParameter(String name, String value)
      Description copied from interface: I_CmsJspTagParamParent
      Add 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:
      addParameter in interface I_CmsJspTagParamParent
      Parameters:
      name - the name of the parameter
      value - the value of the parameter
      See Also:
    • 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(String content)
      Setter for the content path.

      Parameters:
      content - the content path
    • setFilename

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

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

      Parameters:
      format - the format path
    • setLocale

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

      Parameters:
      locale - the locale to use
    • setParamEncoding

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