-
Notifications
You must be signed in to change notification settings - Fork 0
/
DlexInput.java
88 lines (74 loc) · 3.09 KB
/
DlexInput.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package com.dynamicpdf.api;
/**
* Represents a Dlex input.
*/
public class DlexInput extends Input {
private String layoutDataResourceName;
/**
* Initializes a new instance of the <code>DlexInput</code> class by posting the
* DLEX file and the JSON data file from the client to the API to create the PDF report.
* @param dlexResource The <code>DlexResource</code>, dlex file created as per the desired PDF report layout design.
* @param layoutData The <code>LayoutDataResource</code>, json data file used to create the PDF report.
*/
public DlexInput(DlexResource dlexResource, LayoutDataResource layoutData) {
super();
setResourceName(dlexResource.getResourceName());
layoutDataResourceName = layoutData.getLayoutDataResourceName();
getResources().add(dlexResource);
getResources().add(layoutData);
}
/**
* Initializes a new instance of the <code>DlexInput</code> class by posting the
* DLEX file and the JSON data file from the client to the API to create the PDF report.
* @param dlexResource The <code>DlexResource</code>, dlex file created as per the desired PDF report layout design.
* @param layoutData The json data string used to create the PDF report.
*/
public DlexInput(DlexResource dlexResource, String layoutData) {
setResourceName(dlexResource.getResourceName());
LayoutDataResource layoutDataResource = new LayoutDataResource(layoutData);
layoutDataResourceName = layoutDataResource.getLayoutDataResourceName();
getResources().add(dlexResource);
getResources().add(layoutDataResource);
}
/**
* Initializes a new instance of the <code>DlexInput</code> class by taking the
* DLEX file path that is present in the cloud environment and the JSON data file from the client.
* @param cloudResourcePath The DLEX file path present in the resource manager.
* @param layoutData The <code>LayoutDataResource</code>, json data file used to create the PDF report.
*/
public DlexInput(String cloudResourcePath, LayoutDataResource layoutData) {
super();
setResourceName(cloudResourcePath);
layoutDataResourceName = layoutData.getLayoutDataResourceName();
getResources().add(layoutData);
}
/**
* Initializes a new instance of the <code>DlexInput</code> class.
* @param cloudResourcePath The DLEX file path present in the resource manager.
* @param layoutData The json data string used to create the PDF report.
*/
public DlexInput(String cloudResourcePath, String layoutData) {
super();
setResourceName(cloudResourcePath);
LayoutDataResource layoutDataResource = new LayoutDataResource(layoutData);
layoutDataResourceName = layoutDataResource.getLayoutDataResourceName();
getResources().add(layoutDataResource);
}
InputType getType() {
return InputType.DLEX;
}
/**
* Gets the name for layout data resource.
* @return The Name of Layout Data Resource
*/
public String getLayoutDataResourceName() {
return layoutDataResourceName;
}
/**
* sets the name for layout data resource.
* @param value The name for layout data resource.
*/
public void setLayoutDataResourceName(String value) {
layoutDataResourceName = value;
}
}