Class TemplateDataType
- java.lang.Object
-
- net.webpdf.wsclient.schema.operation.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"> <body> <div class="page"> <h1>This is Page 1</h1> <i>${custom.page1}</i> <br/> ${custom.image.name} <img src="${custom.image.data}" width="100" height="100"/> </div> <div class="page"> <h1>This is Page 2</h1> <b>${custom.page2}</b> </div> <div class="page"> <h1>This is Page 3</h1> <u>${custom.page3}</u> </div> </body> </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>
-
-
Field Summary
Fields Modifier and Type Field Description protected FileDataSourceTypesourceprotected Stringuriprotected byte[]value
-
Constructor Summary
Constructors Constructor Description TemplateDataType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileDataSourceTypegetSource()Gets the value of the source property.StringgetUri()Gets the value of the uri property.byte[]getValue()Gets the value of the value property.booleanisSetSource()Returnstrue, if a file data source has been set.booleanisSetUri()Returnstrue, if a file source URI has been set.booleanisSetValue()Returnstrue, if a direct byte value has been set.voidsetSource(FileDataSourceType value)Sets the value of the source property.voidsetUri(String value)Sets the value of the uri property.voidsetValue(byte[] value)Sets the value of the value property.
-
-
-
Field Detail
-
value
protected byte[] value
-
source
protected FileDataSourceType source
-
uri
protected String uri
-
-
Method Detail
-
getValue
public byte[] getValue()
Gets the value of the value property.- Specified by:
getValuein interfaceFileDataType<byte[]>- Returns:
- possible object is byte[]
-
setValue
public void setValue(byte[] value)
Sets the value of the value property.- Specified by:
setValuein interfaceFileDataType<byte[]>- Parameters:
value- allowed object is byte[]
-
isSetValue
public boolean isSetValue()
Description copied from interface:FileDataTypeReturnstrue, if a direct byte value has been set.- Specified by:
isSetValuein interfaceFileDataType<byte[]>- Returns:
true, if a direct byte value has been set.
-
getSource
public FileDataSourceType getSource()
Gets the value of the source property.- Specified by:
getSourcein interfaceFileDataType<byte[]>- Returns:
- possible object is
FileDataSourceType
-
setSource
public void setSource(FileDataSourceType value)
Sets the value of the source property.- Specified by:
setSourcein interfaceFileDataType<byte[]>- Parameters:
value- allowed object isFileDataSourceType
-
isSetSource
public boolean isSetSource()
Description copied from interface:FileDataTypeReturnstrue, if a file data source has been set.- Specified by:
isSetSourcein interfaceFileDataType<byte[]>- Returns:
true, if a file data source has been set.
-
getUri
public String getUri()
Gets the value of the uri property.- Specified by:
getUriin interfaceFileDataType<byte[]>- Returns:
- possible object is
String
-
setUri
public void setUri(String value)
Sets the value of the uri property.- Specified by:
setUriin interfaceFileDataType<byte[]>- Parameters:
value- allowed object isString
-
isSetUri
public boolean isSetUri()
Description copied from interface:FileDataTypeReturnstrue, if a file source URI has been set.- Specified by:
isSetUriin interfaceFileDataType<byte[]>- Returns:
true, if a file source URI has been set.
-
-