Class TemplateDataType

  • All Implemented Interfaces:
    FileDataType<byte[]>

    public class TemplateDataType
    extends Object
    implements FileDataType<byte[]>
     <?xml version="1.0" encoding="UTF-8"?><p xmlns:p383362_="https://jakarta.ee/xml/ns/jaxb" xmlns:p837822_="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:tns="http://schema.webpdf.de/1.0/operation" xmlns:xs="http://www.w3.org/2001/XMLSchema">Contains the Base64-encoded JSON structure that is used as variables in the HTML template if "useAsTemplate" has a value of "true".</p>
     
     <?xml version="1.0" encoding="UTF-8"?><p xmlns:p383362_="https://jakarta.ee/xml/ns/jaxb" xmlns:p837822_="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:tns="http://schema.webpdf.de/1.0/operation" xmlns:xs="http://www.w3.org/2001/XMLSchema">Example for data as JSON structure:</p>
     
     <?xml version="1.0" encoding="UTF-8"?><pre xmlns:p383362_="https://jakarta.ee/xml/ns/jaxb" xmlns:p837822_="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:tns="http://schema.webpdf.de/1.0/operation" xmlns:xs="http://www.w3.org/2001/XMLSchema" class="language-json">
                         
     {
         "page1": "Text for page 1",
         "page2": "Text for page 2",
         "page3": "Text for page 3",
         "image": {
         "name": "Warning!",
         "data": "... BASE64 encoded image ..."
         }
     }
     
                     </pre>
     
     <?xml version="1.0" encoding="UTF-8"?><p xmlns:p383362_="https://jakarta.ee/xml/ns/jaxb" xmlns:p837822_="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:tns="http://schema.webpdf.de/1.0/operation" xmlns:xs="http://www.w3.org/2001/XMLSchema">Within the HTML document, the "custom." prefix will be prepended to each variable from the JSON structure. The variables can then be used as follows in the HTML code:</p>
     
     <?xml version="1.0" encoding="UTF-8"?><pre xmlns:p383362_="https://jakarta.ee/xml/ns/jaxb" xmlns:p837822_="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:tns="http://schema.webpdf.de/1.0/operation" xmlns:xs="http://www.w3.org/2001/XMLSchema" class="language-html">
                         
     &lt;body&gt;
         &lt;div class="page"&gt;
             &lt;h1&gt;This is Page 1&lt;/h1&gt;
             &lt;i&gt;${custom.page1}&lt;/i&gt;
             &lt;br/&gt;
             ${custom.image.name}
             &lt;img src="${custom.image.data}" width="100" height="100"/&gt;
         &lt;/div&gt;
         &lt;div class="page"&gt;
             &lt;h1&gt;This is Page 2&lt;/h1&gt;
             &lt;b&gt;${custom.page2}&lt;/b&gt;
         &lt;/div&gt;
         &lt;div class="page"&gt;
             &lt;h1&gt;This is Page 3&lt;/h1&gt;
             &lt;u&gt;${custom.page3}&lt;/u&gt;
         &lt;/div&gt;
     &lt;/body&gt;
     
                     </pre>
     
     <?xml version="1.0" encoding="UTF-8"?><p xmlns:p383362_="https://jakarta.ee/xml/ns/jaxb" xmlns:p837822_="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:tns="http://schema.webpdf.de/1.0/operation" xmlns:xs="http://www.w3.org/2001/XMLSchema">For more information regarding the use of the templates, please refer to the chapter "Server Conversion - Templates" document.</p>
     

    Java class for TemplateDataType complex type.

    The following schema fragment specifies the expected content contained within this class.

    
     <complexType name="TemplateDataType">
       <simpleContent>
         <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
           <attGroup ref="{http://schema.webpdf.de/1.0/operation}FileDataGroup"/>
         </extension>
       </simpleContent>
     </complexType>
     
    • Constructor Detail

      • TemplateDataType

        public TemplateDataType()
    • Method Detail

      • getValue

        public byte[] getValue()
        Gets the value of the value property.
        Specified by:
        getValue in interface FileDataType<byte[]>
        Returns:
        possible object is byte[]
      • setValue

        public void setValue​(byte[] value)
        Sets the value of the value property.
        Specified by:
        setValue in interface FileDataType<byte[]>
        Parameters:
        value - allowed object is byte[]
      • isSetValue

        public boolean isSetValue()
        Description copied from interface: FileDataType
        Returns true, if a direct byte value has been set.
        Specified by:
        isSetValue in interface FileDataType<byte[]>
        Returns:
        true, if a direct byte value has been set.
      • isSetSource

        public boolean isSetSource()
        Description copied from interface: FileDataType
        Returns true, if a file data source has been set.
        Specified by:
        isSetSource in interface FileDataType<byte[]>
        Returns:
        true, if a file data source has been set.
      • getUri

        public String getUri()
        Gets the value of the uri property.
        Specified by:
        getUri in interface FileDataType<byte[]>
        Returns:
        possible object is String
      • setUri

        public void setUri​(String value)
        Sets the value of the uri property.
        Specified by:
        setUri in interface FileDataType<byte[]>
        Parameters:
        value - allowed object is String
      • isSetUri

        public boolean isSetUri()
        Description copied from interface: FileDataType
        Returns true, if a file source URI has been set.
        Specified by:
        isSetUri in interface FileDataType<byte[]>
        Returns:
        true, if a file source URI has been set.