Package net.webpdf.wsclient.openapi
Class OperationTemplateData
- java.lang.Object
-
- net.webpdf.wsclient.openapi.OperationTemplateData
-
public class OperationTemplateData extends Object
Contains the Base64-encoded JSON structure that is used as variables in the HTML template if \"useAsTemplate\" has a value of \"true\". Example for data as JSON structure: ```json { \"page1\": \"Text for page 1\", \"page2\": \"Text for page 2\", \"page3\": \"Text for page 3\", \"image\": { \"name\": \"Warning!\", \"data\": \"... BASE64 encoded image ...\" } } ``` 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: ```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> ``` For more information regarding the use of the templates, please refer to the chapter \"Server Conversion - Templates\" document.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOperationTemplateData.SourceEnumSelects the data source for the hereby expressed resource.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_SOURCEstatic StringJSON_PROPERTY_URIstatic StringJSON_PROPERTY_VALUE
-
Constructor Summary
Constructors Constructor Description OperationTemplateData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)@Nullable OperationTemplateData.SourceEnumgetSource()Selects the data source for the hereby expressed resource.@Nullable StringgetUri()The uri the data shall be located at.@org.jetbrains.annotations.Nullable byte[]getValue()Get valueinthashCode()voidsetSource(OperationTemplateData.SourceEnum source)voidsetUri(String uri)voidsetValue(byte[] value)OperationTemplateDatasource(OperationTemplateData.SourceEnum source)StringtoString()OperationTemplateDatauri(String uri)OperationTemplateDatavalue(byte[] value)
-
-
-
Field Detail
-
JSON_PROPERTY_SOURCE
public static final String JSON_PROPERTY_SOURCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_URI
public static final String JSON_PROPERTY_URI
- See Also:
- Constant Field Values
-
JSON_PROPERTY_VALUE
public static final String JSON_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
source
public OperationTemplateData source(OperationTemplateData.SourceEnum source)
-
getSource
@Nullable public @Nullable OperationTemplateData.SourceEnum getSource()
Selects the data source for the hereby expressed resource. Possible values are: * value = The element's value shall contain the BASE64 encoded data. * uri = The data shall be located at the given uri.- Returns:
- source
-
setSource
public void setSource(OperationTemplateData.SourceEnum source)
-
uri
public OperationTemplateData uri(String uri)
-
getUri
@Nullable public @Nullable String getUri()
The uri the data shall be located at. (This shall only have effect, if the \"source\" is \"uri\".)- Returns:
- uri
-
setUri
public void setUri(String uri)
-
value
public OperationTemplateData value(byte[] value)
-
getValue
@Nullable public @org.jetbrains.annotations.Nullable byte[] getValue()
Get value- Returns:
- value
-
setValue
public void setValue(byte[] value)
-
-