Class D3Code
- java.lang.Object
-
- com.cloudofficeprint.RenderElements.RenderElement
-
- com.cloudofficeprint.RenderElements.D3Code
-
public class D3Code extends RenderElement
With Word/Excel/PowerPoint documents, it's possible to let Cloud Office Print execute some JavaScript code to generate a D3 image (Data Driven Documents).
-
-
Constructor Summary
Constructors Constructor Description D3Code(java.lang.String name, java.lang.String code, java.lang.String data)
Represents an D3 image.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getData()
com.google.gson.JsonObject
getJSON()
java.util.Set<java.lang.String>
getTemplateTags()
void
setData(java.lang.String data)
-
Methods inherited from class com.cloudofficeprint.RenderElements.RenderElement
getName, getValue, setName, setValue
-
-
-
-
Constructor Detail
-
D3Code
public D3Code(java.lang.String name, java.lang.String code, java.lang.String data)
Represents an D3 image.- Parameters:
name
- Name of the D3 for the tag.code
- Code to generate the image.data
- Global data the code has access to. Optional : use null if you don't want to specify it.
-
-
Method Detail
-
getData
public java.lang.String getData()
- Returns:
- Global data the code has access to. You can access it in the JS code through with global.data or just data.
-
setData
public void setData(java.lang.String data)
- Parameters:
data
- Global data the code has access to. You can access it in the JS code through with global.data or just data.
-
getJSON
public com.google.gson.JsonObject getJSON()
- Specified by:
getJSON
in classRenderElement
- Returns:
- JSONObject with the tags for this element for the Cloud Office Print server.
-
getTemplateTags
public java.util.Set<java.lang.String> getTemplateTags()
- Specified by:
getTemplateTags
in classRenderElement
- Returns:
- An immutable set containing all available template tags this element can replace.
-
-