@@ -70,86 +70,100 @@ private static void validateInput(Object input) {
70
70
}
71
71
}
72
72
73
- public static String createXML (InvoiceInputModel input , XMLBuilderConfig config ) {
73
+ public static DocumentWrapper < InvoiceOutputModel > createXML (InvoiceInputModel input , XMLBuilderConfig config ) {
74
74
validateInput (input );
75
75
InvoiceOutputModel output = InputToOutput .toOutput (input , config , getDefaultSystemClock ());
76
- return FreemarkerExecutor .createXML (output );
76
+ String xml = FreemarkerExecutor .createXML (output );
77
+ return new DocumentWrapper <>(xml , output );
77
78
}
78
79
79
- public static String createXML (InvoiceInputModel input , XMLBuilderConfig config , SystemClock systemClock ) {
80
+ public static DocumentWrapper < InvoiceOutputModel > createXML (InvoiceInputModel input , XMLBuilderConfig config , SystemClock systemClock ) {
80
81
validateInput (input );
81
82
InvoiceOutputModel output = InputToOutput .toOutput (input , config , systemClock );
82
- return FreemarkerExecutor .createXML (output );
83
+ String xml = FreemarkerExecutor .createXML (output );
84
+ return new DocumentWrapper <>(xml , output );
83
85
}
84
86
85
- public static String createXML (CreditNoteInputModel input , XMLBuilderConfig config ) {
87
+ public static DocumentWrapper < CreditNoteOutputModel > createXML (CreditNoteInputModel input , XMLBuilderConfig config ) {
86
88
validateInput (input );
87
89
CreditNoteOutputModel output = InputToOutput .toOutput (input , config , getDefaultSystemClock ());
88
- return FreemarkerExecutor .createXML (output );
90
+ String xml = FreemarkerExecutor .createXML (output );
91
+ return new DocumentWrapper <>(xml , output );
89
92
}
90
93
91
- public static String createXML (CreditNoteInputModel input , XMLBuilderConfig config , SystemClock systemClock ) {
94
+ public static DocumentWrapper < CreditNoteOutputModel > createXML (CreditNoteInputModel input , XMLBuilderConfig config , SystemClock systemClock ) {
92
95
validateInput (input );
93
96
CreditNoteOutputModel output = InputToOutput .toOutput (input , config , systemClock );
94
- return FreemarkerExecutor .createXML (output );
97
+ String xml = FreemarkerExecutor .createXML (output );
98
+ return new DocumentWrapper <>(xml , output );
95
99
}
96
100
97
- public static String createXML (DebitNoteInputModel input , XMLBuilderConfig config ) {
101
+ public static DocumentWrapper < DebitNoteOutputModel > createXML (DebitNoteInputModel input , XMLBuilderConfig config ) {
98
102
validateInput (input );
99
103
DebitNoteOutputModel output = InputToOutput .toOutput (input , config , getDefaultSystemClock ());
100
- return FreemarkerExecutor .createXML (output );
104
+ String xml = FreemarkerExecutor .createXML (output );
105
+ return new DocumentWrapper <>(xml , output );
101
106
}
102
107
103
- public static String createXML (DebitNoteInputModel input , XMLBuilderConfig config , SystemClock systemClock ) {
108
+ public static DocumentWrapper < DebitNoteOutputModel > createXML (DebitNoteInputModel input , XMLBuilderConfig config , SystemClock systemClock ) {
104
109
DebitNoteOutputModel output = InputToOutput .toOutput (input , config , systemClock );
105
- return FreemarkerExecutor .createXML (output );
110
+ String xml = FreemarkerExecutor .createXML (output );
111
+ return new DocumentWrapper <>(xml , output );
106
112
}
107
113
108
- public static String createXML (VoidedDocumentInputModel input , XMLBuilderConfig config ) {
114
+ public static DocumentWrapper < VoidedDocumentOutputModel > createXML (VoidedDocumentInputModel input , XMLBuilderConfig config ) {
109
115
validateInput (input );
110
116
VoidedDocumentOutputModel output = InputToOutput .toOutput (input , config , getDefaultSystemClock ());
111
- return FreemarkerExecutor .createXML (output );
117
+ String xml = FreemarkerExecutor .createXML (output );
118
+ return new DocumentWrapper <>(xml , output );
112
119
}
113
120
114
- public static String createXML (VoidedDocumentInputModel input , XMLBuilderConfig config , SystemClock systemClock ) {
121
+ public static DocumentWrapper < VoidedDocumentOutputModel > createXML (VoidedDocumentInputModel input , XMLBuilderConfig config , SystemClock systemClock ) {
115
122
validateInput (input );
116
123
VoidedDocumentOutputModel output = InputToOutput .toOutput (input , config , systemClock );
117
- return FreemarkerExecutor .createXML (output );
124
+ String xml = FreemarkerExecutor .createXML (output );
125
+ return new DocumentWrapper <>(xml , output );
118
126
}
119
127
120
- public static String createXML (SummaryDocumentInputModel input , XMLBuilderConfig config ) {
128
+ public static DocumentWrapper < SummaryDocumentOutputModel > createXML (SummaryDocumentInputModel input , XMLBuilderConfig config ) {
121
129
validateInput (input );
122
130
SummaryDocumentOutputModel output = InputToOutput .toOutput (input , config , getDefaultSystemClock ());
123
- return FreemarkerExecutor .createXML (output );
131
+ String xml = FreemarkerExecutor .createXML (output );
132
+ return new DocumentWrapper <>(xml , output );
124
133
}
125
134
126
- public static String createXML (SummaryDocumentInputModel input , XMLBuilderConfig config , SystemClock systemClock ) {
135
+ public static DocumentWrapper < SummaryDocumentOutputModel > createXML (SummaryDocumentInputModel input , XMLBuilderConfig config , SystemClock systemClock ) {
127
136
validateInput (input );
128
137
SummaryDocumentOutputModel output = InputToOutput .toOutput (input , config , systemClock );
129
- return FreemarkerExecutor .createXML (output );
138
+ String xml = FreemarkerExecutor .createXML (output );
139
+ return new DocumentWrapper <>(xml , output );
130
140
}
131
141
132
- public static String createXML (PerceptionInputModel input , XMLBuilderConfig config ) {
142
+ public static DocumentWrapper < PerceptionOutputModel > createXML (PerceptionInputModel input , XMLBuilderConfig config ) {
133
143
validateInput (input );
134
144
PerceptionOutputModel output = InputToOutput .toOutput (input , config , getDefaultSystemClock ());
135
- return FreemarkerExecutor .createXML (output );
145
+ String xml = FreemarkerExecutor .createXML (output );
146
+ return new DocumentWrapper <>(xml , output );
136
147
}
137
148
138
- public static String createXML (PerceptionInputModel input , XMLBuilderConfig config , SystemClock systemClock ) {
149
+ public static DocumentWrapper < PerceptionOutputModel > createXML (PerceptionInputModel input , XMLBuilderConfig config , SystemClock systemClock ) {
139
150
validateInput (input );
140
151
PerceptionOutputModel output = InputToOutput .toOutput (input , config , systemClock );
141
- return FreemarkerExecutor .createXML (output );
152
+ String xml = FreemarkerExecutor .createXML (output );
153
+ return new DocumentWrapper <>(xml , output );
142
154
}
143
155
144
- public static String createXML (RetentionInputModel input , XMLBuilderConfig config ) {
156
+ public static DocumentWrapper < RetentionOutputModel > createXML (RetentionInputModel input , XMLBuilderConfig config ) {
145
157
validateInput (input );
146
158
RetentionOutputModel output = InputToOutput .toOutput (input , config , getDefaultSystemClock ());
147
- return FreemarkerExecutor .createXML (output );
159
+ String xml = FreemarkerExecutor .createXML (output );
160
+ return new DocumentWrapper <>(xml , output );
148
161
}
149
162
150
- public static String createXML (RetentionInputModel input , XMLBuilderConfig config , SystemClock systemClock ) {
163
+ public static DocumentWrapper < RetentionOutputModel > createXML (RetentionInputModel input , XMLBuilderConfig config , SystemClock systemClock ) {
151
164
validateInput (input );
152
165
RetentionOutputModel output = InputToOutput .toOutput (input , config , systemClock );
153
- return FreemarkerExecutor .createXML (output );
166
+ String xml = FreemarkerExecutor .createXML (output );
167
+ return new DocumentWrapper <>(xml , output );
154
168
}
155
169
}
0 commit comments