karavan-core 4.8.0 → 99.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of karavan-core might be problematic. Click here for more details.
- package/index.js +3 -0
- package/package.json +8 -58
- package/.bebelrc +0 -3
- package/.mocharc.json +0 -11
- package/.prettierignore +0 -9
- package/.prettierrc +0 -14
- package/src/core/api/CamelDefinitionApi.ts +0 -3271
- package/src/core/api/CamelDefinitionApiExt.ts +0 -757
- package/src/core/api/CamelDefinitionYaml.ts +0 -412
- package/src/core/api/CamelDefinitionYamlStep.ts +0 -4733
- package/src/core/api/CamelDisplayUtil.ts +0 -143
- package/src/core/api/CamelUtil.ts +0 -360
- package/src/core/api/ComponentApi.ts +0 -368
- package/src/core/api/KameletApi.ts +0 -147
- package/src/core/api/MainConfigurationApi.ts +0 -47
- package/src/core/api/ProjectModelApi.ts +0 -75
- package/src/core/api/SpiBeanApi.ts +0 -104
- package/src/core/api/TemplateApi.ts +0 -58
- package/src/core/api/TopologyUtils.ts +0 -392
- package/src/core/api/VariableUtil.ts +0 -104
- package/src/core/model/CamelDefinition.ts +0 -3783
- package/src/core/model/CamelMetadata.ts +0 -2714
- package/src/core/model/ComponentModels.ts +0 -106
- package/src/core/model/IntegrationDefinition.ts +0 -188
- package/src/core/model/KameletModels.ts +0 -223
- package/src/core/model/MainConfigurationModel.ts +0 -37
- package/src/core/model/ProjectModel.ts +0 -43
- package/src/core/model/SpiBeanModels.ts +0 -53
- package/src/core/model/TopologyDefinition.ts +0 -117
- package/test/addStep.spec.ts +0 -124
- package/test/addStep1.yaml +0 -27
- package/test/allowableValues.camel.yaml +0 -19
- package/test/allowableValues.spec.ts +0 -30
- package/test/avro-serialize-action.kamelet.yaml +0 -70
- package/test/beans.spec.ts +0 -92
- package/test/beans1.yaml +0 -36
- package/test/beans2.yaml +0 -42
- package/test/beans3.yaml +0 -7
- package/test/checkRequired.spec.ts +0 -53
- package/test/circuitBreaker.spec.ts +0 -57
- package/test/circuitBreaker.yaml +0 -19
- package/test/cloneDefinition.spec.ts +0 -106
- package/test/createKamelet.spec.ts +0 -38
- package/test/cxf.json +0 -615
- package/test/cxf.spec.ts +0 -44
- package/test/cxf.yaml +0 -15
- package/test/deleteStep.spec.ts +0 -74
- package/test/demo.spec.ts +0 -49
- package/test/demo.yaml +0 -32
- package/test/doCatchOnWhen.camel.yaml +0 -20
- package/test/doCatchOnWhen.spec.ts +0 -36
- package/test/errorHandler.spec.ts +0 -38
- package/test/errorHandler1.yaml +0 -27
- package/test/expression.spec.ts +0 -55
- package/test/findStep.spec.ts +0 -112
- package/test/findStep.yaml +0 -65
- package/test/getElementProperties.spec.ts +0 -32
- package/test/getElementPropertiesByName.spec.ts +0 -31
- package/test/getExpressionLanguage.spec.ts +0 -40
- package/test/hasElementWithId.camel.yaml +0 -98
- package/test/hasElementWithId.spec.ts +0 -57
- package/test/hasElementWithId1.camel.yaml +0 -16
- package/test/hasElementWithIdError.camel.yaml +0 -98
- package/test/integration.spec.ts +0 -60
- package/test/integration1.yaml +0 -24
- package/test/integration2.yaml +0 -23
- package/test/integrationToYaml.spec.ts +0 -51
- package/test/intercept.spec.ts +0 -62
- package/test/intercept.yaml +0 -19
- package/test/is-not-integration.yaml +0 -5114
- package/test/isIntegration.spec.ts +0 -45
- package/test/kamelet.spec.ts +0 -61
- package/test/metadata/components.json +0 -697
- package/test/metadata/kamelets.yaml +0 -23414
- package/test/metadata/spiBeans.json +0 -3094
- package/test/multiObjectProperties.spec.ts +0 -46
- package/test/multiObjectProperties1.yaml +0 -19
- package/test/multiple.spec.ts +0 -38
- package/test/multiple.yaml +0 -29
- package/test/openapi.spec.ts +0 -48
- package/test/openapi.yaml +0 -7
- package/test/placeholder.spec.ts +0 -32
- package/test/placeholder.yaml +0 -133
- package/test/plain-try-catch.yaml +0 -31
- package/test/plain.spec.ts +0 -72
- package/test/plain1.yaml +0 -22
- package/test/plain2.yaml +0 -13
- package/test/plain3.yaml +0 -5
- package/test/plain4.yaml +0 -5
- package/test/postgresql-source.kamelet.yaml +0 -113
- package/test/restConfigDsl.yaml +0 -15
- package/test/restDsl.spec.ts +0 -83
- package/test/restDsl.yaml +0 -29
- package/test/routes.spec.ts +0 -37
- package/test/routes1.yaml +0 -31
- package/test/supported-components.json +0 -1221
- package/test/supportedComponents.spec.ts +0 -34
- package/test/template1.AggregationStrategy.java +0 -21
- package/test/template1.Processor.java +0 -13
- package/test/template2.AggregationStrategy.java +0 -21
- package/test/template2.Processor.java +0 -13
- package/test/templateApi.spec.ts +0 -45
- package/test/timer-source.kamelet.yaml +0 -75
- package/test/tod.spec.ts +0 -31
- package/test/tod.yaml +0 -9
- package/test/topology.spec.ts +0 -51
- package/test/topology1.camel.yaml +0 -56
- package/test/topology2.camel.yaml +0 -44
- package/test/topology3.camel.yaml +0 -27
- package/test/tsconfig.testing.json +0 -14
- package/test/updateStep.spec.ts +0 -72
- package/test/variable1.camel.yaml +0 -42
- package/test/variable2.camel.yaml +0 -42
- package/test/variables.spec.ts +0 -34
- package/tsconfig.json +0 -34
@@ -1,4733 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Licensed to the Apache Software Foundation (ASF) under one or more
|
3
|
-
* contributor license agreements. See the NOTICE file distributed with
|
4
|
-
* this work for additional information regarding copyright ownership.
|
5
|
-
* The ASF licenses this file to You under the Apache License, Version 2.0
|
6
|
-
* (the "License"); you may not use this file except in compliance with
|
7
|
-
* the License. You may obtain a copy of the License at
|
8
|
-
*
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
*
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
* See the License for the specific language governing permissions and
|
15
|
-
* limitations under the License.
|
16
|
-
*/
|
17
|
-
|
18
|
-
/**
|
19
|
-
* Generated by karavan build tools - do NOT edit this file!
|
20
|
-
*/
|
21
|
-
import {CamelElement} from "../model/IntegrationDefinition";
|
22
|
-
import {
|
23
|
-
|
24
|
-
ProcessorDefinition,
|
25
|
-
BeansDeserializer,
|
26
|
-
ErrorHandlerDeserializer,
|
27
|
-
OutputAwareFromDefinition,
|
28
|
-
AggregateDefinition,
|
29
|
-
BeanDefinition,
|
30
|
-
BeanFactoryDefinition,
|
31
|
-
CatchDefinition,
|
32
|
-
ChoiceDefinition,
|
33
|
-
CircuitBreakerDefinition,
|
34
|
-
ClaimCheckDefinition,
|
35
|
-
ContextScanDefinition,
|
36
|
-
ConvertBodyDefinition,
|
37
|
-
ConvertHeaderDefinition,
|
38
|
-
ConvertVariableDefinition,
|
39
|
-
DataFormatDefinition,
|
40
|
-
DelayDefinition,
|
41
|
-
DynamicRouterDefinition,
|
42
|
-
EnrichDefinition,
|
43
|
-
ErrorHandlerDefinition,
|
44
|
-
ExpressionSubElementDefinition,
|
45
|
-
FaultToleranceConfigurationDefinition,
|
46
|
-
FilterDefinition,
|
47
|
-
FinallyDefinition,
|
48
|
-
FromDefinition,
|
49
|
-
GlobalOptionDefinition,
|
50
|
-
GlobalOptionsDefinition,
|
51
|
-
IdempotentConsumerDefinition,
|
52
|
-
InputTypeDefinition,
|
53
|
-
InterceptDefinition,
|
54
|
-
InterceptFromDefinition,
|
55
|
-
InterceptSendToEndpointDefinition,
|
56
|
-
KameletDefinition,
|
57
|
-
LoadBalanceDefinition,
|
58
|
-
LogDefinition,
|
59
|
-
LoopDefinition,
|
60
|
-
MarshalDefinition,
|
61
|
-
MulticastDefinition,
|
62
|
-
OnCompletionDefinition,
|
63
|
-
OnExceptionDefinition,
|
64
|
-
OnFallbackDefinition,
|
65
|
-
OptimisticLockRetryPolicyDefinition,
|
66
|
-
OtherwiseDefinition,
|
67
|
-
OutputDefinition,
|
68
|
-
OutputTypeDefinition,
|
69
|
-
PackageScanDefinition,
|
70
|
-
PausableDefinition,
|
71
|
-
PipelineDefinition,
|
72
|
-
PolicyDefinition,
|
73
|
-
PollDefinition,
|
74
|
-
PollEnrichDefinition,
|
75
|
-
ProcessDefinition,
|
76
|
-
PropertyDefinition,
|
77
|
-
PropertyExpressionDefinition,
|
78
|
-
RecipientListDefinition,
|
79
|
-
RedeliveryPolicyDefinition,
|
80
|
-
RemoveHeaderDefinition,
|
81
|
-
RemoveHeadersDefinition,
|
82
|
-
RemovePropertiesDefinition,
|
83
|
-
RemovePropertyDefinition,
|
84
|
-
RemoveVariableDefinition,
|
85
|
-
ResequenceDefinition,
|
86
|
-
Resilience4jConfigurationDefinition,
|
87
|
-
RestContextRefDefinition,
|
88
|
-
ResumableDefinition,
|
89
|
-
RollbackDefinition,
|
90
|
-
RouteBuilderDefinition,
|
91
|
-
RouteConfigurationContextRefDefinition,
|
92
|
-
RouteConfigurationDefinition,
|
93
|
-
RouteContextRefDefinition,
|
94
|
-
RouteDefinition,
|
95
|
-
RouteTemplateDefinition,
|
96
|
-
RouteTemplateParameterDefinition,
|
97
|
-
RoutingSlipDefinition,
|
98
|
-
SagaActionUriDefinition,
|
99
|
-
SagaDefinition,
|
100
|
-
SamplingDefinition,
|
101
|
-
ScriptDefinition,
|
102
|
-
SetBodyDefinition,
|
103
|
-
SetExchangePatternDefinition,
|
104
|
-
SetHeaderDefinition,
|
105
|
-
SetHeadersDefinition,
|
106
|
-
SetPropertyDefinition,
|
107
|
-
SetVariableDefinition,
|
108
|
-
SetVariablesDefinition,
|
109
|
-
SortDefinition,
|
110
|
-
SplitDefinition,
|
111
|
-
StepDefinition,
|
112
|
-
StopDefinition,
|
113
|
-
TemplatedRouteDefinition,
|
114
|
-
TemplatedRouteParameterDefinition,
|
115
|
-
ThreadPoolProfileDefinition,
|
116
|
-
ThreadsDefinition,
|
117
|
-
ThrottleDefinition,
|
118
|
-
ThrowExceptionDefinition,
|
119
|
-
ToDefinition,
|
120
|
-
ToDynamicDefinition,
|
121
|
-
TransactedDefinition,
|
122
|
-
TransformDefinition,
|
123
|
-
TryDefinition,
|
124
|
-
UnmarshalDefinition,
|
125
|
-
ValidateDefinition,
|
126
|
-
ValueDefinition,
|
127
|
-
WhenDefinition,
|
128
|
-
WhenSkipSendToEndpointDefinition,
|
129
|
-
WireTapDefinition,
|
130
|
-
BeanConstructorDefinition,
|
131
|
-
BeanConstructorsDefinition,
|
132
|
-
BeanPropertiesDefinition,
|
133
|
-
BeanPropertyDefinition,
|
134
|
-
ComponentScanDefinition,
|
135
|
-
BatchResequencerConfig,
|
136
|
-
StreamResequencerConfig,
|
137
|
-
ASN1DataFormat,
|
138
|
-
AvroDataFormat,
|
139
|
-
BarcodeDataFormat,
|
140
|
-
Base64DataFormat,
|
141
|
-
BeanioDataFormat,
|
142
|
-
BindyDataFormat,
|
143
|
-
CBORDataFormat,
|
144
|
-
CryptoDataFormat,
|
145
|
-
CsvDataFormat,
|
146
|
-
CustomDataFormat,
|
147
|
-
DataFormatsDefinition,
|
148
|
-
FhirJsonDataFormat,
|
149
|
-
FhirXmlDataFormat,
|
150
|
-
FlatpackDataFormat,
|
151
|
-
GrokDataFormat,
|
152
|
-
GzipDeflaterDataFormat,
|
153
|
-
HL7DataFormat,
|
154
|
-
IcalDataFormat,
|
155
|
-
JacksonXMLDataFormat,
|
156
|
-
JaxbDataFormat,
|
157
|
-
JsonApiDataFormat,
|
158
|
-
JsonDataFormat,
|
159
|
-
LZFDataFormat,
|
160
|
-
MimeMultipartDataFormat,
|
161
|
-
PGPDataFormat,
|
162
|
-
ParquetAvroDataFormat,
|
163
|
-
ProtobufDataFormat,
|
164
|
-
RssDataFormat,
|
165
|
-
SoapDataFormat,
|
166
|
-
SwiftMtDataFormat,
|
167
|
-
SwiftMxDataFormat,
|
168
|
-
SyslogDataFormat,
|
169
|
-
TarFileDataFormat,
|
170
|
-
ThriftDataFormat,
|
171
|
-
TidyMarkupDataFormat,
|
172
|
-
UniVocityCsvDataFormat,
|
173
|
-
UniVocityFixedDataFormat,
|
174
|
-
UniVocityHeader,
|
175
|
-
UniVocityTsvDataFormat,
|
176
|
-
XMLSecurityDataFormat,
|
177
|
-
YAMLDataFormat,
|
178
|
-
YAMLTypeFilterDefinition,
|
179
|
-
ZipDeflaterDataFormat,
|
180
|
-
ZipFileDataFormat,
|
181
|
-
DeadLetterChannelDefinition,
|
182
|
-
DefaultErrorHandlerDefinition,
|
183
|
-
JtaTransactionErrorHandlerDefinition,
|
184
|
-
NoErrorHandlerDefinition,
|
185
|
-
RefErrorHandlerDefinition,
|
186
|
-
SpringTransactionErrorHandlerDefinition,
|
187
|
-
CSimpleExpression,
|
188
|
-
ConstantExpression,
|
189
|
-
DatasonnetExpression,
|
190
|
-
ExchangePropertyExpression,
|
191
|
-
ExpressionDefinition,
|
192
|
-
GroovyExpression,
|
193
|
-
HeaderExpression,
|
194
|
-
Hl7TerserExpression,
|
195
|
-
JavaExpression,
|
196
|
-
JavaScriptExpression,
|
197
|
-
JqExpression,
|
198
|
-
JsonPathExpression,
|
199
|
-
LanguageExpression,
|
200
|
-
MethodCallExpression,
|
201
|
-
MvelExpression,
|
202
|
-
OgnlExpression,
|
203
|
-
PythonExpression,
|
204
|
-
RefExpression,
|
205
|
-
SimpleExpression,
|
206
|
-
SpELExpression,
|
207
|
-
TokenizerExpression,
|
208
|
-
VariableExpression,
|
209
|
-
WasmExpression,
|
210
|
-
XMLTokenizerExpression,
|
211
|
-
XPathExpression,
|
212
|
-
XQueryExpression,
|
213
|
-
CustomLoadBalancerDefinition,
|
214
|
-
FailoverLoadBalancerDefinition,
|
215
|
-
RandomLoadBalancerDefinition,
|
216
|
-
RoundRobinLoadBalancerDefinition,
|
217
|
-
StickyLoadBalancerDefinition,
|
218
|
-
TopicLoadBalancerDefinition,
|
219
|
-
WeightedLoadBalancerDefinition,
|
220
|
-
ApiKeyDefinition,
|
221
|
-
BasicAuthDefinition,
|
222
|
-
BearerTokenDefinition,
|
223
|
-
DeleteDefinition,
|
224
|
-
GetDefinition,
|
225
|
-
HeadDefinition,
|
226
|
-
MutualTLSDefinition,
|
227
|
-
OAuth2Definition,
|
228
|
-
OpenApiDefinition,
|
229
|
-
OpenIdConnectDefinition,
|
230
|
-
ParamDefinition,
|
231
|
-
PatchDefinition,
|
232
|
-
PostDefinition,
|
233
|
-
PutDefinition,
|
234
|
-
ResponseHeaderDefinition,
|
235
|
-
ResponseMessageDefinition,
|
236
|
-
RestBindingDefinition,
|
237
|
-
RestConfigurationDefinition,
|
238
|
-
RestDefinition,
|
239
|
-
RestPropertyDefinition,
|
240
|
-
RestSecuritiesDefinition,
|
241
|
-
RestsDefinition,
|
242
|
-
SecurityDefinition,
|
243
|
-
LangChain4jTokenizerDefinition,
|
244
|
-
CustomTransformerDefinition,
|
245
|
-
DataFormatTransformerDefinition,
|
246
|
-
EndpointTransformerDefinition,
|
247
|
-
LoadTransformerDefinition,
|
248
|
-
TransformersDefinition,
|
249
|
-
CustomValidatorDefinition,
|
250
|
-
EndpointValidatorDefinition,
|
251
|
-
PredicateValidatorDefinition,
|
252
|
-
ValidatorsDefinition,
|
253
|
-
} from '../model/CamelDefinition';
|
254
|
-
import {CamelUtil} from './CamelUtil';
|
255
|
-
import {CamelMetadataApi} from '../model/CamelMetadata';
|
256
|
-
import {ComponentApi} from './ComponentApi';
|
257
|
-
|
258
|
-
export class CamelDefinitionYamlStep {
|
259
|
-
|
260
|
-
static readProcessorDefinition = (element: any): ProcessorDefinition => {
|
261
|
-
|
262
|
-
let def = element ? new ProcessorDefinition({...element}) : new ProcessorDefinition();
|
263
|
-
if (element?.idempotentConsumer !== undefined) {
|
264
|
-
if (Array.isArray(element.idempotentConsumer)) {
|
265
|
-
def.idempotentConsumer = CamelDefinitionYamlStep.readIdempotentConsumerDefinition(element.idempotentConsumer[0]);
|
266
|
-
} else {
|
267
|
-
def.idempotentConsumer = CamelDefinitionYamlStep.readIdempotentConsumerDefinition(element.idempotentConsumer);
|
268
|
-
}
|
269
|
-
}
|
270
|
-
if (element?.resumable !== undefined) {
|
271
|
-
if (Array.isArray(element.resumable)) {
|
272
|
-
def.resumable = CamelDefinitionYamlStep.readResumableDefinition(element.resumable[0]);
|
273
|
-
} else {
|
274
|
-
def.resumable = CamelDefinitionYamlStep.readResumableDefinition(element.resumable);
|
275
|
-
}
|
276
|
-
}
|
277
|
-
if (element?.doTry !== undefined) {
|
278
|
-
if (Array.isArray(element.doTry)) {
|
279
|
-
def.doTry = CamelDefinitionYamlStep.readTryDefinition(element.doTry[0]);
|
280
|
-
} else {
|
281
|
-
def.doTry = CamelDefinitionYamlStep.readTryDefinition(element.doTry);
|
282
|
-
}
|
283
|
-
}
|
284
|
-
if (element?.convertBodyTo !== undefined) {
|
285
|
-
if (Array.isArray(element.convertBodyTo)) {
|
286
|
-
def.convertBodyTo = CamelDefinitionYamlStep.readConvertBodyDefinition(element.convertBodyTo[0]);
|
287
|
-
} else {
|
288
|
-
def.convertBodyTo = CamelDefinitionYamlStep.readConvertBodyDefinition(element.convertBodyTo);
|
289
|
-
}
|
290
|
-
}
|
291
|
-
if (element?.poll !== undefined) {
|
292
|
-
if (Array.isArray(element.poll)) {
|
293
|
-
def.poll = CamelDefinitionYamlStep.readPollDefinition(element.poll[0]);
|
294
|
-
} else {
|
295
|
-
def.poll = CamelDefinitionYamlStep.readPollDefinition(element.poll);
|
296
|
-
}
|
297
|
-
}
|
298
|
-
if (element?.recipientList !== undefined) {
|
299
|
-
if (Array.isArray(element.recipientList)) {
|
300
|
-
def.recipientList = CamelDefinitionYamlStep.readRecipientListDefinition(element.recipientList[0]);
|
301
|
-
} else {
|
302
|
-
def.recipientList = CamelDefinitionYamlStep.readRecipientListDefinition(element.recipientList);
|
303
|
-
}
|
304
|
-
}
|
305
|
-
if (element?.when !== undefined) {
|
306
|
-
if (Array.isArray(element.when)) {
|
307
|
-
def.when = CamelDefinitionYamlStep.readWhenDefinition(element.when[0]);
|
308
|
-
} else {
|
309
|
-
def.when = CamelDefinitionYamlStep.readWhenDefinition(element.when);
|
310
|
-
}
|
311
|
-
}
|
312
|
-
if (element?.setHeader !== undefined) {
|
313
|
-
if (Array.isArray(element.setHeader)) {
|
314
|
-
def.setHeader = CamelDefinitionYamlStep.readSetHeaderDefinition(element.setHeader[0]);
|
315
|
-
} else {
|
316
|
-
def.setHeader = CamelDefinitionYamlStep.readSetHeaderDefinition(element.setHeader);
|
317
|
-
}
|
318
|
-
}
|
319
|
-
if (element?.split !== undefined) {
|
320
|
-
if (Array.isArray(element.split)) {
|
321
|
-
def.split = CamelDefinitionYamlStep.readSplitDefinition(element.split[0]);
|
322
|
-
} else {
|
323
|
-
def.split = CamelDefinitionYamlStep.readSplitDefinition(element.split);
|
324
|
-
}
|
325
|
-
}
|
326
|
-
if (element?.loop !== undefined) {
|
327
|
-
if (Array.isArray(element.loop)) {
|
328
|
-
def.loop = CamelDefinitionYamlStep.readLoopDefinition(element.loop[0]);
|
329
|
-
} else {
|
330
|
-
def.loop = CamelDefinitionYamlStep.readLoopDefinition(element.loop);
|
331
|
-
}
|
332
|
-
}
|
333
|
-
if (element?.setExchangePattern !== undefined) {
|
334
|
-
if (Array.isArray(element.setExchangePattern)) {
|
335
|
-
def.setExchangePattern = CamelDefinitionYamlStep.readSetExchangePatternDefinition(element.setExchangePattern[0]);
|
336
|
-
} else {
|
337
|
-
def.setExchangePattern = CamelDefinitionYamlStep.readSetExchangePatternDefinition(element.setExchangePattern);
|
338
|
-
}
|
339
|
-
}
|
340
|
-
if (element?.marshal !== undefined) {
|
341
|
-
if (Array.isArray(element.marshal)) {
|
342
|
-
def.marshal = CamelDefinitionYamlStep.readMarshalDefinition(element.marshal[0]);
|
343
|
-
} else {
|
344
|
-
def.marshal = CamelDefinitionYamlStep.readMarshalDefinition(element.marshal);
|
345
|
-
}
|
346
|
-
}
|
347
|
-
if (element?.onFallback !== undefined) {
|
348
|
-
if (Array.isArray(element.onFallback)) {
|
349
|
-
def.onFallback = CamelDefinitionYamlStep.readOnFallbackDefinition(element.onFallback[0]);
|
350
|
-
} else {
|
351
|
-
def.onFallback = CamelDefinitionYamlStep.readOnFallbackDefinition(element.onFallback);
|
352
|
-
}
|
353
|
-
}
|
354
|
-
if (element?.circuitBreaker !== undefined) {
|
355
|
-
if (Array.isArray(element.circuitBreaker)) {
|
356
|
-
def.circuitBreaker = CamelDefinitionYamlStep.readCircuitBreakerDefinition(element.circuitBreaker[0]);
|
357
|
-
} else {
|
358
|
-
def.circuitBreaker = CamelDefinitionYamlStep.readCircuitBreakerDefinition(element.circuitBreaker);
|
359
|
-
}
|
360
|
-
}
|
361
|
-
if (element?.enrich !== undefined) {
|
362
|
-
if (Array.isArray(element.enrich)) {
|
363
|
-
def.enrich = CamelDefinitionYamlStep.readEnrichDefinition(element.enrich[0]);
|
364
|
-
} else {
|
365
|
-
def.enrich = CamelDefinitionYamlStep.readEnrichDefinition(element.enrich);
|
366
|
-
}
|
367
|
-
}
|
368
|
-
if (element?.kamelet !== undefined) {
|
369
|
-
if (Array.isArray(element.kamelet)) {
|
370
|
-
def.kamelet = CamelDefinitionYamlStep.readKameletDefinition(element.kamelet[0]);
|
371
|
-
} else {
|
372
|
-
def.kamelet = CamelDefinitionYamlStep.readKameletDefinition(element.kamelet);
|
373
|
-
}
|
374
|
-
}
|
375
|
-
if (element?.saga !== undefined) {
|
376
|
-
if (Array.isArray(element.saga)) {
|
377
|
-
def.saga = CamelDefinitionYamlStep.readSagaDefinition(element.saga[0]);
|
378
|
-
} else {
|
379
|
-
def.saga = CamelDefinitionYamlStep.readSagaDefinition(element.saga);
|
380
|
-
}
|
381
|
-
}
|
382
|
-
if (element?.bean !== undefined) {
|
383
|
-
if (Array.isArray(element.bean)) {
|
384
|
-
def.bean = CamelDefinitionYamlStep.readBeanDefinition(element.bean[0]);
|
385
|
-
} else {
|
386
|
-
def.bean = CamelDefinitionYamlStep.readBeanDefinition(element.bean);
|
387
|
-
}
|
388
|
-
}
|
389
|
-
if (element?.otherwise !== undefined) {
|
390
|
-
if (Array.isArray(element.otherwise)) {
|
391
|
-
def.otherwise = CamelDefinitionYamlStep.readOtherwiseDefinition(element.otherwise[0]);
|
392
|
-
} else {
|
393
|
-
def.otherwise = CamelDefinitionYamlStep.readOtherwiseDefinition(element.otherwise);
|
394
|
-
}
|
395
|
-
}
|
396
|
-
if (element?.sort !== undefined) {
|
397
|
-
if (Array.isArray(element.sort)) {
|
398
|
-
def.sort = CamelDefinitionYamlStep.readSortDefinition(element.sort[0]);
|
399
|
-
} else {
|
400
|
-
def.sort = CamelDefinitionYamlStep.readSortDefinition(element.sort);
|
401
|
-
}
|
402
|
-
}
|
403
|
-
if (element?.loadBalance !== undefined) {
|
404
|
-
if (Array.isArray(element.loadBalance)) {
|
405
|
-
def.loadBalance = CamelDefinitionYamlStep.readLoadBalanceDefinition(element.loadBalance[0]);
|
406
|
-
} else {
|
407
|
-
def.loadBalance = CamelDefinitionYamlStep.readLoadBalanceDefinition(element.loadBalance);
|
408
|
-
}
|
409
|
-
}
|
410
|
-
if (element?.script !== undefined) {
|
411
|
-
if (Array.isArray(element.script)) {
|
412
|
-
def.script = CamelDefinitionYamlStep.readScriptDefinition(element.script[0]);
|
413
|
-
} else {
|
414
|
-
def.script = CamelDefinitionYamlStep.readScriptDefinition(element.script);
|
415
|
-
}
|
416
|
-
}
|
417
|
-
if (element?.removeHeader !== undefined) {
|
418
|
-
if (Array.isArray(element.removeHeader)) {
|
419
|
-
def.removeHeader = CamelDefinitionYamlStep.readRemoveHeaderDefinition(element.removeHeader[0]);
|
420
|
-
} else {
|
421
|
-
def.removeHeader = CamelDefinitionYamlStep.readRemoveHeaderDefinition(element.removeHeader);
|
422
|
-
}
|
423
|
-
}
|
424
|
-
if (element?.delay !== undefined) {
|
425
|
-
if (Array.isArray(element.delay)) {
|
426
|
-
def.delay = CamelDefinitionYamlStep.readDelayDefinition(element.delay[0]);
|
427
|
-
} else {
|
428
|
-
def.delay = CamelDefinitionYamlStep.readDelayDefinition(element.delay);
|
429
|
-
}
|
430
|
-
}
|
431
|
-
if (element?.stop !== undefined) {
|
432
|
-
if (Array.isArray(element.stop)) {
|
433
|
-
def.stop = CamelDefinitionYamlStep.readStopDefinition(element.stop[0]);
|
434
|
-
} else {
|
435
|
-
def.stop = CamelDefinitionYamlStep.readStopDefinition(element.stop);
|
436
|
-
}
|
437
|
-
}
|
438
|
-
if (element?.whenSkipSendToEndpoint !== undefined) {
|
439
|
-
if (Array.isArray(element.whenSkipSendToEndpoint)) {
|
440
|
-
def.whenSkipSendToEndpoint = CamelDefinitionYamlStep.readWhenSkipSendToEndpointDefinition(element.whenSkipSendToEndpoint[0]);
|
441
|
-
} else {
|
442
|
-
def.whenSkipSendToEndpoint = CamelDefinitionYamlStep.readWhenSkipSendToEndpointDefinition(element.whenSkipSendToEndpoint);
|
443
|
-
}
|
444
|
-
}
|
445
|
-
if (element?.setProperty !== undefined) {
|
446
|
-
if (Array.isArray(element.setProperty)) {
|
447
|
-
def.setProperty = CamelDefinitionYamlStep.readSetPropertyDefinition(element.setProperty[0]);
|
448
|
-
} else {
|
449
|
-
def.setProperty = CamelDefinitionYamlStep.readSetPropertyDefinition(element.setProperty);
|
450
|
-
}
|
451
|
-
}
|
452
|
-
if (element?.removeProperty !== undefined) {
|
453
|
-
if (Array.isArray(element.removeProperty)) {
|
454
|
-
def.removeProperty = CamelDefinitionYamlStep.readRemovePropertyDefinition(element.removeProperty[0]);
|
455
|
-
} else {
|
456
|
-
def.removeProperty = CamelDefinitionYamlStep.readRemovePropertyDefinition(element.removeProperty);
|
457
|
-
}
|
458
|
-
}
|
459
|
-
if (element?.convertHeaderTo !== undefined) {
|
460
|
-
if (Array.isArray(element.convertHeaderTo)) {
|
461
|
-
def.convertHeaderTo = CamelDefinitionYamlStep.readConvertHeaderDefinition(element.convertHeaderTo[0]);
|
462
|
-
} else {
|
463
|
-
def.convertHeaderTo = CamelDefinitionYamlStep.readConvertHeaderDefinition(element.convertHeaderTo);
|
464
|
-
}
|
465
|
-
}
|
466
|
-
if (element?.pausable !== undefined) {
|
467
|
-
if (Array.isArray(element.pausable)) {
|
468
|
-
def.pausable = CamelDefinitionYamlStep.readPausableDefinition(element.pausable[0]);
|
469
|
-
} else {
|
470
|
-
def.pausable = CamelDefinitionYamlStep.readPausableDefinition(element.pausable);
|
471
|
-
}
|
472
|
-
}
|
473
|
-
if (element?.throttle !== undefined) {
|
474
|
-
if (Array.isArray(element.throttle)) {
|
475
|
-
def.throttle = CamelDefinitionYamlStep.readThrottleDefinition(element.throttle[0]);
|
476
|
-
} else {
|
477
|
-
def.throttle = CamelDefinitionYamlStep.readThrottleDefinition(element.throttle);
|
478
|
-
}
|
479
|
-
}
|
480
|
-
if (element?.doFinally !== undefined) {
|
481
|
-
if (Array.isArray(element.doFinally)) {
|
482
|
-
def.doFinally = CamelDefinitionYamlStep.readFinallyDefinition(element.doFinally[0]);
|
483
|
-
} else {
|
484
|
-
def.doFinally = CamelDefinitionYamlStep.readFinallyDefinition(element.doFinally);
|
485
|
-
}
|
486
|
-
}
|
487
|
-
if (element?.log !== undefined) {
|
488
|
-
if (Array.isArray(element.log)) {
|
489
|
-
def.log = CamelDefinitionYamlStep.readLogDefinition(element.log[0]);
|
490
|
-
} else {
|
491
|
-
def.log = CamelDefinitionYamlStep.readLogDefinition(element.log);
|
492
|
-
}
|
493
|
-
}
|
494
|
-
if (element?.doCatch !== undefined) {
|
495
|
-
if (Array.isArray(element.doCatch)) {
|
496
|
-
def.doCatch = CamelDefinitionYamlStep.readCatchDefinition(element.doCatch[0]);
|
497
|
-
} else {
|
498
|
-
def.doCatch = CamelDefinitionYamlStep.readCatchDefinition(element.doCatch);
|
499
|
-
}
|
500
|
-
}
|
501
|
-
if (element?.transacted !== undefined) {
|
502
|
-
if (Array.isArray(element.transacted)) {
|
503
|
-
def.transacted = CamelDefinitionYamlStep.readTransactedDefinition(element.transacted[0]);
|
504
|
-
} else {
|
505
|
-
def.transacted = CamelDefinitionYamlStep.readTransactedDefinition(element.transacted);
|
506
|
-
}
|
507
|
-
}
|
508
|
-
if (element?.claimCheck !== undefined) {
|
509
|
-
if (Array.isArray(element.claimCheck)) {
|
510
|
-
def.claimCheck = CamelDefinitionYamlStep.readClaimCheckDefinition(element.claimCheck[0]);
|
511
|
-
} else {
|
512
|
-
def.claimCheck = CamelDefinitionYamlStep.readClaimCheckDefinition(element.claimCheck);
|
513
|
-
}
|
514
|
-
}
|
515
|
-
if (element?.pollEnrich !== undefined) {
|
516
|
-
if (Array.isArray(element.pollEnrich)) {
|
517
|
-
def.pollEnrich = CamelDefinitionYamlStep.readPollEnrichDefinition(element.pollEnrich[0]);
|
518
|
-
} else {
|
519
|
-
def.pollEnrich = CamelDefinitionYamlStep.readPollEnrichDefinition(element.pollEnrich);
|
520
|
-
}
|
521
|
-
}
|
522
|
-
if (element?.removeHeaders !== undefined) {
|
523
|
-
if (Array.isArray(element.removeHeaders)) {
|
524
|
-
def.removeHeaders = CamelDefinitionYamlStep.readRemoveHeadersDefinition(element.removeHeaders[0]);
|
525
|
-
} else {
|
526
|
-
def.removeHeaders = CamelDefinitionYamlStep.readRemoveHeadersDefinition(element.removeHeaders);
|
527
|
-
}
|
528
|
-
}
|
529
|
-
if (element?.aggregate !== undefined) {
|
530
|
-
if (Array.isArray(element.aggregate)) {
|
531
|
-
def.aggregate = CamelDefinitionYamlStep.readAggregateDefinition(element.aggregate[0]);
|
532
|
-
} else {
|
533
|
-
def.aggregate = CamelDefinitionYamlStep.readAggregateDefinition(element.aggregate);
|
534
|
-
}
|
535
|
-
}
|
536
|
-
if (element?.resequence !== undefined) {
|
537
|
-
if (Array.isArray(element.resequence)) {
|
538
|
-
def.resequence = CamelDefinitionYamlStep.readResequenceDefinition(element.resequence[0]);
|
539
|
-
} else {
|
540
|
-
def.resequence = CamelDefinitionYamlStep.readResequenceDefinition(element.resequence);
|
541
|
-
}
|
542
|
-
}
|
543
|
-
if (element?.routingSlip !== undefined) {
|
544
|
-
if (Array.isArray(element.routingSlip)) {
|
545
|
-
def.routingSlip = CamelDefinitionYamlStep.readRoutingSlipDefinition(element.routingSlip[0]);
|
546
|
-
} else {
|
547
|
-
def.routingSlip = CamelDefinitionYamlStep.readRoutingSlipDefinition(element.routingSlip);
|
548
|
-
}
|
549
|
-
}
|
550
|
-
if (element?.transform !== undefined) {
|
551
|
-
if (Array.isArray(element.transform)) {
|
552
|
-
def.transform = CamelDefinitionYamlStep.readTransformDefinition(element.transform[0]);
|
553
|
-
} else {
|
554
|
-
def.transform = CamelDefinitionYamlStep.readTransformDefinition(element.transform);
|
555
|
-
}
|
556
|
-
}
|
557
|
-
if (element?.removeProperties !== undefined) {
|
558
|
-
if (Array.isArray(element.removeProperties)) {
|
559
|
-
def.removeProperties = CamelDefinitionYamlStep.readRemovePropertiesDefinition(element.removeProperties[0]);
|
560
|
-
} else {
|
561
|
-
def.removeProperties = CamelDefinitionYamlStep.readRemovePropertiesDefinition(element.removeProperties);
|
562
|
-
}
|
563
|
-
}
|
564
|
-
if (element?.removeVariable !== undefined) {
|
565
|
-
if (Array.isArray(element.removeVariable)) {
|
566
|
-
def.removeVariable = CamelDefinitionYamlStep.readRemoveVariableDefinition(element.removeVariable[0]);
|
567
|
-
} else {
|
568
|
-
def.removeVariable = CamelDefinitionYamlStep.readRemoveVariableDefinition(element.removeVariable);
|
569
|
-
}
|
570
|
-
}
|
571
|
-
if (element?.policy !== undefined) {
|
572
|
-
if (Array.isArray(element.policy)) {
|
573
|
-
def.policy = CamelDefinitionYamlStep.readPolicyDefinition(element.policy[0]);
|
574
|
-
} else {
|
575
|
-
def.policy = CamelDefinitionYamlStep.readPolicyDefinition(element.policy);
|
576
|
-
}
|
577
|
-
}
|
578
|
-
if (element?.validate !== undefined) {
|
579
|
-
if (Array.isArray(element.validate)) {
|
580
|
-
def.validate = CamelDefinitionYamlStep.readValidateDefinition(element.validate[0]);
|
581
|
-
} else {
|
582
|
-
def.validate = CamelDefinitionYamlStep.readValidateDefinition(element.validate);
|
583
|
-
}
|
584
|
-
}
|
585
|
-
if (element?.rollback !== undefined) {
|
586
|
-
if (Array.isArray(element.rollback)) {
|
587
|
-
def.rollback = CamelDefinitionYamlStep.readRollbackDefinition(element.rollback[0]);
|
588
|
-
} else {
|
589
|
-
def.rollback = CamelDefinitionYamlStep.readRollbackDefinition(element.rollback);
|
590
|
-
}
|
591
|
-
}
|
592
|
-
if (element?.setHeaders !== undefined) {
|
593
|
-
if (Array.isArray(element.setHeaders)) {
|
594
|
-
def.setHeaders = CamelDefinitionYamlStep.readSetHeadersDefinition(element.setHeaders[0]);
|
595
|
-
} else {
|
596
|
-
def.setHeaders = CamelDefinitionYamlStep.readSetHeadersDefinition(element.setHeaders);
|
597
|
-
}
|
598
|
-
}
|
599
|
-
if (element?.process !== undefined) {
|
600
|
-
if (Array.isArray(element.process)) {
|
601
|
-
def.process = CamelDefinitionYamlStep.readProcessDefinition(element.process[0]);
|
602
|
-
} else {
|
603
|
-
def.process = CamelDefinitionYamlStep.readProcessDefinition(element.process);
|
604
|
-
}
|
605
|
-
}
|
606
|
-
if (element?.setVariables !== undefined) {
|
607
|
-
if (Array.isArray(element.setVariables)) {
|
608
|
-
def.setVariables = CamelDefinitionYamlStep.readSetVariablesDefinition(element.setVariables[0]);
|
609
|
-
} else {
|
610
|
-
def.setVariables = CamelDefinitionYamlStep.readSetVariablesDefinition(element.setVariables);
|
611
|
-
}
|
612
|
-
}
|
613
|
-
if (element?.convertVariableTo !== undefined) {
|
614
|
-
if (Array.isArray(element.convertVariableTo)) {
|
615
|
-
def.convertVariableTo = CamelDefinitionYamlStep.readConvertVariableDefinition(element.convertVariableTo[0]);
|
616
|
-
} else {
|
617
|
-
def.convertVariableTo = CamelDefinitionYamlStep.readConvertVariableDefinition(element.convertVariableTo);
|
618
|
-
}
|
619
|
-
}
|
620
|
-
if (element?.setVariable !== undefined) {
|
621
|
-
if (Array.isArray(element.setVariable)) {
|
622
|
-
def.setVariable = CamelDefinitionYamlStep.readSetVariableDefinition(element.setVariable[0]);
|
623
|
-
} else {
|
624
|
-
def.setVariable = CamelDefinitionYamlStep.readSetVariableDefinition(element.setVariable);
|
625
|
-
}
|
626
|
-
}
|
627
|
-
if (element?.threads !== undefined) {
|
628
|
-
if (Array.isArray(element.threads)) {
|
629
|
-
def.threads = CamelDefinitionYamlStep.readThreadsDefinition(element.threads[0]);
|
630
|
-
} else {
|
631
|
-
def.threads = CamelDefinitionYamlStep.readThreadsDefinition(element.threads);
|
632
|
-
}
|
633
|
-
}
|
634
|
-
if (element?.setBody !== undefined) {
|
635
|
-
if (Array.isArray(element.setBody)) {
|
636
|
-
def.setBody = CamelDefinitionYamlStep.readSetBodyDefinition(element.setBody[0]);
|
637
|
-
} else {
|
638
|
-
def.setBody = CamelDefinitionYamlStep.readSetBodyDefinition(element.setBody);
|
639
|
-
}
|
640
|
-
}
|
641
|
-
if (element?.sample !== undefined) {
|
642
|
-
if (Array.isArray(element.sample)) {
|
643
|
-
def.sample = CamelDefinitionYamlStep.readSamplingDefinition(element.sample[0]);
|
644
|
-
} else {
|
645
|
-
def.sample = CamelDefinitionYamlStep.readSamplingDefinition(element.sample);
|
646
|
-
}
|
647
|
-
}
|
648
|
-
if (element?.throwException !== undefined) {
|
649
|
-
if (Array.isArray(element.throwException)) {
|
650
|
-
def.throwException = CamelDefinitionYamlStep.readThrowExceptionDefinition(element.throwException[0]);
|
651
|
-
} else {
|
652
|
-
def.throwException = CamelDefinitionYamlStep.readThrowExceptionDefinition(element.throwException);
|
653
|
-
}
|
654
|
-
}
|
655
|
-
if (element?.dynamicRouter !== undefined) {
|
656
|
-
if (Array.isArray(element.dynamicRouter)) {
|
657
|
-
def.dynamicRouter = CamelDefinitionYamlStep.readDynamicRouterDefinition(element.dynamicRouter[0]);
|
658
|
-
} else {
|
659
|
-
def.dynamicRouter = CamelDefinitionYamlStep.readDynamicRouterDefinition(element.dynamicRouter);
|
660
|
-
}
|
661
|
-
}
|
662
|
-
if (element?.multicast !== undefined) {
|
663
|
-
if (Array.isArray(element.multicast)) {
|
664
|
-
def.multicast = CamelDefinitionYamlStep.readMulticastDefinition(element.multicast[0]);
|
665
|
-
} else {
|
666
|
-
def.multicast = CamelDefinitionYamlStep.readMulticastDefinition(element.multicast);
|
667
|
-
}
|
668
|
-
}
|
669
|
-
if (element?.filter !== undefined) {
|
670
|
-
if (Array.isArray(element.filter)) {
|
671
|
-
def.filter = CamelDefinitionYamlStep.readFilterDefinition(element.filter[0]);
|
672
|
-
} else {
|
673
|
-
def.filter = CamelDefinitionYamlStep.readFilterDefinition(element.filter);
|
674
|
-
}
|
675
|
-
}
|
676
|
-
if (element?.pipeline !== undefined) {
|
677
|
-
if (Array.isArray(element.pipeline)) {
|
678
|
-
def.pipeline = CamelDefinitionYamlStep.readPipelineDefinition(element.pipeline[0]);
|
679
|
-
} else {
|
680
|
-
def.pipeline = CamelDefinitionYamlStep.readPipelineDefinition(element.pipeline);
|
681
|
-
}
|
682
|
-
}
|
683
|
-
if (element?.unmarshal !== undefined) {
|
684
|
-
if (Array.isArray(element.unmarshal)) {
|
685
|
-
def.unmarshal = CamelDefinitionYamlStep.readUnmarshalDefinition(element.unmarshal[0]);
|
686
|
-
} else {
|
687
|
-
def.unmarshal = CamelDefinitionYamlStep.readUnmarshalDefinition(element.unmarshal);
|
688
|
-
}
|
689
|
-
}
|
690
|
-
if (element?.wireTap !== undefined) {
|
691
|
-
if (Array.isArray(element.wireTap)) {
|
692
|
-
def.wireTap = CamelDefinitionYamlStep.readWireTapDefinition(element.wireTap[0]);
|
693
|
-
} else {
|
694
|
-
def.wireTap = CamelDefinitionYamlStep.readWireTapDefinition(element.wireTap);
|
695
|
-
}
|
696
|
-
}
|
697
|
-
if (element?.langChain4j !== undefined) {
|
698
|
-
if (Array.isArray(element.langChain4j)) {
|
699
|
-
def.langChain4j = CamelDefinitionYamlStep.readLangChain4jTokenizerDefinition(element.langChain4j[0]);
|
700
|
-
} else {
|
701
|
-
def.langChain4j = CamelDefinitionYamlStep.readLangChain4jTokenizerDefinition(element.langChain4j);
|
702
|
-
}
|
703
|
-
}
|
704
|
-
if (element?.step !== undefined) {
|
705
|
-
if (Array.isArray(element.step)) {
|
706
|
-
def.step = CamelDefinitionYamlStep.readStepDefinition(element.step[0]);
|
707
|
-
} else {
|
708
|
-
def.step = CamelDefinitionYamlStep.readStepDefinition(element.step);
|
709
|
-
}
|
710
|
-
}
|
711
|
-
if (element?.choice !== undefined) {
|
712
|
-
if (Array.isArray(element.choice)) {
|
713
|
-
def.choice = CamelDefinitionYamlStep.readChoiceDefinition(element.choice[0]);
|
714
|
-
} else {
|
715
|
-
def.choice = CamelDefinitionYamlStep.readChoiceDefinition(element.choice);
|
716
|
-
}
|
717
|
-
}
|
718
|
-
|
719
|
-
return def;
|
720
|
-
}
|
721
|
-
|
722
|
-
static readBeansDeserializer = (element: any): BeansDeserializer => {
|
723
|
-
|
724
|
-
let def = element ? new BeansDeserializer({...element}) : new BeansDeserializer();
|
725
|
-
|
726
|
-
return def;
|
727
|
-
}
|
728
|
-
|
729
|
-
static readErrorHandlerDeserializer = (element: any): ErrorHandlerDeserializer => {
|
730
|
-
|
731
|
-
let def = element ? new ErrorHandlerDeserializer({...element}) : new ErrorHandlerDeserializer();
|
732
|
-
if (element?.deadLetterChannel !== undefined) {
|
733
|
-
if (Array.isArray(element.deadLetterChannel)) {
|
734
|
-
def.deadLetterChannel = CamelDefinitionYamlStep.readDeadLetterChannelDefinition(element.deadLetterChannel[0]);
|
735
|
-
} else {
|
736
|
-
def.deadLetterChannel = CamelDefinitionYamlStep.readDeadLetterChannelDefinition(element.deadLetterChannel);
|
737
|
-
}
|
738
|
-
}
|
739
|
-
if (element?.noErrorHandler !== undefined) {
|
740
|
-
if (Array.isArray(element.noErrorHandler)) {
|
741
|
-
def.noErrorHandler = CamelDefinitionYamlStep.readNoErrorHandlerDefinition(element.noErrorHandler[0]);
|
742
|
-
} else {
|
743
|
-
def.noErrorHandler = CamelDefinitionYamlStep.readNoErrorHandlerDefinition(element.noErrorHandler);
|
744
|
-
}
|
745
|
-
}
|
746
|
-
if (element?.jtaTransactionErrorHandler !== undefined) {
|
747
|
-
if (Array.isArray(element.jtaTransactionErrorHandler)) {
|
748
|
-
def.jtaTransactionErrorHandler = CamelDefinitionYamlStep.readJtaTransactionErrorHandlerDefinition(element.jtaTransactionErrorHandler[0]);
|
749
|
-
} else {
|
750
|
-
def.jtaTransactionErrorHandler = CamelDefinitionYamlStep.readJtaTransactionErrorHandlerDefinition(element.jtaTransactionErrorHandler);
|
751
|
-
}
|
752
|
-
}
|
753
|
-
if (element?.defaultErrorHandler !== undefined) {
|
754
|
-
if (Array.isArray(element.defaultErrorHandler)) {
|
755
|
-
def.defaultErrorHandler = CamelDefinitionYamlStep.readDefaultErrorHandlerDefinition(element.defaultErrorHandler[0]);
|
756
|
-
} else {
|
757
|
-
def.defaultErrorHandler = CamelDefinitionYamlStep.readDefaultErrorHandlerDefinition(element.defaultErrorHandler);
|
758
|
-
}
|
759
|
-
}
|
760
|
-
if (element?.springTransactionErrorHandler !== undefined) {
|
761
|
-
if (Array.isArray(element.springTransactionErrorHandler)) {
|
762
|
-
def.springTransactionErrorHandler = CamelDefinitionYamlStep.readSpringTransactionErrorHandlerDefinition(element.springTransactionErrorHandler[0]);
|
763
|
-
} else {
|
764
|
-
def.springTransactionErrorHandler = CamelDefinitionYamlStep.readSpringTransactionErrorHandlerDefinition(element.springTransactionErrorHandler);
|
765
|
-
}
|
766
|
-
}
|
767
|
-
if (element?.refErrorHandler !== undefined) {
|
768
|
-
if (Array.isArray(element.refErrorHandler)) {
|
769
|
-
def.refErrorHandler = CamelDefinitionYamlStep.readRefErrorHandlerDefinition(element.refErrorHandler[0]);
|
770
|
-
} else {
|
771
|
-
def.refErrorHandler = CamelDefinitionYamlStep.readRefErrorHandlerDefinition(element.refErrorHandler);
|
772
|
-
}
|
773
|
-
}
|
774
|
-
|
775
|
-
return def;
|
776
|
-
}
|
777
|
-
|
778
|
-
static readOutputAwareFromDefinition = (element: any): OutputAwareFromDefinition => {
|
779
|
-
|
780
|
-
let def = element ? new OutputAwareFromDefinition({...element}) : new OutputAwareFromDefinition();
|
781
|
-
def = ComponentApi.parseElementUri(def);
|
782
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
783
|
-
|
784
|
-
return def;
|
785
|
-
}
|
786
|
-
|
787
|
-
static readAggregateDefinition = (element: any): AggregateDefinition => {
|
788
|
-
|
789
|
-
let def = element ? new AggregateDefinition({...element}) : new AggregateDefinition();
|
790
|
-
if (element?.completionTimeoutExpression !== undefined) {
|
791
|
-
if (Array.isArray(element.completionTimeoutExpression)) {
|
792
|
-
def.completionTimeoutExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.completionTimeoutExpression[0]);
|
793
|
-
} else {
|
794
|
-
def.completionTimeoutExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.completionTimeoutExpression);
|
795
|
-
}
|
796
|
-
}
|
797
|
-
if (element?.correlationExpression !== undefined) {
|
798
|
-
if (Array.isArray(element.correlationExpression)) {
|
799
|
-
def.correlationExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.correlationExpression[0]);
|
800
|
-
} else {
|
801
|
-
def.correlationExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.correlationExpression);
|
802
|
-
}
|
803
|
-
}
|
804
|
-
if (element?.completionPredicate !== undefined) {
|
805
|
-
if (Array.isArray(element.completionPredicate)) {
|
806
|
-
def.completionPredicate = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.completionPredicate[0]);
|
807
|
-
} else {
|
808
|
-
def.completionPredicate = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.completionPredicate);
|
809
|
-
}
|
810
|
-
}
|
811
|
-
if (element?.optimisticLockRetryPolicy !== undefined) {
|
812
|
-
if (Array.isArray(element.optimisticLockRetryPolicy)) {
|
813
|
-
def.optimisticLockRetryPolicy = CamelDefinitionYamlStep.readOptimisticLockRetryPolicyDefinition(element.optimisticLockRetryPolicy[0]);
|
814
|
-
} else {
|
815
|
-
def.optimisticLockRetryPolicy = CamelDefinitionYamlStep.readOptimisticLockRetryPolicyDefinition(element.optimisticLockRetryPolicy);
|
816
|
-
}
|
817
|
-
}
|
818
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
819
|
-
if (element?.completionSizeExpression !== undefined) {
|
820
|
-
if (Array.isArray(element.completionSizeExpression)) {
|
821
|
-
def.completionSizeExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.completionSizeExpression[0]);
|
822
|
-
} else {
|
823
|
-
def.completionSizeExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.completionSizeExpression);
|
824
|
-
}
|
825
|
-
}
|
826
|
-
|
827
|
-
return def;
|
828
|
-
}
|
829
|
-
|
830
|
-
static readBeanDefinition = (element: any): BeanDefinition => {
|
831
|
-
|
832
|
-
let def = element ? new BeanDefinition({...element}) : new BeanDefinition();
|
833
|
-
|
834
|
-
return def;
|
835
|
-
}
|
836
|
-
|
837
|
-
static readBeanFactoryDefinition = (element: any): BeanFactoryDefinition => {
|
838
|
-
|
839
|
-
let def = element ? new BeanFactoryDefinition({...element}) : new BeanFactoryDefinition();
|
840
|
-
|
841
|
-
return def;
|
842
|
-
}
|
843
|
-
|
844
|
-
static readCatchDefinition = (element: any): CatchDefinition => {
|
845
|
-
|
846
|
-
let def = element ? new CatchDefinition({...element}) : new CatchDefinition();
|
847
|
-
if (element?.onWhen !== undefined) {
|
848
|
-
if (Array.isArray(element.onWhen)) {
|
849
|
-
def.onWhen = CamelDefinitionYamlStep.readWhenDefinition(element.onWhen[0]);
|
850
|
-
} else {
|
851
|
-
def.onWhen = CamelDefinitionYamlStep.readWhenDefinition(element.onWhen);
|
852
|
-
}
|
853
|
-
}
|
854
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
855
|
-
|
856
|
-
return def;
|
857
|
-
}
|
858
|
-
|
859
|
-
static readChoiceDefinition = (element: any): ChoiceDefinition => {
|
860
|
-
|
861
|
-
let def = element ? new ChoiceDefinition({...element}) : new ChoiceDefinition();
|
862
|
-
if (element?.otherwise !== undefined) {
|
863
|
-
if (Array.isArray(element.otherwise)) {
|
864
|
-
def.otherwise = CamelDefinitionYamlStep.readOtherwiseDefinition(element.otherwise[0]);
|
865
|
-
} else {
|
866
|
-
def.otherwise = CamelDefinitionYamlStep.readOtherwiseDefinition(element.otherwise);
|
867
|
-
}
|
868
|
-
}
|
869
|
-
def.when = element && element?.when ? element?.when.map((x:any) => CamelDefinitionYamlStep.readWhenDefinition(x)) :[];
|
870
|
-
|
871
|
-
return def;
|
872
|
-
}
|
873
|
-
|
874
|
-
static readCircuitBreakerDefinition = (element: any): CircuitBreakerDefinition => {
|
875
|
-
|
876
|
-
let def = element ? new CircuitBreakerDefinition({...element}) : new CircuitBreakerDefinition();
|
877
|
-
if (element?.faultToleranceConfiguration !== undefined) {
|
878
|
-
if (Array.isArray(element.faultToleranceConfiguration)) {
|
879
|
-
def.faultToleranceConfiguration = CamelDefinitionYamlStep.readFaultToleranceConfigurationDefinition(element.faultToleranceConfiguration[0]);
|
880
|
-
} else {
|
881
|
-
def.faultToleranceConfiguration = CamelDefinitionYamlStep.readFaultToleranceConfigurationDefinition(element.faultToleranceConfiguration);
|
882
|
-
}
|
883
|
-
}
|
884
|
-
if (element?.resilience4jConfiguration !== undefined) {
|
885
|
-
if (Array.isArray(element.resilience4jConfiguration)) {
|
886
|
-
def.resilience4jConfiguration = CamelDefinitionYamlStep.readResilience4jConfigurationDefinition(element.resilience4jConfiguration[0]);
|
887
|
-
} else {
|
888
|
-
def.resilience4jConfiguration = CamelDefinitionYamlStep.readResilience4jConfigurationDefinition(element.resilience4jConfiguration);
|
889
|
-
}
|
890
|
-
}
|
891
|
-
if (element?.onFallback !== undefined) {
|
892
|
-
if (Array.isArray(element.onFallback)) {
|
893
|
-
def.onFallback = CamelDefinitionYamlStep.readOnFallbackDefinition(element.onFallback[0]);
|
894
|
-
} else {
|
895
|
-
def.onFallback = CamelDefinitionYamlStep.readOnFallbackDefinition(element.onFallback);
|
896
|
-
}
|
897
|
-
}
|
898
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
899
|
-
|
900
|
-
return def;
|
901
|
-
}
|
902
|
-
|
903
|
-
static readClaimCheckDefinition = (element: any): ClaimCheckDefinition => {
|
904
|
-
|
905
|
-
let def = element ? new ClaimCheckDefinition({...element}) : new ClaimCheckDefinition();
|
906
|
-
|
907
|
-
return def;
|
908
|
-
}
|
909
|
-
|
910
|
-
static readContextScanDefinition = (element: any): ContextScanDefinition => {
|
911
|
-
|
912
|
-
let def = element ? new ContextScanDefinition({...element}) : new ContextScanDefinition();
|
913
|
-
|
914
|
-
return def;
|
915
|
-
}
|
916
|
-
|
917
|
-
static readConvertBodyDefinition = (element: any): ConvertBodyDefinition => {
|
918
|
-
if (element && typeof element === 'string') element = {type: element};
|
919
|
-
let def = element ? new ConvertBodyDefinition({...element}) : new ConvertBodyDefinition();
|
920
|
-
|
921
|
-
return def;
|
922
|
-
}
|
923
|
-
|
924
|
-
static readConvertHeaderDefinition = (element: any): ConvertHeaderDefinition => {
|
925
|
-
|
926
|
-
let def = element ? new ConvertHeaderDefinition({...element}) : new ConvertHeaderDefinition();
|
927
|
-
|
928
|
-
return def;
|
929
|
-
}
|
930
|
-
|
931
|
-
static readConvertVariableDefinition = (element: any): ConvertVariableDefinition => {
|
932
|
-
|
933
|
-
let def = element ? new ConvertVariableDefinition({...element}) : new ConvertVariableDefinition();
|
934
|
-
|
935
|
-
return def;
|
936
|
-
}
|
937
|
-
|
938
|
-
static readDataFormatDefinition = (element: any): DataFormatDefinition => {
|
939
|
-
|
940
|
-
let def = element ? new DataFormatDefinition({...element}) : new DataFormatDefinition();
|
941
|
-
|
942
|
-
return def;
|
943
|
-
}
|
944
|
-
|
945
|
-
static readDelayDefinition = (element: any): DelayDefinition => {
|
946
|
-
|
947
|
-
let def = element ? new DelayDefinition({...element}) : new DelayDefinition();
|
948
|
-
if (element?.expression !== undefined) {
|
949
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
950
|
-
} else {
|
951
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
952
|
-
if (languageName){
|
953
|
-
const exp:any = {};
|
954
|
-
exp[languageName] = element[languageName]
|
955
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
956
|
-
delete (def as any)[languageName];
|
957
|
-
}
|
958
|
-
}
|
959
|
-
|
960
|
-
return def;
|
961
|
-
}
|
962
|
-
|
963
|
-
static readDynamicRouterDefinition = (element: any): DynamicRouterDefinition => {
|
964
|
-
|
965
|
-
let def = element ? new DynamicRouterDefinition({...element}) : new DynamicRouterDefinition();
|
966
|
-
if (element?.expression !== undefined) {
|
967
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
968
|
-
} else {
|
969
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
970
|
-
if (languageName){
|
971
|
-
const exp:any = {};
|
972
|
-
exp[languageName] = element[languageName]
|
973
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
974
|
-
delete (def as any)[languageName];
|
975
|
-
}
|
976
|
-
}
|
977
|
-
|
978
|
-
return def;
|
979
|
-
}
|
980
|
-
|
981
|
-
static readEnrichDefinition = (element: any): EnrichDefinition => {
|
982
|
-
|
983
|
-
let def = element ? new EnrichDefinition({...element}) : new EnrichDefinition();
|
984
|
-
if (element?.expression !== undefined) {
|
985
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
986
|
-
} else {
|
987
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
988
|
-
if (languageName){
|
989
|
-
const exp:any = {};
|
990
|
-
exp[languageName] = element[languageName]
|
991
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
992
|
-
delete (def as any)[languageName];
|
993
|
-
}
|
994
|
-
}
|
995
|
-
|
996
|
-
return def;
|
997
|
-
}
|
998
|
-
|
999
|
-
static readErrorHandlerDefinition = (element: any): ErrorHandlerDefinition => {
|
1000
|
-
|
1001
|
-
let def = element ? new ErrorHandlerDefinition({...element}) : new ErrorHandlerDefinition();
|
1002
|
-
if (element?.deadLetterChannel !== undefined) {
|
1003
|
-
if (Array.isArray(element.deadLetterChannel)) {
|
1004
|
-
def.deadLetterChannel = CamelDefinitionYamlStep.readDeadLetterChannelDefinition(element.deadLetterChannel[0]);
|
1005
|
-
} else {
|
1006
|
-
def.deadLetterChannel = CamelDefinitionYamlStep.readDeadLetterChannelDefinition(element.deadLetterChannel);
|
1007
|
-
}
|
1008
|
-
}
|
1009
|
-
if (element?.noErrorHandler !== undefined) {
|
1010
|
-
if (Array.isArray(element.noErrorHandler)) {
|
1011
|
-
def.noErrorHandler = CamelDefinitionYamlStep.readNoErrorHandlerDefinition(element.noErrorHandler[0]);
|
1012
|
-
} else {
|
1013
|
-
def.noErrorHandler = CamelDefinitionYamlStep.readNoErrorHandlerDefinition(element.noErrorHandler);
|
1014
|
-
}
|
1015
|
-
}
|
1016
|
-
if (element?.jtaTransactionErrorHandler !== undefined) {
|
1017
|
-
if (Array.isArray(element.jtaTransactionErrorHandler)) {
|
1018
|
-
def.jtaTransactionErrorHandler = CamelDefinitionYamlStep.readJtaTransactionErrorHandlerDefinition(element.jtaTransactionErrorHandler[0]);
|
1019
|
-
} else {
|
1020
|
-
def.jtaTransactionErrorHandler = CamelDefinitionYamlStep.readJtaTransactionErrorHandlerDefinition(element.jtaTransactionErrorHandler);
|
1021
|
-
}
|
1022
|
-
}
|
1023
|
-
if (element?.defaultErrorHandler !== undefined) {
|
1024
|
-
if (Array.isArray(element.defaultErrorHandler)) {
|
1025
|
-
def.defaultErrorHandler = CamelDefinitionYamlStep.readDefaultErrorHandlerDefinition(element.defaultErrorHandler[0]);
|
1026
|
-
} else {
|
1027
|
-
def.defaultErrorHandler = CamelDefinitionYamlStep.readDefaultErrorHandlerDefinition(element.defaultErrorHandler);
|
1028
|
-
}
|
1029
|
-
}
|
1030
|
-
if (element?.springTransactionErrorHandler !== undefined) {
|
1031
|
-
if (Array.isArray(element.springTransactionErrorHandler)) {
|
1032
|
-
def.springTransactionErrorHandler = CamelDefinitionYamlStep.readSpringTransactionErrorHandlerDefinition(element.springTransactionErrorHandler[0]);
|
1033
|
-
} else {
|
1034
|
-
def.springTransactionErrorHandler = CamelDefinitionYamlStep.readSpringTransactionErrorHandlerDefinition(element.springTransactionErrorHandler);
|
1035
|
-
}
|
1036
|
-
}
|
1037
|
-
if (element?.refErrorHandler !== undefined) {
|
1038
|
-
if (Array.isArray(element.refErrorHandler)) {
|
1039
|
-
def.refErrorHandler = CamelDefinitionYamlStep.readRefErrorHandlerDefinition(element.refErrorHandler[0]);
|
1040
|
-
} else {
|
1041
|
-
def.refErrorHandler = CamelDefinitionYamlStep.readRefErrorHandlerDefinition(element.refErrorHandler);
|
1042
|
-
}
|
1043
|
-
}
|
1044
|
-
|
1045
|
-
return def;
|
1046
|
-
}
|
1047
|
-
|
1048
|
-
static readExpressionSubElementDefinition = (element: any): ExpressionSubElementDefinition => {
|
1049
|
-
|
1050
|
-
let def = element ? new ExpressionSubElementDefinition({...element}) : new ExpressionSubElementDefinition();
|
1051
|
-
if (element?.constant !== undefined) {
|
1052
|
-
if (Array.isArray(element.constant)) {
|
1053
|
-
def.constant = CamelDefinitionYamlStep.readConstantExpression(element.constant[0]);
|
1054
|
-
} else {
|
1055
|
-
def.constant = CamelDefinitionYamlStep.readConstantExpression(element.constant);
|
1056
|
-
}
|
1057
|
-
}
|
1058
|
-
if (element?.datasonnet !== undefined) {
|
1059
|
-
if (Array.isArray(element.datasonnet)) {
|
1060
|
-
def.datasonnet = CamelDefinitionYamlStep.readDatasonnetExpression(element.datasonnet[0]);
|
1061
|
-
} else {
|
1062
|
-
def.datasonnet = CamelDefinitionYamlStep.readDatasonnetExpression(element.datasonnet);
|
1063
|
-
}
|
1064
|
-
}
|
1065
|
-
if (element?.jq !== undefined) {
|
1066
|
-
if (Array.isArray(element.jq)) {
|
1067
|
-
def.jq = CamelDefinitionYamlStep.readJqExpression(element.jq[0]);
|
1068
|
-
} else {
|
1069
|
-
def.jq = CamelDefinitionYamlStep.readJqExpression(element.jq);
|
1070
|
-
}
|
1071
|
-
}
|
1072
|
-
if (element?.js !== undefined) {
|
1073
|
-
if (Array.isArray(element.js)) {
|
1074
|
-
def.js = CamelDefinitionYamlStep.readJavaScriptExpression(element.js[0]);
|
1075
|
-
} else {
|
1076
|
-
def.js = CamelDefinitionYamlStep.readJavaScriptExpression(element.js);
|
1077
|
-
}
|
1078
|
-
}
|
1079
|
-
if (element?.language !== undefined) {
|
1080
|
-
if (Array.isArray(element.language)) {
|
1081
|
-
def.language = CamelDefinitionYamlStep.readLanguageExpression(element.language[0]);
|
1082
|
-
} else {
|
1083
|
-
def.language = CamelDefinitionYamlStep.readLanguageExpression(element.language);
|
1084
|
-
}
|
1085
|
-
}
|
1086
|
-
if (element?.simple !== undefined) {
|
1087
|
-
if (Array.isArray(element.simple)) {
|
1088
|
-
def.simple = CamelDefinitionYamlStep.readSimpleExpression(element.simple[0]);
|
1089
|
-
} else {
|
1090
|
-
def.simple = CamelDefinitionYamlStep.readSimpleExpression(element.simple);
|
1091
|
-
}
|
1092
|
-
}
|
1093
|
-
if (element?.tokenize !== undefined) {
|
1094
|
-
if (Array.isArray(element.tokenize)) {
|
1095
|
-
def.tokenize = CamelDefinitionYamlStep.readTokenizerExpression(element.tokenize[0]);
|
1096
|
-
} else {
|
1097
|
-
def.tokenize = CamelDefinitionYamlStep.readTokenizerExpression(element.tokenize);
|
1098
|
-
}
|
1099
|
-
}
|
1100
|
-
if (element?.ref !== undefined) {
|
1101
|
-
if (Array.isArray(element.ref)) {
|
1102
|
-
def.ref = CamelDefinitionYamlStep.readRefExpression(element.ref[0]);
|
1103
|
-
} else {
|
1104
|
-
def.ref = CamelDefinitionYamlStep.readRefExpression(element.ref);
|
1105
|
-
}
|
1106
|
-
}
|
1107
|
-
if (element?.xpath !== undefined) {
|
1108
|
-
if (Array.isArray(element.xpath)) {
|
1109
|
-
def.xpath = CamelDefinitionYamlStep.readXPathExpression(element.xpath[0]);
|
1110
|
-
} else {
|
1111
|
-
def.xpath = CamelDefinitionYamlStep.readXPathExpression(element.xpath);
|
1112
|
-
}
|
1113
|
-
}
|
1114
|
-
if (element?.java !== undefined) {
|
1115
|
-
if (Array.isArray(element.java)) {
|
1116
|
-
def.java = CamelDefinitionYamlStep.readJavaExpression(element.java[0]);
|
1117
|
-
} else {
|
1118
|
-
def.java = CamelDefinitionYamlStep.readJavaExpression(element.java);
|
1119
|
-
}
|
1120
|
-
}
|
1121
|
-
if (element?.wasm !== undefined) {
|
1122
|
-
if (Array.isArray(element.wasm)) {
|
1123
|
-
def.wasm = CamelDefinitionYamlStep.readWasmExpression(element.wasm[0]);
|
1124
|
-
} else {
|
1125
|
-
def.wasm = CamelDefinitionYamlStep.readWasmExpression(element.wasm);
|
1126
|
-
}
|
1127
|
-
}
|
1128
|
-
if (element?.csimple !== undefined) {
|
1129
|
-
if (Array.isArray(element.csimple)) {
|
1130
|
-
def.csimple = CamelDefinitionYamlStep.readCSimpleExpression(element.csimple[0]);
|
1131
|
-
} else {
|
1132
|
-
def.csimple = CamelDefinitionYamlStep.readCSimpleExpression(element.csimple);
|
1133
|
-
}
|
1134
|
-
}
|
1135
|
-
if (element?.jsonpath !== undefined) {
|
1136
|
-
if (Array.isArray(element.jsonpath)) {
|
1137
|
-
def.jsonpath = CamelDefinitionYamlStep.readJsonPathExpression(element.jsonpath[0]);
|
1138
|
-
} else {
|
1139
|
-
def.jsonpath = CamelDefinitionYamlStep.readJsonPathExpression(element.jsonpath);
|
1140
|
-
}
|
1141
|
-
}
|
1142
|
-
if (element?.ognl !== undefined) {
|
1143
|
-
if (Array.isArray(element.ognl)) {
|
1144
|
-
def.ognl = CamelDefinitionYamlStep.readOgnlExpression(element.ognl[0]);
|
1145
|
-
} else {
|
1146
|
-
def.ognl = CamelDefinitionYamlStep.readOgnlExpression(element.ognl);
|
1147
|
-
}
|
1148
|
-
}
|
1149
|
-
if (element?.python !== undefined) {
|
1150
|
-
if (Array.isArray(element.python)) {
|
1151
|
-
def.python = CamelDefinitionYamlStep.readPythonExpression(element.python[0]);
|
1152
|
-
} else {
|
1153
|
-
def.python = CamelDefinitionYamlStep.readPythonExpression(element.python);
|
1154
|
-
}
|
1155
|
-
}
|
1156
|
-
if (element?.mvel !== undefined) {
|
1157
|
-
if (Array.isArray(element.mvel)) {
|
1158
|
-
def.mvel = CamelDefinitionYamlStep.readMvelExpression(element.mvel[0]);
|
1159
|
-
} else {
|
1160
|
-
def.mvel = CamelDefinitionYamlStep.readMvelExpression(element.mvel);
|
1161
|
-
}
|
1162
|
-
}
|
1163
|
-
if (element?.method !== undefined) {
|
1164
|
-
if (Array.isArray(element.method)) {
|
1165
|
-
def.method = CamelDefinitionYamlStep.readMethodCallExpression(element.method[0]);
|
1166
|
-
} else {
|
1167
|
-
def.method = CamelDefinitionYamlStep.readMethodCallExpression(element.method);
|
1168
|
-
}
|
1169
|
-
}
|
1170
|
-
if (element?.xquery !== undefined) {
|
1171
|
-
if (Array.isArray(element.xquery)) {
|
1172
|
-
def.xquery = CamelDefinitionYamlStep.readXQueryExpression(element.xquery[0]);
|
1173
|
-
} else {
|
1174
|
-
def.xquery = CamelDefinitionYamlStep.readXQueryExpression(element.xquery);
|
1175
|
-
}
|
1176
|
-
}
|
1177
|
-
if (element?.hl7terser !== undefined) {
|
1178
|
-
if (Array.isArray(element.hl7terser)) {
|
1179
|
-
def.hl7terser = CamelDefinitionYamlStep.readHl7TerserExpression(element.hl7terser[0]);
|
1180
|
-
} else {
|
1181
|
-
def.hl7terser = CamelDefinitionYamlStep.readHl7TerserExpression(element.hl7terser);
|
1182
|
-
}
|
1183
|
-
}
|
1184
|
-
if (element?.spel !== undefined) {
|
1185
|
-
if (Array.isArray(element.spel)) {
|
1186
|
-
def.spel = CamelDefinitionYamlStep.readSpELExpression(element.spel[0]);
|
1187
|
-
} else {
|
1188
|
-
def.spel = CamelDefinitionYamlStep.readSpELExpression(element.spel);
|
1189
|
-
}
|
1190
|
-
}
|
1191
|
-
if (element?.groovy !== undefined) {
|
1192
|
-
if (Array.isArray(element.groovy)) {
|
1193
|
-
def.groovy = CamelDefinitionYamlStep.readGroovyExpression(element.groovy[0]);
|
1194
|
-
} else {
|
1195
|
-
def.groovy = CamelDefinitionYamlStep.readGroovyExpression(element.groovy);
|
1196
|
-
}
|
1197
|
-
}
|
1198
|
-
if (element?.exchangeProperty !== undefined) {
|
1199
|
-
if (Array.isArray(element.exchangeProperty)) {
|
1200
|
-
def.exchangeProperty = CamelDefinitionYamlStep.readExchangePropertyExpression(element.exchangeProperty[0]);
|
1201
|
-
} else {
|
1202
|
-
def.exchangeProperty = CamelDefinitionYamlStep.readExchangePropertyExpression(element.exchangeProperty);
|
1203
|
-
}
|
1204
|
-
}
|
1205
|
-
if (element?.variable !== undefined) {
|
1206
|
-
if (Array.isArray(element.variable)) {
|
1207
|
-
def.variable = CamelDefinitionYamlStep.readVariableExpression(element.variable[0]);
|
1208
|
-
} else {
|
1209
|
-
def.variable = CamelDefinitionYamlStep.readVariableExpression(element.variable);
|
1210
|
-
}
|
1211
|
-
}
|
1212
|
-
if (element?.header !== undefined) {
|
1213
|
-
if (Array.isArray(element.header)) {
|
1214
|
-
def.header = CamelDefinitionYamlStep.readHeaderExpression(element.header[0]);
|
1215
|
-
} else {
|
1216
|
-
def.header = CamelDefinitionYamlStep.readHeaderExpression(element.header);
|
1217
|
-
}
|
1218
|
-
}
|
1219
|
-
if (element?.xtokenize !== undefined) {
|
1220
|
-
if (Array.isArray(element.xtokenize)) {
|
1221
|
-
def.xtokenize = CamelDefinitionYamlStep.readXMLTokenizerExpression(element.xtokenize[0]);
|
1222
|
-
} else {
|
1223
|
-
def.xtokenize = CamelDefinitionYamlStep.readXMLTokenizerExpression(element.xtokenize);
|
1224
|
-
}
|
1225
|
-
}
|
1226
|
-
|
1227
|
-
return def;
|
1228
|
-
}
|
1229
|
-
|
1230
|
-
static readFaultToleranceConfigurationDefinition = (element: any): FaultToleranceConfigurationDefinition => {
|
1231
|
-
|
1232
|
-
let def = element ? new FaultToleranceConfigurationDefinition({...element}) : new FaultToleranceConfigurationDefinition();
|
1233
|
-
|
1234
|
-
return def;
|
1235
|
-
}
|
1236
|
-
|
1237
|
-
static readFilterDefinition = (element: any): FilterDefinition => {
|
1238
|
-
|
1239
|
-
let def = element ? new FilterDefinition({...element}) : new FilterDefinition();
|
1240
|
-
if (element?.expression !== undefined) {
|
1241
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
1242
|
-
} else {
|
1243
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
1244
|
-
if (languageName){
|
1245
|
-
const exp:any = {};
|
1246
|
-
exp[languageName] = element[languageName]
|
1247
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
1248
|
-
delete (def as any)[languageName];
|
1249
|
-
}
|
1250
|
-
}
|
1251
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1252
|
-
|
1253
|
-
return def;
|
1254
|
-
}
|
1255
|
-
|
1256
|
-
static readFinallyDefinition = (element: any): FinallyDefinition => {
|
1257
|
-
|
1258
|
-
let def = element ? new FinallyDefinition({...element}) : new FinallyDefinition();
|
1259
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1260
|
-
|
1261
|
-
return def;
|
1262
|
-
}
|
1263
|
-
|
1264
|
-
static readFromDefinition = (element: any): FromDefinition => {
|
1265
|
-
if (element && typeof element === 'string') element = { uri: element};
|
1266
|
-
let def = element ? new FromDefinition({...element}) : new FromDefinition();
|
1267
|
-
def = ComponentApi.parseElementUri(def);
|
1268
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1269
|
-
|
1270
|
-
return def;
|
1271
|
-
}
|
1272
|
-
|
1273
|
-
static readGlobalOptionDefinition = (element: any): GlobalOptionDefinition => {
|
1274
|
-
|
1275
|
-
let def = element ? new GlobalOptionDefinition({...element}) : new GlobalOptionDefinition();
|
1276
|
-
|
1277
|
-
return def;
|
1278
|
-
}
|
1279
|
-
|
1280
|
-
static readGlobalOptionsDefinition = (element: any): GlobalOptionsDefinition => {
|
1281
|
-
|
1282
|
-
let def = element ? new GlobalOptionsDefinition({...element}) : new GlobalOptionsDefinition();
|
1283
|
-
def.globalOption = element && element?.globalOption ? element?.globalOption.map((x:any) => CamelDefinitionYamlStep.readGlobalOptionDefinition(x)) :[];
|
1284
|
-
|
1285
|
-
return def;
|
1286
|
-
}
|
1287
|
-
|
1288
|
-
static readIdempotentConsumerDefinition = (element: any): IdempotentConsumerDefinition => {
|
1289
|
-
|
1290
|
-
let def = element ? new IdempotentConsumerDefinition({...element}) : new IdempotentConsumerDefinition();
|
1291
|
-
if (element?.expression !== undefined) {
|
1292
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
1293
|
-
} else {
|
1294
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
1295
|
-
if (languageName){
|
1296
|
-
const exp:any = {};
|
1297
|
-
exp[languageName] = element[languageName]
|
1298
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
1299
|
-
delete (def as any)[languageName];
|
1300
|
-
}
|
1301
|
-
}
|
1302
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1303
|
-
|
1304
|
-
return def;
|
1305
|
-
}
|
1306
|
-
|
1307
|
-
static readInputTypeDefinition = (element: any): InputTypeDefinition => {
|
1308
|
-
|
1309
|
-
let def = element ? new InputTypeDefinition({...element}) : new InputTypeDefinition();
|
1310
|
-
|
1311
|
-
return def;
|
1312
|
-
}
|
1313
|
-
|
1314
|
-
static readInterceptDefinition = (element: any): InterceptDefinition => {
|
1315
|
-
|
1316
|
-
let def = element ? new InterceptDefinition({...element}) : new InterceptDefinition();
|
1317
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1318
|
-
|
1319
|
-
return def;
|
1320
|
-
}
|
1321
|
-
|
1322
|
-
static readInterceptFromDefinition = (element: any): InterceptFromDefinition => {
|
1323
|
-
|
1324
|
-
let def = element ? new InterceptFromDefinition({...element}) : new InterceptFromDefinition();
|
1325
|
-
def = ComponentApi.parseElementUri(def);
|
1326
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1327
|
-
|
1328
|
-
return def;
|
1329
|
-
}
|
1330
|
-
|
1331
|
-
static readInterceptSendToEndpointDefinition = (element: any): InterceptSendToEndpointDefinition => {
|
1332
|
-
if (element && typeof element === 'string') element = {uri: element};
|
1333
|
-
let def = element ? new InterceptSendToEndpointDefinition({...element}) : new InterceptSendToEndpointDefinition();
|
1334
|
-
def = ComponentApi.parseElementUri(def);
|
1335
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1336
|
-
|
1337
|
-
return def;
|
1338
|
-
}
|
1339
|
-
|
1340
|
-
static readKameletDefinition = (element: any): KameletDefinition => {
|
1341
|
-
if (element && typeof element === 'string') element = {name: element};
|
1342
|
-
let def = element ? new KameletDefinition({...element}) : new KameletDefinition();
|
1343
|
-
|
1344
|
-
return def;
|
1345
|
-
}
|
1346
|
-
|
1347
|
-
static readLoadBalanceDefinition = (element: any): LoadBalanceDefinition => {
|
1348
|
-
|
1349
|
-
let def = element ? new LoadBalanceDefinition({...element}) : new LoadBalanceDefinition();
|
1350
|
-
if (element?.roundRobinLoadBalancer !== undefined) {
|
1351
|
-
if (Array.isArray(element.roundRobinLoadBalancer)) {
|
1352
|
-
def.roundRobinLoadBalancer = CamelDefinitionYamlStep.readRoundRobinLoadBalancerDefinition(element.roundRobinLoadBalancer[0]);
|
1353
|
-
} else {
|
1354
|
-
def.roundRobinLoadBalancer = CamelDefinitionYamlStep.readRoundRobinLoadBalancerDefinition(element.roundRobinLoadBalancer);
|
1355
|
-
}
|
1356
|
-
}
|
1357
|
-
if (element?.stickyLoadBalancer !== undefined) {
|
1358
|
-
if (Array.isArray(element.stickyLoadBalancer)) {
|
1359
|
-
def.stickyLoadBalancer = CamelDefinitionYamlStep.readStickyLoadBalancerDefinition(element.stickyLoadBalancer[0]);
|
1360
|
-
} else {
|
1361
|
-
def.stickyLoadBalancer = CamelDefinitionYamlStep.readStickyLoadBalancerDefinition(element.stickyLoadBalancer);
|
1362
|
-
}
|
1363
|
-
}
|
1364
|
-
if (element?.customLoadBalancer !== undefined) {
|
1365
|
-
if (Array.isArray(element.customLoadBalancer)) {
|
1366
|
-
def.customLoadBalancer = CamelDefinitionYamlStep.readCustomLoadBalancerDefinition(element.customLoadBalancer[0]);
|
1367
|
-
} else {
|
1368
|
-
def.customLoadBalancer = CamelDefinitionYamlStep.readCustomLoadBalancerDefinition(element.customLoadBalancer);
|
1369
|
-
}
|
1370
|
-
}
|
1371
|
-
if (element?.topicLoadBalancer !== undefined) {
|
1372
|
-
if (Array.isArray(element.topicLoadBalancer)) {
|
1373
|
-
def.topicLoadBalancer = CamelDefinitionYamlStep.readTopicLoadBalancerDefinition(element.topicLoadBalancer[0]);
|
1374
|
-
} else {
|
1375
|
-
def.topicLoadBalancer = CamelDefinitionYamlStep.readTopicLoadBalancerDefinition(element.topicLoadBalancer);
|
1376
|
-
}
|
1377
|
-
}
|
1378
|
-
if (element?.failoverLoadBalancer !== undefined) {
|
1379
|
-
if (Array.isArray(element.failoverLoadBalancer)) {
|
1380
|
-
def.failoverLoadBalancer = CamelDefinitionYamlStep.readFailoverLoadBalancerDefinition(element.failoverLoadBalancer[0]);
|
1381
|
-
} else {
|
1382
|
-
def.failoverLoadBalancer = CamelDefinitionYamlStep.readFailoverLoadBalancerDefinition(element.failoverLoadBalancer);
|
1383
|
-
}
|
1384
|
-
}
|
1385
|
-
if (element?.weightedLoadBalancer !== undefined) {
|
1386
|
-
if (Array.isArray(element.weightedLoadBalancer)) {
|
1387
|
-
def.weightedLoadBalancer = CamelDefinitionYamlStep.readWeightedLoadBalancerDefinition(element.weightedLoadBalancer[0]);
|
1388
|
-
} else {
|
1389
|
-
def.weightedLoadBalancer = CamelDefinitionYamlStep.readWeightedLoadBalancerDefinition(element.weightedLoadBalancer);
|
1390
|
-
}
|
1391
|
-
}
|
1392
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1393
|
-
if (element?.randomLoadBalancer !== undefined) {
|
1394
|
-
if (Array.isArray(element.randomLoadBalancer)) {
|
1395
|
-
def.randomLoadBalancer = CamelDefinitionYamlStep.readRandomLoadBalancerDefinition(element.randomLoadBalancer[0]);
|
1396
|
-
} else {
|
1397
|
-
def.randomLoadBalancer = CamelDefinitionYamlStep.readRandomLoadBalancerDefinition(element.randomLoadBalancer);
|
1398
|
-
}
|
1399
|
-
}
|
1400
|
-
|
1401
|
-
return def;
|
1402
|
-
}
|
1403
|
-
|
1404
|
-
static readLogDefinition = (element: any): LogDefinition => {
|
1405
|
-
if (element && typeof element === 'string') element = {message: element};
|
1406
|
-
let def = element ? new LogDefinition({...element}) : new LogDefinition();
|
1407
|
-
|
1408
|
-
return def;
|
1409
|
-
}
|
1410
|
-
|
1411
|
-
static readLoopDefinition = (element: any): LoopDefinition => {
|
1412
|
-
|
1413
|
-
let def = element ? new LoopDefinition({...element}) : new LoopDefinition();
|
1414
|
-
if (element?.expression !== undefined) {
|
1415
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
1416
|
-
} else {
|
1417
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
1418
|
-
if (languageName){
|
1419
|
-
const exp:any = {};
|
1420
|
-
exp[languageName] = element[languageName]
|
1421
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
1422
|
-
delete (def as any)[languageName];
|
1423
|
-
}
|
1424
|
-
}
|
1425
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1426
|
-
|
1427
|
-
return def;
|
1428
|
-
}
|
1429
|
-
|
1430
|
-
static readMarshalDefinition = (element: any): MarshalDefinition => {
|
1431
|
-
|
1432
|
-
let def = element ? new MarshalDefinition({...element}) : new MarshalDefinition();
|
1433
|
-
if (element?.univocityCsv !== undefined) {
|
1434
|
-
if (Array.isArray(element.univocityCsv)) {
|
1435
|
-
def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv[0]);
|
1436
|
-
} else {
|
1437
|
-
def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv);
|
1438
|
-
}
|
1439
|
-
}
|
1440
|
-
if (element?.protobuf !== undefined) {
|
1441
|
-
if (Array.isArray(element.protobuf)) {
|
1442
|
-
def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf[0]);
|
1443
|
-
} else {
|
1444
|
-
def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf);
|
1445
|
-
}
|
1446
|
-
}
|
1447
|
-
if (element?.tarFile !== undefined) {
|
1448
|
-
if (Array.isArray(element.tarFile)) {
|
1449
|
-
def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile[0]);
|
1450
|
-
} else {
|
1451
|
-
def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile);
|
1452
|
-
}
|
1453
|
-
}
|
1454
|
-
if (element?.tidyMarkup !== undefined) {
|
1455
|
-
if (Array.isArray(element.tidyMarkup)) {
|
1456
|
-
def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup[0]);
|
1457
|
-
} else {
|
1458
|
-
def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup);
|
1459
|
-
}
|
1460
|
-
}
|
1461
|
-
if (element?.csv !== undefined) {
|
1462
|
-
if (Array.isArray(element.csv)) {
|
1463
|
-
def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv[0]);
|
1464
|
-
} else {
|
1465
|
-
def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv);
|
1466
|
-
}
|
1467
|
-
}
|
1468
|
-
if (element?.base64 !== undefined) {
|
1469
|
-
if (Array.isArray(element.base64)) {
|
1470
|
-
def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64[0]);
|
1471
|
-
} else {
|
1472
|
-
def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64);
|
1473
|
-
}
|
1474
|
-
}
|
1475
|
-
if (element?.zipDeflater !== undefined) {
|
1476
|
-
if (Array.isArray(element.zipDeflater)) {
|
1477
|
-
def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater[0]);
|
1478
|
-
} else {
|
1479
|
-
def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater);
|
1480
|
-
}
|
1481
|
-
}
|
1482
|
-
if (element?.bindy !== undefined) {
|
1483
|
-
if (Array.isArray(element.bindy)) {
|
1484
|
-
def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy[0]);
|
1485
|
-
} else {
|
1486
|
-
def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy);
|
1487
|
-
}
|
1488
|
-
}
|
1489
|
-
if (element?.syslog !== undefined) {
|
1490
|
-
if (Array.isArray(element.syslog)) {
|
1491
|
-
def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog[0]);
|
1492
|
-
} else {
|
1493
|
-
def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog);
|
1494
|
-
}
|
1495
|
-
}
|
1496
|
-
if (element?.zipFile !== undefined) {
|
1497
|
-
if (Array.isArray(element.zipFile)) {
|
1498
|
-
def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile[0]);
|
1499
|
-
} else {
|
1500
|
-
def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile);
|
1501
|
-
}
|
1502
|
-
}
|
1503
|
-
if (element?.jaxb !== undefined) {
|
1504
|
-
if (Array.isArray(element.jaxb)) {
|
1505
|
-
def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb[0]);
|
1506
|
-
} else {
|
1507
|
-
def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb);
|
1508
|
-
}
|
1509
|
-
}
|
1510
|
-
if (element?.parquetAvro !== undefined) {
|
1511
|
-
if (Array.isArray(element.parquetAvro)) {
|
1512
|
-
def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro[0]);
|
1513
|
-
} else {
|
1514
|
-
def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro);
|
1515
|
-
}
|
1516
|
-
}
|
1517
|
-
if (element?.rss !== undefined) {
|
1518
|
-
if (Array.isArray(element.rss)) {
|
1519
|
-
def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss[0]);
|
1520
|
-
} else {
|
1521
|
-
def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss);
|
1522
|
-
}
|
1523
|
-
}
|
1524
|
-
if (element?.mimeMultipart !== undefined) {
|
1525
|
-
if (Array.isArray(element.mimeMultipart)) {
|
1526
|
-
def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart[0]);
|
1527
|
-
} else {
|
1528
|
-
def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart);
|
1529
|
-
}
|
1530
|
-
}
|
1531
|
-
if (element?.asn1 !== undefined) {
|
1532
|
-
if (Array.isArray(element.asn1)) {
|
1533
|
-
def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1[0]);
|
1534
|
-
} else {
|
1535
|
-
def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1);
|
1536
|
-
}
|
1537
|
-
}
|
1538
|
-
if (element?.pgp !== undefined) {
|
1539
|
-
if (Array.isArray(element.pgp)) {
|
1540
|
-
def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp[0]);
|
1541
|
-
} else {
|
1542
|
-
def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp);
|
1543
|
-
}
|
1544
|
-
}
|
1545
|
-
if (element?.thrift !== undefined) {
|
1546
|
-
if (Array.isArray(element.thrift)) {
|
1547
|
-
def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift[0]);
|
1548
|
-
} else {
|
1549
|
-
def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift);
|
1550
|
-
}
|
1551
|
-
}
|
1552
|
-
if (element?.json !== undefined) {
|
1553
|
-
if (Array.isArray(element.json)) {
|
1554
|
-
def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json[0]);
|
1555
|
-
} else {
|
1556
|
-
def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json);
|
1557
|
-
}
|
1558
|
-
}
|
1559
|
-
if (element?.lzf !== undefined) {
|
1560
|
-
if (Array.isArray(element.lzf)) {
|
1561
|
-
def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf[0]);
|
1562
|
-
} else {
|
1563
|
-
def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf);
|
1564
|
-
}
|
1565
|
-
}
|
1566
|
-
if (element?.fhirXml !== undefined) {
|
1567
|
-
if (Array.isArray(element.fhirXml)) {
|
1568
|
-
def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml[0]);
|
1569
|
-
} else {
|
1570
|
-
def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml);
|
1571
|
-
}
|
1572
|
-
}
|
1573
|
-
if (element?.barcode !== undefined) {
|
1574
|
-
if (Array.isArray(element.barcode)) {
|
1575
|
-
def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode[0]);
|
1576
|
-
} else {
|
1577
|
-
def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode);
|
1578
|
-
}
|
1579
|
-
}
|
1580
|
-
if (element?.avro !== undefined) {
|
1581
|
-
if (Array.isArray(element.avro)) {
|
1582
|
-
def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro[0]);
|
1583
|
-
} else {
|
1584
|
-
def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro);
|
1585
|
-
}
|
1586
|
-
}
|
1587
|
-
if (element?.yaml !== undefined) {
|
1588
|
-
if (Array.isArray(element.yaml)) {
|
1589
|
-
def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml[0]);
|
1590
|
-
} else {
|
1591
|
-
def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml);
|
1592
|
-
}
|
1593
|
-
}
|
1594
|
-
if (element?.beanio !== undefined) {
|
1595
|
-
if (Array.isArray(element.beanio)) {
|
1596
|
-
def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio[0]);
|
1597
|
-
} else {
|
1598
|
-
def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio);
|
1599
|
-
}
|
1600
|
-
}
|
1601
|
-
if (element?.fhirJson !== undefined) {
|
1602
|
-
if (Array.isArray(element.fhirJson)) {
|
1603
|
-
def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson[0]);
|
1604
|
-
} else {
|
1605
|
-
def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson);
|
1606
|
-
}
|
1607
|
-
}
|
1608
|
-
if (element?.custom !== undefined) {
|
1609
|
-
if (Array.isArray(element.custom)) {
|
1610
|
-
def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom[0]);
|
1611
|
-
} else {
|
1612
|
-
def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom);
|
1613
|
-
}
|
1614
|
-
}
|
1615
|
-
if (element?.flatpack !== undefined) {
|
1616
|
-
if (Array.isArray(element.flatpack)) {
|
1617
|
-
def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack[0]);
|
1618
|
-
} else {
|
1619
|
-
def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack);
|
1620
|
-
}
|
1621
|
-
}
|
1622
|
-
if (element?.swiftMx !== undefined) {
|
1623
|
-
if (Array.isArray(element.swiftMx)) {
|
1624
|
-
def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx[0]);
|
1625
|
-
} else {
|
1626
|
-
def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx);
|
1627
|
-
}
|
1628
|
-
}
|
1629
|
-
if (element?.cbor !== undefined) {
|
1630
|
-
if (Array.isArray(element.cbor)) {
|
1631
|
-
def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor[0]);
|
1632
|
-
} else {
|
1633
|
-
def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor);
|
1634
|
-
}
|
1635
|
-
}
|
1636
|
-
if (element?.crypto !== undefined) {
|
1637
|
-
if (Array.isArray(element.crypto)) {
|
1638
|
-
def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto[0]);
|
1639
|
-
} else {
|
1640
|
-
def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto);
|
1641
|
-
}
|
1642
|
-
}
|
1643
|
-
if (element?.swiftMt !== undefined) {
|
1644
|
-
if (Array.isArray(element.swiftMt)) {
|
1645
|
-
def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt[0]);
|
1646
|
-
} else {
|
1647
|
-
def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt);
|
1648
|
-
}
|
1649
|
-
}
|
1650
|
-
if (element?.univocityTsv !== undefined) {
|
1651
|
-
if (Array.isArray(element.univocityTsv)) {
|
1652
|
-
def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv[0]);
|
1653
|
-
} else {
|
1654
|
-
def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv);
|
1655
|
-
}
|
1656
|
-
}
|
1657
|
-
if (element?.hl7 !== undefined) {
|
1658
|
-
if (Array.isArray(element.hl7)) {
|
1659
|
-
def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7[0]);
|
1660
|
-
} else {
|
1661
|
-
def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7);
|
1662
|
-
}
|
1663
|
-
}
|
1664
|
-
if (element?.jsonApi !== undefined) {
|
1665
|
-
if (Array.isArray(element.jsonApi)) {
|
1666
|
-
def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi[0]);
|
1667
|
-
} else {
|
1668
|
-
def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi);
|
1669
|
-
}
|
1670
|
-
}
|
1671
|
-
if (element?.xmlSecurity !== undefined) {
|
1672
|
-
if (Array.isArray(element.xmlSecurity)) {
|
1673
|
-
def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity[0]);
|
1674
|
-
} else {
|
1675
|
-
def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity);
|
1676
|
-
}
|
1677
|
-
}
|
1678
|
-
if (element?.ical !== undefined) {
|
1679
|
-
if (Array.isArray(element.ical)) {
|
1680
|
-
def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical[0]);
|
1681
|
-
} else {
|
1682
|
-
def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical);
|
1683
|
-
}
|
1684
|
-
}
|
1685
|
-
if (element?.univocityFixed !== undefined) {
|
1686
|
-
if (Array.isArray(element.univocityFixed)) {
|
1687
|
-
def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed[0]);
|
1688
|
-
} else {
|
1689
|
-
def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed);
|
1690
|
-
}
|
1691
|
-
}
|
1692
|
-
if (element?.jacksonXml !== undefined) {
|
1693
|
-
if (Array.isArray(element.jacksonXml)) {
|
1694
|
-
def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml[0]);
|
1695
|
-
} else {
|
1696
|
-
def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml);
|
1697
|
-
}
|
1698
|
-
}
|
1699
|
-
if (element?.grok !== undefined) {
|
1700
|
-
if (Array.isArray(element.grok)) {
|
1701
|
-
def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok[0]);
|
1702
|
-
} else {
|
1703
|
-
def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok);
|
1704
|
-
}
|
1705
|
-
}
|
1706
|
-
if (element?.gzipDeflater !== undefined) {
|
1707
|
-
if (Array.isArray(element.gzipDeflater)) {
|
1708
|
-
def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater[0]);
|
1709
|
-
} else {
|
1710
|
-
def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater);
|
1711
|
-
}
|
1712
|
-
}
|
1713
|
-
if (element?.soap !== undefined) {
|
1714
|
-
if (Array.isArray(element.soap)) {
|
1715
|
-
def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap[0]);
|
1716
|
-
} else {
|
1717
|
-
def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap);
|
1718
|
-
}
|
1719
|
-
}
|
1720
|
-
|
1721
|
-
return def;
|
1722
|
-
}
|
1723
|
-
|
1724
|
-
static readMulticastDefinition = (element: any): MulticastDefinition => {
|
1725
|
-
|
1726
|
-
let def = element ? new MulticastDefinition({...element}) : new MulticastDefinition();
|
1727
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1728
|
-
|
1729
|
-
return def;
|
1730
|
-
}
|
1731
|
-
|
1732
|
-
static readOnCompletionDefinition = (element: any): OnCompletionDefinition => {
|
1733
|
-
|
1734
|
-
let def = element ? new OnCompletionDefinition({...element}) : new OnCompletionDefinition();
|
1735
|
-
if (element?.onWhen !== undefined) {
|
1736
|
-
if (Array.isArray(element.onWhen)) {
|
1737
|
-
def.onWhen = CamelDefinitionYamlStep.readWhenDefinition(element.onWhen[0]);
|
1738
|
-
} else {
|
1739
|
-
def.onWhen = CamelDefinitionYamlStep.readWhenDefinition(element.onWhen);
|
1740
|
-
}
|
1741
|
-
}
|
1742
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1743
|
-
|
1744
|
-
return def;
|
1745
|
-
}
|
1746
|
-
|
1747
|
-
static readOnExceptionDefinition = (element: any): OnExceptionDefinition => {
|
1748
|
-
|
1749
|
-
let def = element ? new OnExceptionDefinition({...element}) : new OnExceptionDefinition();
|
1750
|
-
if (element?.retryWhile !== undefined) {
|
1751
|
-
if (Array.isArray(element.retryWhile)) {
|
1752
|
-
def.retryWhile = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.retryWhile[0]);
|
1753
|
-
} else {
|
1754
|
-
def.retryWhile = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.retryWhile);
|
1755
|
-
}
|
1756
|
-
}
|
1757
|
-
if (element?.redeliveryPolicy !== undefined) {
|
1758
|
-
if (Array.isArray(element.redeliveryPolicy)) {
|
1759
|
-
def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy[0]);
|
1760
|
-
} else {
|
1761
|
-
def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy);
|
1762
|
-
}
|
1763
|
-
}
|
1764
|
-
if (element?.handled !== undefined) {
|
1765
|
-
if (Array.isArray(element.handled)) {
|
1766
|
-
def.handled = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.handled[0]);
|
1767
|
-
} else {
|
1768
|
-
def.handled = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.handled);
|
1769
|
-
}
|
1770
|
-
}
|
1771
|
-
if (element?.onWhen !== undefined) {
|
1772
|
-
if (Array.isArray(element.onWhen)) {
|
1773
|
-
def.onWhen = CamelDefinitionYamlStep.readWhenDefinition(element.onWhen[0]);
|
1774
|
-
} else {
|
1775
|
-
def.onWhen = CamelDefinitionYamlStep.readWhenDefinition(element.onWhen);
|
1776
|
-
}
|
1777
|
-
}
|
1778
|
-
if (element?.continued !== undefined) {
|
1779
|
-
if (Array.isArray(element.continued)) {
|
1780
|
-
def.continued = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.continued[0]);
|
1781
|
-
} else {
|
1782
|
-
def.continued = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.continued);
|
1783
|
-
}
|
1784
|
-
}
|
1785
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1786
|
-
|
1787
|
-
return def;
|
1788
|
-
}
|
1789
|
-
|
1790
|
-
static readOnFallbackDefinition = (element: any): OnFallbackDefinition => {
|
1791
|
-
|
1792
|
-
let def = element ? new OnFallbackDefinition({...element}) : new OnFallbackDefinition();
|
1793
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1794
|
-
|
1795
|
-
return def;
|
1796
|
-
}
|
1797
|
-
|
1798
|
-
static readOptimisticLockRetryPolicyDefinition = (element: any): OptimisticLockRetryPolicyDefinition => {
|
1799
|
-
|
1800
|
-
let def = element ? new OptimisticLockRetryPolicyDefinition({...element}) : new OptimisticLockRetryPolicyDefinition();
|
1801
|
-
|
1802
|
-
return def;
|
1803
|
-
}
|
1804
|
-
|
1805
|
-
static readOtherwiseDefinition = (element: any): OtherwiseDefinition => {
|
1806
|
-
|
1807
|
-
let def = element ? new OtherwiseDefinition({...element}) : new OtherwiseDefinition();
|
1808
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1809
|
-
|
1810
|
-
return def;
|
1811
|
-
}
|
1812
|
-
|
1813
|
-
static readOutputDefinition = (element: any): OutputDefinition => {
|
1814
|
-
|
1815
|
-
let def = element ? new OutputDefinition({...element}) : new OutputDefinition();
|
1816
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1817
|
-
|
1818
|
-
return def;
|
1819
|
-
}
|
1820
|
-
|
1821
|
-
static readOutputTypeDefinition = (element: any): OutputTypeDefinition => {
|
1822
|
-
|
1823
|
-
let def = element ? new OutputTypeDefinition({...element}) : new OutputTypeDefinition();
|
1824
|
-
|
1825
|
-
return def;
|
1826
|
-
}
|
1827
|
-
|
1828
|
-
static readPackageScanDefinition = (element: any): PackageScanDefinition => {
|
1829
|
-
|
1830
|
-
let def = element ? new PackageScanDefinition({...element}) : new PackageScanDefinition();
|
1831
|
-
|
1832
|
-
return def;
|
1833
|
-
}
|
1834
|
-
|
1835
|
-
static readPausableDefinition = (element: any): PausableDefinition => {
|
1836
|
-
|
1837
|
-
let def = element ? new PausableDefinition({...element}) : new PausableDefinition();
|
1838
|
-
|
1839
|
-
return def;
|
1840
|
-
}
|
1841
|
-
|
1842
|
-
static readPipelineDefinition = (element: any): PipelineDefinition => {
|
1843
|
-
|
1844
|
-
let def = element ? new PipelineDefinition({...element}) : new PipelineDefinition();
|
1845
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1846
|
-
|
1847
|
-
return def;
|
1848
|
-
}
|
1849
|
-
|
1850
|
-
static readPolicyDefinition = (element: any): PolicyDefinition => {
|
1851
|
-
|
1852
|
-
let def = element ? new PolicyDefinition({...element}) : new PolicyDefinition();
|
1853
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1854
|
-
|
1855
|
-
return def;
|
1856
|
-
}
|
1857
|
-
|
1858
|
-
static readPollDefinition = (element: any): PollDefinition => {
|
1859
|
-
if (element && typeof element === 'string') element = {uri: element};
|
1860
|
-
let def = element ? new PollDefinition({...element}) : new PollDefinition();
|
1861
|
-
def = ComponentApi.parseElementUri(def);
|
1862
|
-
|
1863
|
-
return def;
|
1864
|
-
}
|
1865
|
-
|
1866
|
-
static readPollEnrichDefinition = (element: any): PollEnrichDefinition => {
|
1867
|
-
|
1868
|
-
let def = element ? new PollEnrichDefinition({...element}) : new PollEnrichDefinition();
|
1869
|
-
if (element?.expression !== undefined) {
|
1870
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
1871
|
-
} else {
|
1872
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
1873
|
-
if (languageName){
|
1874
|
-
const exp:any = {};
|
1875
|
-
exp[languageName] = element[languageName]
|
1876
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
1877
|
-
delete (def as any)[languageName];
|
1878
|
-
}
|
1879
|
-
}
|
1880
|
-
|
1881
|
-
return def;
|
1882
|
-
}
|
1883
|
-
|
1884
|
-
static readProcessDefinition = (element: any): ProcessDefinition => {
|
1885
|
-
|
1886
|
-
let def = element ? new ProcessDefinition({...element}) : new ProcessDefinition();
|
1887
|
-
|
1888
|
-
return def;
|
1889
|
-
}
|
1890
|
-
|
1891
|
-
static readPropertyDefinition = (element: any): PropertyDefinition => {
|
1892
|
-
|
1893
|
-
let def = element ? new PropertyDefinition({...element}) : new PropertyDefinition();
|
1894
|
-
|
1895
|
-
return def;
|
1896
|
-
}
|
1897
|
-
|
1898
|
-
static readPropertyExpressionDefinition = (element: any): PropertyExpressionDefinition => {
|
1899
|
-
|
1900
|
-
let def = element ? new PropertyExpressionDefinition({...element}) : new PropertyExpressionDefinition();
|
1901
|
-
if (element?.expression !== undefined) {
|
1902
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
1903
|
-
} else {
|
1904
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
1905
|
-
if (languageName){
|
1906
|
-
const exp:any = {};
|
1907
|
-
exp[languageName] = element[languageName]
|
1908
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
1909
|
-
delete (def as any)[languageName];
|
1910
|
-
}
|
1911
|
-
}
|
1912
|
-
|
1913
|
-
return def;
|
1914
|
-
}
|
1915
|
-
|
1916
|
-
static readRecipientListDefinition = (element: any): RecipientListDefinition => {
|
1917
|
-
|
1918
|
-
let def = element ? new RecipientListDefinition({...element}) : new RecipientListDefinition();
|
1919
|
-
if (element?.expression !== undefined) {
|
1920
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
1921
|
-
} else {
|
1922
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
1923
|
-
if (languageName){
|
1924
|
-
const exp:any = {};
|
1925
|
-
exp[languageName] = element[languageName]
|
1926
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
1927
|
-
delete (def as any)[languageName];
|
1928
|
-
}
|
1929
|
-
}
|
1930
|
-
|
1931
|
-
return def;
|
1932
|
-
}
|
1933
|
-
|
1934
|
-
static readRedeliveryPolicyDefinition = (element: any): RedeliveryPolicyDefinition => {
|
1935
|
-
|
1936
|
-
let def = element ? new RedeliveryPolicyDefinition({...element}) : new RedeliveryPolicyDefinition();
|
1937
|
-
|
1938
|
-
return def;
|
1939
|
-
}
|
1940
|
-
|
1941
|
-
static readRemoveHeaderDefinition = (element: any): RemoveHeaderDefinition => {
|
1942
|
-
if (element && typeof element === 'string') element = {name: element};
|
1943
|
-
let def = element ? new RemoveHeaderDefinition({...element}) : new RemoveHeaderDefinition();
|
1944
|
-
|
1945
|
-
return def;
|
1946
|
-
}
|
1947
|
-
|
1948
|
-
static readRemoveHeadersDefinition = (element: any): RemoveHeadersDefinition => {
|
1949
|
-
if (element && typeof element === 'string') element = {pattern: element};
|
1950
|
-
let def = element ? new RemoveHeadersDefinition({...element}) : new RemoveHeadersDefinition();
|
1951
|
-
|
1952
|
-
return def;
|
1953
|
-
}
|
1954
|
-
|
1955
|
-
static readRemovePropertiesDefinition = (element: any): RemovePropertiesDefinition => {
|
1956
|
-
if (element && typeof element === 'string') element = {pattern: element};
|
1957
|
-
let def = element ? new RemovePropertiesDefinition({...element}) : new RemovePropertiesDefinition();
|
1958
|
-
|
1959
|
-
return def;
|
1960
|
-
}
|
1961
|
-
|
1962
|
-
static readRemovePropertyDefinition = (element: any): RemovePropertyDefinition => {
|
1963
|
-
if (element && typeof element === 'string') element = {name: element};
|
1964
|
-
let def = element ? new RemovePropertyDefinition({...element}) : new RemovePropertyDefinition();
|
1965
|
-
|
1966
|
-
return def;
|
1967
|
-
}
|
1968
|
-
|
1969
|
-
static readRemoveVariableDefinition = (element: any): RemoveVariableDefinition => {
|
1970
|
-
if (element && typeof element === 'string') element = {name: element};
|
1971
|
-
let def = element ? new RemoveVariableDefinition({...element}) : new RemoveVariableDefinition();
|
1972
|
-
|
1973
|
-
return def;
|
1974
|
-
}
|
1975
|
-
|
1976
|
-
static readResequenceDefinition = (element: any): ResequenceDefinition => {
|
1977
|
-
|
1978
|
-
let def = element ? new ResequenceDefinition({...element}) : new ResequenceDefinition();
|
1979
|
-
if (element?.streamConfig !== undefined) {
|
1980
|
-
if (Array.isArray(element.streamConfig)) {
|
1981
|
-
def.streamConfig = CamelDefinitionYamlStep.readStreamResequencerConfig(element.streamConfig[0]);
|
1982
|
-
} else {
|
1983
|
-
def.streamConfig = CamelDefinitionYamlStep.readStreamResequencerConfig(element.streamConfig);
|
1984
|
-
}
|
1985
|
-
}
|
1986
|
-
if (element?.expression !== undefined) {
|
1987
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
1988
|
-
} else {
|
1989
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
1990
|
-
if (languageName){
|
1991
|
-
const exp:any = {};
|
1992
|
-
exp[languageName] = element[languageName]
|
1993
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
1994
|
-
delete (def as any)[languageName];
|
1995
|
-
}
|
1996
|
-
}
|
1997
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
1998
|
-
if (element?.batchConfig !== undefined) {
|
1999
|
-
if (Array.isArray(element.batchConfig)) {
|
2000
|
-
def.batchConfig = CamelDefinitionYamlStep.readBatchResequencerConfig(element.batchConfig[0]);
|
2001
|
-
} else {
|
2002
|
-
def.batchConfig = CamelDefinitionYamlStep.readBatchResequencerConfig(element.batchConfig);
|
2003
|
-
}
|
2004
|
-
}
|
2005
|
-
|
2006
|
-
return def;
|
2007
|
-
}
|
2008
|
-
|
2009
|
-
static readResilience4jConfigurationDefinition = (element: any): Resilience4jConfigurationDefinition => {
|
2010
|
-
|
2011
|
-
let def = element ? new Resilience4jConfigurationDefinition({...element}) : new Resilience4jConfigurationDefinition();
|
2012
|
-
|
2013
|
-
return def;
|
2014
|
-
}
|
2015
|
-
|
2016
|
-
static readRestContextRefDefinition = (element: any): RestContextRefDefinition => {
|
2017
|
-
if (element && typeof element === 'string') element = {ref: element};
|
2018
|
-
let def = element ? new RestContextRefDefinition({...element}) : new RestContextRefDefinition();
|
2019
|
-
|
2020
|
-
return def;
|
2021
|
-
}
|
2022
|
-
|
2023
|
-
static readResumableDefinition = (element: any): ResumableDefinition => {
|
2024
|
-
|
2025
|
-
let def = element ? new ResumableDefinition({...element}) : new ResumableDefinition();
|
2026
|
-
|
2027
|
-
return def;
|
2028
|
-
}
|
2029
|
-
|
2030
|
-
static readRollbackDefinition = (element: any): RollbackDefinition => {
|
2031
|
-
|
2032
|
-
let def = element ? new RollbackDefinition({...element}) : new RollbackDefinition();
|
2033
|
-
|
2034
|
-
return def;
|
2035
|
-
}
|
2036
|
-
|
2037
|
-
static readRouteBuilderDefinition = (element: any): RouteBuilderDefinition => {
|
2038
|
-
if (element && typeof element === 'string') element = {ref: element};
|
2039
|
-
let def = element ? new RouteBuilderDefinition({...element}) : new RouteBuilderDefinition();
|
2040
|
-
|
2041
|
-
return def;
|
2042
|
-
}
|
2043
|
-
|
2044
|
-
static readRouteConfigurationContextRefDefinition = (element: any): RouteConfigurationContextRefDefinition => {
|
2045
|
-
if (element && typeof element === 'string') element = {ref: element};
|
2046
|
-
let def = element ? new RouteConfigurationContextRefDefinition({...element}) : new RouteConfigurationContextRefDefinition();
|
2047
|
-
|
2048
|
-
return def;
|
2049
|
-
}
|
2050
|
-
|
2051
|
-
static readRouteConfigurationDefinition = (element: any): RouteConfigurationDefinition => {
|
2052
|
-
|
2053
|
-
let def = element ? new RouteConfigurationDefinition({...element}) : new RouteConfigurationDefinition();
|
2054
|
-
def.onCompletion = element && element?.onCompletion ? element?.onCompletion.map((x:any) => CamelDefinitionYamlStep.readOnCompletionDefinition(x.onCompletion)) :[];
|
2055
|
-
def.interceptSendToEndpoint = element && element?.interceptSendToEndpoint ? element?.interceptSendToEndpoint.map((x:any) => CamelDefinitionYamlStep.readInterceptSendToEndpointDefinition(x.interceptSendToEndpoint)) :[];
|
2056
|
-
def.intercept = element && element?.intercept ? element?.intercept.map((x:any) => CamelDefinitionYamlStep.readInterceptDefinition(x.intercept)) :[];
|
2057
|
-
if (element?.errorHandler !== undefined) {
|
2058
|
-
if (Array.isArray(element.errorHandler)) {
|
2059
|
-
def.errorHandler = CamelDefinitionYamlStep.readErrorHandlerDefinition(element.errorHandler[0]);
|
2060
|
-
} else {
|
2061
|
-
def.errorHandler = CamelDefinitionYamlStep.readErrorHandlerDefinition(element.errorHandler);
|
2062
|
-
}
|
2063
|
-
}
|
2064
|
-
def.onException = element && element?.onException ? element?.onException.map((x:any) => CamelDefinitionYamlStep.readOnExceptionDefinition(x.onException)) :[];
|
2065
|
-
def.interceptFrom = element && element?.interceptFrom ? element?.interceptFrom.map((x:any) => CamelDefinitionYamlStep.readInterceptFromDefinition(x.interceptFrom)) :[];
|
2066
|
-
|
2067
|
-
return def;
|
2068
|
-
}
|
2069
|
-
|
2070
|
-
static readRouteContextRefDefinition = (element: any): RouteContextRefDefinition => {
|
2071
|
-
if (element && typeof element === 'string') element = {ref: element};
|
2072
|
-
let def = element ? new RouteContextRefDefinition({...element}) : new RouteContextRefDefinition();
|
2073
|
-
|
2074
|
-
return def;
|
2075
|
-
}
|
2076
|
-
|
2077
|
-
static readRouteDefinition = (element: any): RouteDefinition => {
|
2078
|
-
|
2079
|
-
let def = element ? new RouteDefinition({...element}) : new RouteDefinition();
|
2080
|
-
if (element?.outputType !== undefined) {
|
2081
|
-
if (Array.isArray(element.outputType)) {
|
2082
|
-
def.outputType = CamelDefinitionYamlStep.readOutputTypeDefinition(element.outputType[0]);
|
2083
|
-
} else {
|
2084
|
-
def.outputType = CamelDefinitionYamlStep.readOutputTypeDefinition(element.outputType);
|
2085
|
-
}
|
2086
|
-
}
|
2087
|
-
if (element?.errorHandler !== undefined) {
|
2088
|
-
if (Array.isArray(element.errorHandler)) {
|
2089
|
-
def.errorHandler = CamelDefinitionYamlStep.readErrorHandlerDefinition(element.errorHandler[0]);
|
2090
|
-
} else {
|
2091
|
-
def.errorHandler = CamelDefinitionYamlStep.readErrorHandlerDefinition(element.errorHandler);
|
2092
|
-
}
|
2093
|
-
}
|
2094
|
-
if (element?.inputType !== undefined) {
|
2095
|
-
if (Array.isArray(element.inputType)) {
|
2096
|
-
def.inputType = CamelDefinitionYamlStep.readInputTypeDefinition(element.inputType[0]);
|
2097
|
-
} else {
|
2098
|
-
def.inputType = CamelDefinitionYamlStep.readInputTypeDefinition(element.inputType);
|
2099
|
-
}
|
2100
|
-
}
|
2101
|
-
if (element?.from !== undefined) {
|
2102
|
-
if (Array.isArray(element.from)) {
|
2103
|
-
def.from = CamelDefinitionYamlStep.readFromDefinition(element.from[0]);
|
2104
|
-
} else {
|
2105
|
-
def.from = CamelDefinitionYamlStep.readFromDefinition(element.from);
|
2106
|
-
}
|
2107
|
-
}
|
2108
|
-
|
2109
|
-
return def;
|
2110
|
-
}
|
2111
|
-
|
2112
|
-
static readRouteTemplateDefinition = (element: any): RouteTemplateDefinition => {
|
2113
|
-
|
2114
|
-
let def = element ? new RouteTemplateDefinition({...element}) : new RouteTemplateDefinition();
|
2115
|
-
if (element?.route !== undefined) {
|
2116
|
-
if (Array.isArray(element.route)) {
|
2117
|
-
def.route = CamelDefinitionYamlStep.readRouteDefinition(element.route[0]);
|
2118
|
-
} else {
|
2119
|
-
def.route = CamelDefinitionYamlStep.readRouteDefinition(element.route);
|
2120
|
-
}
|
2121
|
-
}
|
2122
|
-
def.beans = element && element?.beans ? element?.beans.map((x:any) => CamelDefinitionYamlStep.readBeanFactoryDefinition(x)) :[];
|
2123
|
-
if (element?.from !== undefined) {
|
2124
|
-
if (Array.isArray(element.from)) {
|
2125
|
-
def.from = CamelDefinitionYamlStep.readFromDefinition(element.from[0]);
|
2126
|
-
} else {
|
2127
|
-
def.from = CamelDefinitionYamlStep.readFromDefinition(element.from);
|
2128
|
-
}
|
2129
|
-
}
|
2130
|
-
def.parameters = element && element?.parameters ? element?.parameters.map((x:any) => CamelDefinitionYamlStep.readRouteTemplateParameterDefinition(x)) :[];
|
2131
|
-
|
2132
|
-
return def;
|
2133
|
-
}
|
2134
|
-
|
2135
|
-
static readRouteTemplateParameterDefinition = (element: any): RouteTemplateParameterDefinition => {
|
2136
|
-
|
2137
|
-
let def = element ? new RouteTemplateParameterDefinition({...element}) : new RouteTemplateParameterDefinition();
|
2138
|
-
|
2139
|
-
return def;
|
2140
|
-
}
|
2141
|
-
|
2142
|
-
static readRoutingSlipDefinition = (element: any): RoutingSlipDefinition => {
|
2143
|
-
|
2144
|
-
let def = element ? new RoutingSlipDefinition({...element}) : new RoutingSlipDefinition();
|
2145
|
-
if (element?.expression !== undefined) {
|
2146
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
2147
|
-
} else {
|
2148
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
2149
|
-
if (languageName){
|
2150
|
-
const exp:any = {};
|
2151
|
-
exp[languageName] = element[languageName]
|
2152
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
2153
|
-
delete (def as any)[languageName];
|
2154
|
-
}
|
2155
|
-
}
|
2156
|
-
|
2157
|
-
return def;
|
2158
|
-
}
|
2159
|
-
|
2160
|
-
static readSagaActionUriDefinition = (element: any): SagaActionUriDefinition => {
|
2161
|
-
if (element && typeof element === 'string') element = {uri: element};
|
2162
|
-
let def = element ? new SagaActionUriDefinition({...element}) : new SagaActionUriDefinition();
|
2163
|
-
def = ComponentApi.parseElementUri(def);
|
2164
|
-
|
2165
|
-
return def;
|
2166
|
-
}
|
2167
|
-
|
2168
|
-
static readSagaDefinition = (element: any): SagaDefinition => {
|
2169
|
-
|
2170
|
-
let def = element ? new SagaDefinition({...element}) : new SagaDefinition();
|
2171
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
2172
|
-
def.option = element && element?.option ? element?.option.map((x:any) => CamelDefinitionYamlStep.readPropertyExpressionDefinition(x)) :[];
|
2173
|
-
|
2174
|
-
return def;
|
2175
|
-
}
|
2176
|
-
|
2177
|
-
static readSamplingDefinition = (element: any): SamplingDefinition => {
|
2178
|
-
|
2179
|
-
let def = element ? new SamplingDefinition({...element}) : new SamplingDefinition();
|
2180
|
-
|
2181
|
-
return def;
|
2182
|
-
}
|
2183
|
-
|
2184
|
-
static readScriptDefinition = (element: any): ScriptDefinition => {
|
2185
|
-
|
2186
|
-
let def = element ? new ScriptDefinition({...element}) : new ScriptDefinition();
|
2187
|
-
if (element?.expression !== undefined) {
|
2188
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
2189
|
-
} else {
|
2190
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
2191
|
-
if (languageName){
|
2192
|
-
const exp:any = {};
|
2193
|
-
exp[languageName] = element[languageName]
|
2194
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
2195
|
-
delete (def as any)[languageName];
|
2196
|
-
}
|
2197
|
-
}
|
2198
|
-
|
2199
|
-
return def;
|
2200
|
-
}
|
2201
|
-
|
2202
|
-
static readSetBodyDefinition = (element: any): SetBodyDefinition => {
|
2203
|
-
|
2204
|
-
let def = element ? new SetBodyDefinition({...element}) : new SetBodyDefinition();
|
2205
|
-
if (element?.expression !== undefined) {
|
2206
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
2207
|
-
} else {
|
2208
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
2209
|
-
if (languageName){
|
2210
|
-
const exp:any = {};
|
2211
|
-
exp[languageName] = element[languageName]
|
2212
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
2213
|
-
delete (def as any)[languageName];
|
2214
|
-
}
|
2215
|
-
}
|
2216
|
-
|
2217
|
-
return def;
|
2218
|
-
}
|
2219
|
-
|
2220
|
-
static readSetExchangePatternDefinition = (element: any): SetExchangePatternDefinition => {
|
2221
|
-
|
2222
|
-
let def = element ? new SetExchangePatternDefinition({...element}) : new SetExchangePatternDefinition();
|
2223
|
-
|
2224
|
-
return def;
|
2225
|
-
}
|
2226
|
-
|
2227
|
-
static readSetHeaderDefinition = (element: any): SetHeaderDefinition => {
|
2228
|
-
|
2229
|
-
let def = element ? new SetHeaderDefinition({...element}) : new SetHeaderDefinition();
|
2230
|
-
if (element?.expression !== undefined) {
|
2231
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
2232
|
-
} else {
|
2233
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
2234
|
-
if (languageName){
|
2235
|
-
const exp:any = {};
|
2236
|
-
exp[languageName] = element[languageName]
|
2237
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
2238
|
-
delete (def as any)[languageName];
|
2239
|
-
}
|
2240
|
-
}
|
2241
|
-
|
2242
|
-
return def;
|
2243
|
-
}
|
2244
|
-
|
2245
|
-
static readSetHeadersDefinition = (element: any): SetHeadersDefinition => {
|
2246
|
-
|
2247
|
-
let def = element ? new SetHeadersDefinition({...element}) : new SetHeadersDefinition();
|
2248
|
-
def.headers = element && element?.headers ? element?.headers.map((x:any) => CamelDefinitionYamlStep.readSetHeaderDefinition(x)) :[];
|
2249
|
-
|
2250
|
-
return def;
|
2251
|
-
}
|
2252
|
-
|
2253
|
-
static readSetPropertyDefinition = (element: any): SetPropertyDefinition => {
|
2254
|
-
|
2255
|
-
let def = element ? new SetPropertyDefinition({...element}) : new SetPropertyDefinition();
|
2256
|
-
if (element?.expression !== undefined) {
|
2257
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
2258
|
-
} else {
|
2259
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
2260
|
-
if (languageName){
|
2261
|
-
const exp:any = {};
|
2262
|
-
exp[languageName] = element[languageName]
|
2263
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
2264
|
-
delete (def as any)[languageName];
|
2265
|
-
}
|
2266
|
-
}
|
2267
|
-
|
2268
|
-
return def;
|
2269
|
-
}
|
2270
|
-
|
2271
|
-
static readSetVariableDefinition = (element: any): SetVariableDefinition => {
|
2272
|
-
|
2273
|
-
let def = element ? new SetVariableDefinition({...element}) : new SetVariableDefinition();
|
2274
|
-
if (element?.expression !== undefined) {
|
2275
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
2276
|
-
} else {
|
2277
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
2278
|
-
if (languageName){
|
2279
|
-
const exp:any = {};
|
2280
|
-
exp[languageName] = element[languageName]
|
2281
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
2282
|
-
delete (def as any)[languageName];
|
2283
|
-
}
|
2284
|
-
}
|
2285
|
-
|
2286
|
-
return def;
|
2287
|
-
}
|
2288
|
-
|
2289
|
-
static readSetVariablesDefinition = (element: any): SetVariablesDefinition => {
|
2290
|
-
|
2291
|
-
let def = element ? new SetVariablesDefinition({...element}) : new SetVariablesDefinition();
|
2292
|
-
def.variables = element && element?.variables ? element?.variables.map((x:any) => CamelDefinitionYamlStep.readSetVariableDefinition(x)) :[];
|
2293
|
-
|
2294
|
-
return def;
|
2295
|
-
}
|
2296
|
-
|
2297
|
-
static readSortDefinition = (element: any): SortDefinition => {
|
2298
|
-
|
2299
|
-
let def = element ? new SortDefinition({...element}) : new SortDefinition();
|
2300
|
-
if (element?.expression !== undefined) {
|
2301
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
2302
|
-
} else {
|
2303
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
2304
|
-
if (languageName){
|
2305
|
-
const exp:any = {};
|
2306
|
-
exp[languageName] = element[languageName]
|
2307
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
2308
|
-
delete (def as any)[languageName];
|
2309
|
-
}
|
2310
|
-
}
|
2311
|
-
|
2312
|
-
return def;
|
2313
|
-
}
|
2314
|
-
|
2315
|
-
static readSplitDefinition = (element: any): SplitDefinition => {
|
2316
|
-
|
2317
|
-
let def = element ? new SplitDefinition({...element}) : new SplitDefinition();
|
2318
|
-
if (element?.expression !== undefined) {
|
2319
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
2320
|
-
} else {
|
2321
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
2322
|
-
if (languageName){
|
2323
|
-
const exp:any = {};
|
2324
|
-
exp[languageName] = element[languageName]
|
2325
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
2326
|
-
delete (def as any)[languageName];
|
2327
|
-
}
|
2328
|
-
}
|
2329
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
2330
|
-
|
2331
|
-
return def;
|
2332
|
-
}
|
2333
|
-
|
2334
|
-
static readStepDefinition = (element: any): StepDefinition => {
|
2335
|
-
|
2336
|
-
let def = element ? new StepDefinition({...element}) : new StepDefinition();
|
2337
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
2338
|
-
|
2339
|
-
return def;
|
2340
|
-
}
|
2341
|
-
|
2342
|
-
static readStopDefinition = (element: any): StopDefinition => {
|
2343
|
-
|
2344
|
-
let def = element ? new StopDefinition({...element}) : new StopDefinition();
|
2345
|
-
|
2346
|
-
return def;
|
2347
|
-
}
|
2348
|
-
|
2349
|
-
static readTemplatedRouteDefinition = (element: any): TemplatedRouteDefinition => {
|
2350
|
-
|
2351
|
-
let def = element ? new TemplatedRouteDefinition({...element}) : new TemplatedRouteDefinition();
|
2352
|
-
def.beans = element && element?.beans ? element?.beans.map((x:any) => CamelDefinitionYamlStep.readBeanFactoryDefinition(x)) :[];
|
2353
|
-
def.parameters = element && element?.parameters ? element?.parameters.map((x:any) => CamelDefinitionYamlStep.readTemplatedRouteParameterDefinition(x)) :[];
|
2354
|
-
|
2355
|
-
return def;
|
2356
|
-
}
|
2357
|
-
|
2358
|
-
static readTemplatedRouteParameterDefinition = (element: any): TemplatedRouteParameterDefinition => {
|
2359
|
-
|
2360
|
-
let def = element ? new TemplatedRouteParameterDefinition({...element}) : new TemplatedRouteParameterDefinition();
|
2361
|
-
|
2362
|
-
return def;
|
2363
|
-
}
|
2364
|
-
|
2365
|
-
static readThreadPoolProfileDefinition = (element: any): ThreadPoolProfileDefinition => {
|
2366
|
-
|
2367
|
-
let def = element ? new ThreadPoolProfileDefinition({...element}) : new ThreadPoolProfileDefinition();
|
2368
|
-
|
2369
|
-
return def;
|
2370
|
-
}
|
2371
|
-
|
2372
|
-
static readThreadsDefinition = (element: any): ThreadsDefinition => {
|
2373
|
-
|
2374
|
-
let def = element ? new ThreadsDefinition({...element}) : new ThreadsDefinition();
|
2375
|
-
|
2376
|
-
return def;
|
2377
|
-
}
|
2378
|
-
|
2379
|
-
static readThrottleDefinition = (element: any): ThrottleDefinition => {
|
2380
|
-
|
2381
|
-
let def = element ? new ThrottleDefinition({...element}) : new ThrottleDefinition();
|
2382
|
-
if (element?.expression !== undefined) {
|
2383
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
2384
|
-
} else {
|
2385
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
2386
|
-
if (languageName){
|
2387
|
-
const exp:any = {};
|
2388
|
-
exp[languageName] = element[languageName]
|
2389
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
2390
|
-
delete (def as any)[languageName];
|
2391
|
-
}
|
2392
|
-
}
|
2393
|
-
if (element?.correlationExpression !== undefined) {
|
2394
|
-
if (Array.isArray(element.correlationExpression)) {
|
2395
|
-
def.correlationExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.correlationExpression[0]);
|
2396
|
-
} else {
|
2397
|
-
def.correlationExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.correlationExpression);
|
2398
|
-
}
|
2399
|
-
}
|
2400
|
-
|
2401
|
-
return def;
|
2402
|
-
}
|
2403
|
-
|
2404
|
-
static readThrowExceptionDefinition = (element: any): ThrowExceptionDefinition => {
|
2405
|
-
|
2406
|
-
let def = element ? new ThrowExceptionDefinition({...element}) : new ThrowExceptionDefinition();
|
2407
|
-
|
2408
|
-
return def;
|
2409
|
-
}
|
2410
|
-
|
2411
|
-
static readToDefinition = (element: any): ToDefinition => {
|
2412
|
-
if (element && typeof element === 'string') element = {uri: element};
|
2413
|
-
let def = element ? new ToDefinition({...element}) : new ToDefinition();
|
2414
|
-
def = ComponentApi.parseElementUri(def);
|
2415
|
-
|
2416
|
-
return def;
|
2417
|
-
}
|
2418
|
-
|
2419
|
-
static readToDynamicDefinition = (element: any): ToDynamicDefinition => {
|
2420
|
-
if (element && typeof element === 'string') element = {uri: element};
|
2421
|
-
let def = element ? new ToDynamicDefinition({...element}) : new ToDynamicDefinition();
|
2422
|
-
def = ComponentApi.parseElementUri(def);
|
2423
|
-
|
2424
|
-
return def;
|
2425
|
-
}
|
2426
|
-
|
2427
|
-
static readTransactedDefinition = (element: any): TransactedDefinition => {
|
2428
|
-
|
2429
|
-
let def = element ? new TransactedDefinition({...element}) : new TransactedDefinition();
|
2430
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
2431
|
-
|
2432
|
-
return def;
|
2433
|
-
}
|
2434
|
-
|
2435
|
-
static readTransformDefinition = (element: any): TransformDefinition => {
|
2436
|
-
|
2437
|
-
let def = element ? new TransformDefinition({...element}) : new TransformDefinition();
|
2438
|
-
if (element?.expression !== undefined) {
|
2439
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
2440
|
-
} else {
|
2441
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
2442
|
-
if (languageName){
|
2443
|
-
const exp:any = {};
|
2444
|
-
exp[languageName] = element[languageName]
|
2445
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
2446
|
-
delete (def as any)[languageName];
|
2447
|
-
}
|
2448
|
-
}
|
2449
|
-
|
2450
|
-
return def;
|
2451
|
-
}
|
2452
|
-
|
2453
|
-
static readTryDefinition = (element: any): TryDefinition => {
|
2454
|
-
|
2455
|
-
let def = element ? new TryDefinition({...element}) : new TryDefinition();
|
2456
|
-
if (element?.doFinally !== undefined) {
|
2457
|
-
if (Array.isArray(element.doFinally)) {
|
2458
|
-
def.doFinally = CamelDefinitionYamlStep.readFinallyDefinition(element.doFinally[0]);
|
2459
|
-
} else {
|
2460
|
-
def.doFinally = CamelDefinitionYamlStep.readFinallyDefinition(element.doFinally);
|
2461
|
-
}
|
2462
|
-
}
|
2463
|
-
def.doCatch = element && element?.doCatch ? element?.doCatch.map((x:any) => CamelDefinitionYamlStep.readCatchDefinition(x)) :[];
|
2464
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
2465
|
-
|
2466
|
-
return def;
|
2467
|
-
}
|
2468
|
-
|
2469
|
-
static readUnmarshalDefinition = (element: any): UnmarshalDefinition => {
|
2470
|
-
|
2471
|
-
let def = element ? new UnmarshalDefinition({...element}) : new UnmarshalDefinition();
|
2472
|
-
if (element?.univocityCsv !== undefined) {
|
2473
|
-
if (Array.isArray(element.univocityCsv)) {
|
2474
|
-
def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv[0]);
|
2475
|
-
} else {
|
2476
|
-
def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv);
|
2477
|
-
}
|
2478
|
-
}
|
2479
|
-
if (element?.protobuf !== undefined) {
|
2480
|
-
if (Array.isArray(element.protobuf)) {
|
2481
|
-
def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf[0]);
|
2482
|
-
} else {
|
2483
|
-
def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf);
|
2484
|
-
}
|
2485
|
-
}
|
2486
|
-
if (element?.tarFile !== undefined) {
|
2487
|
-
if (Array.isArray(element.tarFile)) {
|
2488
|
-
def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile[0]);
|
2489
|
-
} else {
|
2490
|
-
def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile);
|
2491
|
-
}
|
2492
|
-
}
|
2493
|
-
if (element?.tidyMarkup !== undefined) {
|
2494
|
-
if (Array.isArray(element.tidyMarkup)) {
|
2495
|
-
def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup[0]);
|
2496
|
-
} else {
|
2497
|
-
def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup);
|
2498
|
-
}
|
2499
|
-
}
|
2500
|
-
if (element?.csv !== undefined) {
|
2501
|
-
if (Array.isArray(element.csv)) {
|
2502
|
-
def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv[0]);
|
2503
|
-
} else {
|
2504
|
-
def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv);
|
2505
|
-
}
|
2506
|
-
}
|
2507
|
-
if (element?.base64 !== undefined) {
|
2508
|
-
if (Array.isArray(element.base64)) {
|
2509
|
-
def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64[0]);
|
2510
|
-
} else {
|
2511
|
-
def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64);
|
2512
|
-
}
|
2513
|
-
}
|
2514
|
-
if (element?.zipDeflater !== undefined) {
|
2515
|
-
if (Array.isArray(element.zipDeflater)) {
|
2516
|
-
def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater[0]);
|
2517
|
-
} else {
|
2518
|
-
def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater);
|
2519
|
-
}
|
2520
|
-
}
|
2521
|
-
if (element?.bindy !== undefined) {
|
2522
|
-
if (Array.isArray(element.bindy)) {
|
2523
|
-
def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy[0]);
|
2524
|
-
} else {
|
2525
|
-
def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy);
|
2526
|
-
}
|
2527
|
-
}
|
2528
|
-
if (element?.syslog !== undefined) {
|
2529
|
-
if (Array.isArray(element.syslog)) {
|
2530
|
-
def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog[0]);
|
2531
|
-
} else {
|
2532
|
-
def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog);
|
2533
|
-
}
|
2534
|
-
}
|
2535
|
-
if (element?.zipFile !== undefined) {
|
2536
|
-
if (Array.isArray(element.zipFile)) {
|
2537
|
-
def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile[0]);
|
2538
|
-
} else {
|
2539
|
-
def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile);
|
2540
|
-
}
|
2541
|
-
}
|
2542
|
-
if (element?.jaxb !== undefined) {
|
2543
|
-
if (Array.isArray(element.jaxb)) {
|
2544
|
-
def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb[0]);
|
2545
|
-
} else {
|
2546
|
-
def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb);
|
2547
|
-
}
|
2548
|
-
}
|
2549
|
-
if (element?.parquetAvro !== undefined) {
|
2550
|
-
if (Array.isArray(element.parquetAvro)) {
|
2551
|
-
def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro[0]);
|
2552
|
-
} else {
|
2553
|
-
def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro);
|
2554
|
-
}
|
2555
|
-
}
|
2556
|
-
if (element?.rss !== undefined) {
|
2557
|
-
if (Array.isArray(element.rss)) {
|
2558
|
-
def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss[0]);
|
2559
|
-
} else {
|
2560
|
-
def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss);
|
2561
|
-
}
|
2562
|
-
}
|
2563
|
-
if (element?.mimeMultipart !== undefined) {
|
2564
|
-
if (Array.isArray(element.mimeMultipart)) {
|
2565
|
-
def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart[0]);
|
2566
|
-
} else {
|
2567
|
-
def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart);
|
2568
|
-
}
|
2569
|
-
}
|
2570
|
-
if (element?.asn1 !== undefined) {
|
2571
|
-
if (Array.isArray(element.asn1)) {
|
2572
|
-
def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1[0]);
|
2573
|
-
} else {
|
2574
|
-
def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1);
|
2575
|
-
}
|
2576
|
-
}
|
2577
|
-
if (element?.pgp !== undefined) {
|
2578
|
-
if (Array.isArray(element.pgp)) {
|
2579
|
-
def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp[0]);
|
2580
|
-
} else {
|
2581
|
-
def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp);
|
2582
|
-
}
|
2583
|
-
}
|
2584
|
-
if (element?.thrift !== undefined) {
|
2585
|
-
if (Array.isArray(element.thrift)) {
|
2586
|
-
def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift[0]);
|
2587
|
-
} else {
|
2588
|
-
def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift);
|
2589
|
-
}
|
2590
|
-
}
|
2591
|
-
if (element?.json !== undefined) {
|
2592
|
-
if (Array.isArray(element.json)) {
|
2593
|
-
def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json[0]);
|
2594
|
-
} else {
|
2595
|
-
def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json);
|
2596
|
-
}
|
2597
|
-
}
|
2598
|
-
if (element?.lzf !== undefined) {
|
2599
|
-
if (Array.isArray(element.lzf)) {
|
2600
|
-
def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf[0]);
|
2601
|
-
} else {
|
2602
|
-
def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf);
|
2603
|
-
}
|
2604
|
-
}
|
2605
|
-
if (element?.fhirXml !== undefined) {
|
2606
|
-
if (Array.isArray(element.fhirXml)) {
|
2607
|
-
def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml[0]);
|
2608
|
-
} else {
|
2609
|
-
def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml);
|
2610
|
-
}
|
2611
|
-
}
|
2612
|
-
if (element?.barcode !== undefined) {
|
2613
|
-
if (Array.isArray(element.barcode)) {
|
2614
|
-
def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode[0]);
|
2615
|
-
} else {
|
2616
|
-
def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode);
|
2617
|
-
}
|
2618
|
-
}
|
2619
|
-
if (element?.avro !== undefined) {
|
2620
|
-
if (Array.isArray(element.avro)) {
|
2621
|
-
def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro[0]);
|
2622
|
-
} else {
|
2623
|
-
def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro);
|
2624
|
-
}
|
2625
|
-
}
|
2626
|
-
if (element?.yaml !== undefined) {
|
2627
|
-
if (Array.isArray(element.yaml)) {
|
2628
|
-
def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml[0]);
|
2629
|
-
} else {
|
2630
|
-
def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml);
|
2631
|
-
}
|
2632
|
-
}
|
2633
|
-
if (element?.beanio !== undefined) {
|
2634
|
-
if (Array.isArray(element.beanio)) {
|
2635
|
-
def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio[0]);
|
2636
|
-
} else {
|
2637
|
-
def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio);
|
2638
|
-
}
|
2639
|
-
}
|
2640
|
-
if (element?.fhirJson !== undefined) {
|
2641
|
-
if (Array.isArray(element.fhirJson)) {
|
2642
|
-
def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson[0]);
|
2643
|
-
} else {
|
2644
|
-
def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson);
|
2645
|
-
}
|
2646
|
-
}
|
2647
|
-
if (element?.custom !== undefined) {
|
2648
|
-
if (Array.isArray(element.custom)) {
|
2649
|
-
def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom[0]);
|
2650
|
-
} else {
|
2651
|
-
def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom);
|
2652
|
-
}
|
2653
|
-
}
|
2654
|
-
if (element?.flatpack !== undefined) {
|
2655
|
-
if (Array.isArray(element.flatpack)) {
|
2656
|
-
def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack[0]);
|
2657
|
-
} else {
|
2658
|
-
def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack);
|
2659
|
-
}
|
2660
|
-
}
|
2661
|
-
if (element?.swiftMx !== undefined) {
|
2662
|
-
if (Array.isArray(element.swiftMx)) {
|
2663
|
-
def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx[0]);
|
2664
|
-
} else {
|
2665
|
-
def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx);
|
2666
|
-
}
|
2667
|
-
}
|
2668
|
-
if (element?.cbor !== undefined) {
|
2669
|
-
if (Array.isArray(element.cbor)) {
|
2670
|
-
def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor[0]);
|
2671
|
-
} else {
|
2672
|
-
def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor);
|
2673
|
-
}
|
2674
|
-
}
|
2675
|
-
if (element?.crypto !== undefined) {
|
2676
|
-
if (Array.isArray(element.crypto)) {
|
2677
|
-
def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto[0]);
|
2678
|
-
} else {
|
2679
|
-
def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto);
|
2680
|
-
}
|
2681
|
-
}
|
2682
|
-
if (element?.swiftMt !== undefined) {
|
2683
|
-
if (Array.isArray(element.swiftMt)) {
|
2684
|
-
def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt[0]);
|
2685
|
-
} else {
|
2686
|
-
def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt);
|
2687
|
-
}
|
2688
|
-
}
|
2689
|
-
if (element?.univocityTsv !== undefined) {
|
2690
|
-
if (Array.isArray(element.univocityTsv)) {
|
2691
|
-
def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv[0]);
|
2692
|
-
} else {
|
2693
|
-
def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv);
|
2694
|
-
}
|
2695
|
-
}
|
2696
|
-
if (element?.hl7 !== undefined) {
|
2697
|
-
if (Array.isArray(element.hl7)) {
|
2698
|
-
def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7[0]);
|
2699
|
-
} else {
|
2700
|
-
def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7);
|
2701
|
-
}
|
2702
|
-
}
|
2703
|
-
if (element?.jsonApi !== undefined) {
|
2704
|
-
if (Array.isArray(element.jsonApi)) {
|
2705
|
-
def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi[0]);
|
2706
|
-
} else {
|
2707
|
-
def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi);
|
2708
|
-
}
|
2709
|
-
}
|
2710
|
-
if (element?.xmlSecurity !== undefined) {
|
2711
|
-
if (Array.isArray(element.xmlSecurity)) {
|
2712
|
-
def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity[0]);
|
2713
|
-
} else {
|
2714
|
-
def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity);
|
2715
|
-
}
|
2716
|
-
}
|
2717
|
-
if (element?.ical !== undefined) {
|
2718
|
-
if (Array.isArray(element.ical)) {
|
2719
|
-
def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical[0]);
|
2720
|
-
} else {
|
2721
|
-
def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical);
|
2722
|
-
}
|
2723
|
-
}
|
2724
|
-
if (element?.univocityFixed !== undefined) {
|
2725
|
-
if (Array.isArray(element.univocityFixed)) {
|
2726
|
-
def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed[0]);
|
2727
|
-
} else {
|
2728
|
-
def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed);
|
2729
|
-
}
|
2730
|
-
}
|
2731
|
-
if (element?.jacksonXml !== undefined) {
|
2732
|
-
if (Array.isArray(element.jacksonXml)) {
|
2733
|
-
def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml[0]);
|
2734
|
-
} else {
|
2735
|
-
def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml);
|
2736
|
-
}
|
2737
|
-
}
|
2738
|
-
if (element?.grok !== undefined) {
|
2739
|
-
if (Array.isArray(element.grok)) {
|
2740
|
-
def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok[0]);
|
2741
|
-
} else {
|
2742
|
-
def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok);
|
2743
|
-
}
|
2744
|
-
}
|
2745
|
-
if (element?.gzipDeflater !== undefined) {
|
2746
|
-
if (Array.isArray(element.gzipDeflater)) {
|
2747
|
-
def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater[0]);
|
2748
|
-
} else {
|
2749
|
-
def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater);
|
2750
|
-
}
|
2751
|
-
}
|
2752
|
-
if (element?.soap !== undefined) {
|
2753
|
-
if (Array.isArray(element.soap)) {
|
2754
|
-
def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap[0]);
|
2755
|
-
} else {
|
2756
|
-
def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap);
|
2757
|
-
}
|
2758
|
-
}
|
2759
|
-
|
2760
|
-
return def;
|
2761
|
-
}
|
2762
|
-
|
2763
|
-
static readValidateDefinition = (element: any): ValidateDefinition => {
|
2764
|
-
|
2765
|
-
let def = element ? new ValidateDefinition({...element}) : new ValidateDefinition();
|
2766
|
-
if (element?.expression !== undefined) {
|
2767
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
2768
|
-
} else {
|
2769
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
2770
|
-
if (languageName){
|
2771
|
-
const exp:any = {};
|
2772
|
-
exp[languageName] = element[languageName]
|
2773
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
2774
|
-
delete (def as any)[languageName];
|
2775
|
-
}
|
2776
|
-
}
|
2777
|
-
|
2778
|
-
return def;
|
2779
|
-
}
|
2780
|
-
|
2781
|
-
static readValueDefinition = (element: any): ValueDefinition => {
|
2782
|
-
|
2783
|
-
let def = element ? new ValueDefinition({...element}) : new ValueDefinition();
|
2784
|
-
|
2785
|
-
return def;
|
2786
|
-
}
|
2787
|
-
|
2788
|
-
static readWhenDefinition = (element: any): WhenDefinition => {
|
2789
|
-
|
2790
|
-
let def = element ? new WhenDefinition({...element}) : new WhenDefinition();
|
2791
|
-
if (element?.expression !== undefined) {
|
2792
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
2793
|
-
} else {
|
2794
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
2795
|
-
if (languageName){
|
2796
|
-
const exp:any = {};
|
2797
|
-
exp[languageName] = element[languageName]
|
2798
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
2799
|
-
delete (def as any)[languageName];
|
2800
|
-
}
|
2801
|
-
}
|
2802
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
2803
|
-
|
2804
|
-
return def;
|
2805
|
-
}
|
2806
|
-
|
2807
|
-
static readWhenSkipSendToEndpointDefinition = (element: any): WhenSkipSendToEndpointDefinition => {
|
2808
|
-
|
2809
|
-
let def = element ? new WhenSkipSendToEndpointDefinition({...element}) : new WhenSkipSendToEndpointDefinition();
|
2810
|
-
if (element?.expression !== undefined) {
|
2811
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
2812
|
-
} else {
|
2813
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
2814
|
-
if (languageName){
|
2815
|
-
const exp:any = {};
|
2816
|
-
exp[languageName] = element[languageName]
|
2817
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
2818
|
-
delete (def as any)[languageName];
|
2819
|
-
}
|
2820
|
-
}
|
2821
|
-
def.steps = CamelDefinitionYamlStep.readSteps(element?.steps);
|
2822
|
-
|
2823
|
-
return def;
|
2824
|
-
}
|
2825
|
-
|
2826
|
-
static readWireTapDefinition = (element: any): WireTapDefinition => {
|
2827
|
-
|
2828
|
-
let def = element ? new WireTapDefinition({...element}) : new WireTapDefinition();
|
2829
|
-
def = ComponentApi.parseElementUri(def);
|
2830
|
-
|
2831
|
-
return def;
|
2832
|
-
}
|
2833
|
-
|
2834
|
-
static readBeanConstructorDefinition = (element: any): BeanConstructorDefinition => {
|
2835
|
-
|
2836
|
-
let def = element ? new BeanConstructorDefinition({...element}) : new BeanConstructorDefinition();
|
2837
|
-
|
2838
|
-
return def;
|
2839
|
-
}
|
2840
|
-
|
2841
|
-
static readBeanConstructorsDefinition = (element: any): BeanConstructorsDefinition => {
|
2842
|
-
|
2843
|
-
let def = element ? new BeanConstructorsDefinition({...element}) : new BeanConstructorsDefinition();
|
2844
|
-
def.constructor = element && element?.constructor ? element?.constructor.map((x:any) => CamelDefinitionYamlStep.readBeanConstructorDefinition(x)) :[];
|
2845
|
-
|
2846
|
-
return def;
|
2847
|
-
}
|
2848
|
-
|
2849
|
-
static readBeanPropertiesDefinition = (element: any): BeanPropertiesDefinition => {
|
2850
|
-
|
2851
|
-
let def = element ? new BeanPropertiesDefinition({...element}) : new BeanPropertiesDefinition();
|
2852
|
-
def.property = element && element?.property ? element?.property.map((x:any) => CamelDefinitionYamlStep.readBeanPropertyDefinition(x)) :[];
|
2853
|
-
|
2854
|
-
return def;
|
2855
|
-
}
|
2856
|
-
|
2857
|
-
static readBeanPropertyDefinition = (element: any): BeanPropertyDefinition => {
|
2858
|
-
|
2859
|
-
let def = element ? new BeanPropertyDefinition({...element}) : new BeanPropertyDefinition();
|
2860
|
-
if (element?.properties !== undefined) {
|
2861
|
-
if (Array.isArray(element.properties)) {
|
2862
|
-
def.properties = CamelDefinitionYamlStep.readBeanPropertiesDefinition(element.properties[0]);
|
2863
|
-
} else {
|
2864
|
-
def.properties = CamelDefinitionYamlStep.readBeanPropertiesDefinition(element.properties);
|
2865
|
-
}
|
2866
|
-
}
|
2867
|
-
|
2868
|
-
return def;
|
2869
|
-
}
|
2870
|
-
|
2871
|
-
static readComponentScanDefinition = (element: any): ComponentScanDefinition => {
|
2872
|
-
|
2873
|
-
let def = element ? new ComponentScanDefinition({...element}) : new ComponentScanDefinition();
|
2874
|
-
|
2875
|
-
return def;
|
2876
|
-
}
|
2877
|
-
|
2878
|
-
static readBatchResequencerConfig = (element: any): BatchResequencerConfig => {
|
2879
|
-
|
2880
|
-
let def = element ? new BatchResequencerConfig({...element}) : new BatchResequencerConfig();
|
2881
|
-
|
2882
|
-
return def;
|
2883
|
-
}
|
2884
|
-
|
2885
|
-
static readStreamResequencerConfig = (element: any): StreamResequencerConfig => {
|
2886
|
-
|
2887
|
-
let def = element ? new StreamResequencerConfig({...element}) : new StreamResequencerConfig();
|
2888
|
-
|
2889
|
-
return def;
|
2890
|
-
}
|
2891
|
-
|
2892
|
-
static readASN1DataFormat = (element: any): ASN1DataFormat => {
|
2893
|
-
|
2894
|
-
let def = element ? new ASN1DataFormat({...element}) : new ASN1DataFormat();
|
2895
|
-
|
2896
|
-
return def;
|
2897
|
-
}
|
2898
|
-
|
2899
|
-
static readAvroDataFormat = (element: any): AvroDataFormat => {
|
2900
|
-
|
2901
|
-
let def = element ? new AvroDataFormat({...element}) : new AvroDataFormat();
|
2902
|
-
|
2903
|
-
return def;
|
2904
|
-
}
|
2905
|
-
|
2906
|
-
static readBarcodeDataFormat = (element: any): BarcodeDataFormat => {
|
2907
|
-
|
2908
|
-
let def = element ? new BarcodeDataFormat({...element}) : new BarcodeDataFormat();
|
2909
|
-
|
2910
|
-
return def;
|
2911
|
-
}
|
2912
|
-
|
2913
|
-
static readBase64DataFormat = (element: any): Base64DataFormat => {
|
2914
|
-
|
2915
|
-
let def = element ? new Base64DataFormat({...element}) : new Base64DataFormat();
|
2916
|
-
|
2917
|
-
return def;
|
2918
|
-
}
|
2919
|
-
|
2920
|
-
static readBeanioDataFormat = (element: any): BeanioDataFormat => {
|
2921
|
-
|
2922
|
-
let def = element ? new BeanioDataFormat({...element}) : new BeanioDataFormat();
|
2923
|
-
|
2924
|
-
return def;
|
2925
|
-
}
|
2926
|
-
|
2927
|
-
static readBindyDataFormat = (element: any): BindyDataFormat => {
|
2928
|
-
|
2929
|
-
let def = element ? new BindyDataFormat({...element}) : new BindyDataFormat();
|
2930
|
-
|
2931
|
-
return def;
|
2932
|
-
}
|
2933
|
-
|
2934
|
-
static readCBORDataFormat = (element: any): CBORDataFormat => {
|
2935
|
-
|
2936
|
-
let def = element ? new CBORDataFormat({...element}) : new CBORDataFormat();
|
2937
|
-
|
2938
|
-
return def;
|
2939
|
-
}
|
2940
|
-
|
2941
|
-
static readCryptoDataFormat = (element: any): CryptoDataFormat => {
|
2942
|
-
|
2943
|
-
let def = element ? new CryptoDataFormat({...element}) : new CryptoDataFormat();
|
2944
|
-
|
2945
|
-
return def;
|
2946
|
-
}
|
2947
|
-
|
2948
|
-
static readCsvDataFormat = (element: any): CsvDataFormat => {
|
2949
|
-
|
2950
|
-
let def = element ? new CsvDataFormat({...element}) : new CsvDataFormat();
|
2951
|
-
|
2952
|
-
return def;
|
2953
|
-
}
|
2954
|
-
|
2955
|
-
static readCustomDataFormat = (element: any): CustomDataFormat => {
|
2956
|
-
if (element && typeof element === 'string') element = {ref: element};
|
2957
|
-
let def = element ? new CustomDataFormat({...element}) : new CustomDataFormat();
|
2958
|
-
|
2959
|
-
return def;
|
2960
|
-
}
|
2961
|
-
|
2962
|
-
static readDataFormatsDefinition = (element: any): DataFormatsDefinition => {
|
2963
|
-
|
2964
|
-
let def = element ? new DataFormatsDefinition({...element}) : new DataFormatsDefinition();
|
2965
|
-
if (element?.univocityCsv !== undefined) {
|
2966
|
-
if (Array.isArray(element.univocityCsv)) {
|
2967
|
-
def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv[0]);
|
2968
|
-
} else {
|
2969
|
-
def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv);
|
2970
|
-
}
|
2971
|
-
}
|
2972
|
-
if (element?.protobuf !== undefined) {
|
2973
|
-
if (Array.isArray(element.protobuf)) {
|
2974
|
-
def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf[0]);
|
2975
|
-
} else {
|
2976
|
-
def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf);
|
2977
|
-
}
|
2978
|
-
}
|
2979
|
-
if (element?.tarFile !== undefined) {
|
2980
|
-
if (Array.isArray(element.tarFile)) {
|
2981
|
-
def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile[0]);
|
2982
|
-
} else {
|
2983
|
-
def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile);
|
2984
|
-
}
|
2985
|
-
}
|
2986
|
-
if (element?.tidyMarkup !== undefined) {
|
2987
|
-
if (Array.isArray(element.tidyMarkup)) {
|
2988
|
-
def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup[0]);
|
2989
|
-
} else {
|
2990
|
-
def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup);
|
2991
|
-
}
|
2992
|
-
}
|
2993
|
-
if (element?.csv !== undefined) {
|
2994
|
-
if (Array.isArray(element.csv)) {
|
2995
|
-
def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv[0]);
|
2996
|
-
} else {
|
2997
|
-
def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv);
|
2998
|
-
}
|
2999
|
-
}
|
3000
|
-
if (element?.base64 !== undefined) {
|
3001
|
-
if (Array.isArray(element.base64)) {
|
3002
|
-
def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64[0]);
|
3003
|
-
} else {
|
3004
|
-
def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64);
|
3005
|
-
}
|
3006
|
-
}
|
3007
|
-
if (element?.zipDeflater !== undefined) {
|
3008
|
-
if (Array.isArray(element.zipDeflater)) {
|
3009
|
-
def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater[0]);
|
3010
|
-
} else {
|
3011
|
-
def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater);
|
3012
|
-
}
|
3013
|
-
}
|
3014
|
-
if (element?.bindy !== undefined) {
|
3015
|
-
if (Array.isArray(element.bindy)) {
|
3016
|
-
def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy[0]);
|
3017
|
-
} else {
|
3018
|
-
def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy);
|
3019
|
-
}
|
3020
|
-
}
|
3021
|
-
if (element?.syslog !== undefined) {
|
3022
|
-
if (Array.isArray(element.syslog)) {
|
3023
|
-
def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog[0]);
|
3024
|
-
} else {
|
3025
|
-
def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog);
|
3026
|
-
}
|
3027
|
-
}
|
3028
|
-
if (element?.zipFile !== undefined) {
|
3029
|
-
if (Array.isArray(element.zipFile)) {
|
3030
|
-
def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile[0]);
|
3031
|
-
} else {
|
3032
|
-
def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile);
|
3033
|
-
}
|
3034
|
-
}
|
3035
|
-
if (element?.jaxb !== undefined) {
|
3036
|
-
if (Array.isArray(element.jaxb)) {
|
3037
|
-
def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb[0]);
|
3038
|
-
} else {
|
3039
|
-
def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb);
|
3040
|
-
}
|
3041
|
-
}
|
3042
|
-
if (element?.parquetAvro !== undefined) {
|
3043
|
-
if (Array.isArray(element.parquetAvro)) {
|
3044
|
-
def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro[0]);
|
3045
|
-
} else {
|
3046
|
-
def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro);
|
3047
|
-
}
|
3048
|
-
}
|
3049
|
-
if (element?.rss !== undefined) {
|
3050
|
-
if (Array.isArray(element.rss)) {
|
3051
|
-
def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss[0]);
|
3052
|
-
} else {
|
3053
|
-
def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss);
|
3054
|
-
}
|
3055
|
-
}
|
3056
|
-
if (element?.mimeMultipart !== undefined) {
|
3057
|
-
if (Array.isArray(element.mimeMultipart)) {
|
3058
|
-
def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart[0]);
|
3059
|
-
} else {
|
3060
|
-
def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart);
|
3061
|
-
}
|
3062
|
-
}
|
3063
|
-
if (element?.asn1 !== undefined) {
|
3064
|
-
if (Array.isArray(element.asn1)) {
|
3065
|
-
def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1[0]);
|
3066
|
-
} else {
|
3067
|
-
def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1);
|
3068
|
-
}
|
3069
|
-
}
|
3070
|
-
if (element?.pgp !== undefined) {
|
3071
|
-
if (Array.isArray(element.pgp)) {
|
3072
|
-
def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp[0]);
|
3073
|
-
} else {
|
3074
|
-
def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp);
|
3075
|
-
}
|
3076
|
-
}
|
3077
|
-
if (element?.thrift !== undefined) {
|
3078
|
-
if (Array.isArray(element.thrift)) {
|
3079
|
-
def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift[0]);
|
3080
|
-
} else {
|
3081
|
-
def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift);
|
3082
|
-
}
|
3083
|
-
}
|
3084
|
-
if (element?.json !== undefined) {
|
3085
|
-
if (Array.isArray(element.json)) {
|
3086
|
-
def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json[0]);
|
3087
|
-
} else {
|
3088
|
-
def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json);
|
3089
|
-
}
|
3090
|
-
}
|
3091
|
-
if (element?.lzf !== undefined) {
|
3092
|
-
if (Array.isArray(element.lzf)) {
|
3093
|
-
def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf[0]);
|
3094
|
-
} else {
|
3095
|
-
def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf);
|
3096
|
-
}
|
3097
|
-
}
|
3098
|
-
if (element?.fhirXml !== undefined) {
|
3099
|
-
if (Array.isArray(element.fhirXml)) {
|
3100
|
-
def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml[0]);
|
3101
|
-
} else {
|
3102
|
-
def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml);
|
3103
|
-
}
|
3104
|
-
}
|
3105
|
-
if (element?.barcode !== undefined) {
|
3106
|
-
if (Array.isArray(element.barcode)) {
|
3107
|
-
def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode[0]);
|
3108
|
-
} else {
|
3109
|
-
def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode);
|
3110
|
-
}
|
3111
|
-
}
|
3112
|
-
if (element?.avro !== undefined) {
|
3113
|
-
if (Array.isArray(element.avro)) {
|
3114
|
-
def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro[0]);
|
3115
|
-
} else {
|
3116
|
-
def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro);
|
3117
|
-
}
|
3118
|
-
}
|
3119
|
-
if (element?.yaml !== undefined) {
|
3120
|
-
if (Array.isArray(element.yaml)) {
|
3121
|
-
def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml[0]);
|
3122
|
-
} else {
|
3123
|
-
def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml);
|
3124
|
-
}
|
3125
|
-
}
|
3126
|
-
if (element?.beanio !== undefined) {
|
3127
|
-
if (Array.isArray(element.beanio)) {
|
3128
|
-
def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio[0]);
|
3129
|
-
} else {
|
3130
|
-
def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio);
|
3131
|
-
}
|
3132
|
-
}
|
3133
|
-
if (element?.fhirJson !== undefined) {
|
3134
|
-
if (Array.isArray(element.fhirJson)) {
|
3135
|
-
def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson[0]);
|
3136
|
-
} else {
|
3137
|
-
def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson);
|
3138
|
-
}
|
3139
|
-
}
|
3140
|
-
if (element?.custom !== undefined) {
|
3141
|
-
if (Array.isArray(element.custom)) {
|
3142
|
-
def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom[0]);
|
3143
|
-
} else {
|
3144
|
-
def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom);
|
3145
|
-
}
|
3146
|
-
}
|
3147
|
-
if (element?.flatpack !== undefined) {
|
3148
|
-
if (Array.isArray(element.flatpack)) {
|
3149
|
-
def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack[0]);
|
3150
|
-
} else {
|
3151
|
-
def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack);
|
3152
|
-
}
|
3153
|
-
}
|
3154
|
-
if (element?.swiftMx !== undefined) {
|
3155
|
-
if (Array.isArray(element.swiftMx)) {
|
3156
|
-
def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx[0]);
|
3157
|
-
} else {
|
3158
|
-
def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx);
|
3159
|
-
}
|
3160
|
-
}
|
3161
|
-
if (element?.cbor !== undefined) {
|
3162
|
-
if (Array.isArray(element.cbor)) {
|
3163
|
-
def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor[0]);
|
3164
|
-
} else {
|
3165
|
-
def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor);
|
3166
|
-
}
|
3167
|
-
}
|
3168
|
-
if (element?.crypto !== undefined) {
|
3169
|
-
if (Array.isArray(element.crypto)) {
|
3170
|
-
def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto[0]);
|
3171
|
-
} else {
|
3172
|
-
def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto);
|
3173
|
-
}
|
3174
|
-
}
|
3175
|
-
if (element?.swiftMt !== undefined) {
|
3176
|
-
if (Array.isArray(element.swiftMt)) {
|
3177
|
-
def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt[0]);
|
3178
|
-
} else {
|
3179
|
-
def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt);
|
3180
|
-
}
|
3181
|
-
}
|
3182
|
-
if (element?.univocityTsv !== undefined) {
|
3183
|
-
if (Array.isArray(element.univocityTsv)) {
|
3184
|
-
def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv[0]);
|
3185
|
-
} else {
|
3186
|
-
def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv);
|
3187
|
-
}
|
3188
|
-
}
|
3189
|
-
if (element?.hl7 !== undefined) {
|
3190
|
-
if (Array.isArray(element.hl7)) {
|
3191
|
-
def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7[0]);
|
3192
|
-
} else {
|
3193
|
-
def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7);
|
3194
|
-
}
|
3195
|
-
}
|
3196
|
-
if (element?.jsonApi !== undefined) {
|
3197
|
-
if (Array.isArray(element.jsonApi)) {
|
3198
|
-
def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi[0]);
|
3199
|
-
} else {
|
3200
|
-
def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi);
|
3201
|
-
}
|
3202
|
-
}
|
3203
|
-
if (element?.xmlSecurity !== undefined) {
|
3204
|
-
if (Array.isArray(element.xmlSecurity)) {
|
3205
|
-
def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity[0]);
|
3206
|
-
} else {
|
3207
|
-
def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity);
|
3208
|
-
}
|
3209
|
-
}
|
3210
|
-
if (element?.ical !== undefined) {
|
3211
|
-
if (Array.isArray(element.ical)) {
|
3212
|
-
def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical[0]);
|
3213
|
-
} else {
|
3214
|
-
def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical);
|
3215
|
-
}
|
3216
|
-
}
|
3217
|
-
if (element?.univocityFixed !== undefined) {
|
3218
|
-
if (Array.isArray(element.univocityFixed)) {
|
3219
|
-
def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed[0]);
|
3220
|
-
} else {
|
3221
|
-
def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed);
|
3222
|
-
}
|
3223
|
-
}
|
3224
|
-
if (element?.jacksonXml !== undefined) {
|
3225
|
-
if (Array.isArray(element.jacksonXml)) {
|
3226
|
-
def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml[0]);
|
3227
|
-
} else {
|
3228
|
-
def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml);
|
3229
|
-
}
|
3230
|
-
}
|
3231
|
-
if (element?.grok !== undefined) {
|
3232
|
-
if (Array.isArray(element.grok)) {
|
3233
|
-
def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok[0]);
|
3234
|
-
} else {
|
3235
|
-
def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok);
|
3236
|
-
}
|
3237
|
-
}
|
3238
|
-
if (element?.gzipDeflater !== undefined) {
|
3239
|
-
if (Array.isArray(element.gzipDeflater)) {
|
3240
|
-
def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater[0]);
|
3241
|
-
} else {
|
3242
|
-
def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater);
|
3243
|
-
}
|
3244
|
-
}
|
3245
|
-
if (element?.soap !== undefined) {
|
3246
|
-
if (Array.isArray(element.soap)) {
|
3247
|
-
def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap[0]);
|
3248
|
-
} else {
|
3249
|
-
def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap);
|
3250
|
-
}
|
3251
|
-
}
|
3252
|
-
|
3253
|
-
return def;
|
3254
|
-
}
|
3255
|
-
|
3256
|
-
static readFhirJsonDataFormat = (element: any): FhirJsonDataFormat => {
|
3257
|
-
|
3258
|
-
let def = element ? new FhirJsonDataFormat({...element}) : new FhirJsonDataFormat();
|
3259
|
-
|
3260
|
-
return def;
|
3261
|
-
}
|
3262
|
-
|
3263
|
-
static readFhirXmlDataFormat = (element: any): FhirXmlDataFormat => {
|
3264
|
-
|
3265
|
-
let def = element ? new FhirXmlDataFormat({...element}) : new FhirXmlDataFormat();
|
3266
|
-
|
3267
|
-
return def;
|
3268
|
-
}
|
3269
|
-
|
3270
|
-
static readFlatpackDataFormat = (element: any): FlatpackDataFormat => {
|
3271
|
-
|
3272
|
-
let def = element ? new FlatpackDataFormat({...element}) : new FlatpackDataFormat();
|
3273
|
-
|
3274
|
-
return def;
|
3275
|
-
}
|
3276
|
-
|
3277
|
-
static readGrokDataFormat = (element: any): GrokDataFormat => {
|
3278
|
-
|
3279
|
-
let def = element ? new GrokDataFormat({...element}) : new GrokDataFormat();
|
3280
|
-
|
3281
|
-
return def;
|
3282
|
-
}
|
3283
|
-
|
3284
|
-
static readGzipDeflaterDataFormat = (element: any): GzipDeflaterDataFormat => {
|
3285
|
-
|
3286
|
-
let def = element ? new GzipDeflaterDataFormat({...element}) : new GzipDeflaterDataFormat();
|
3287
|
-
|
3288
|
-
return def;
|
3289
|
-
}
|
3290
|
-
|
3291
|
-
static readHL7DataFormat = (element: any): HL7DataFormat => {
|
3292
|
-
|
3293
|
-
let def = element ? new HL7DataFormat({...element}) : new HL7DataFormat();
|
3294
|
-
|
3295
|
-
return def;
|
3296
|
-
}
|
3297
|
-
|
3298
|
-
static readIcalDataFormat = (element: any): IcalDataFormat => {
|
3299
|
-
|
3300
|
-
let def = element ? new IcalDataFormat({...element}) : new IcalDataFormat();
|
3301
|
-
|
3302
|
-
return def;
|
3303
|
-
}
|
3304
|
-
|
3305
|
-
static readJacksonXMLDataFormat = (element: any): JacksonXMLDataFormat => {
|
3306
|
-
|
3307
|
-
let def = element ? new JacksonXMLDataFormat({...element}) : new JacksonXMLDataFormat();
|
3308
|
-
|
3309
|
-
return def;
|
3310
|
-
}
|
3311
|
-
|
3312
|
-
static readJaxbDataFormat = (element: any): JaxbDataFormat => {
|
3313
|
-
|
3314
|
-
let def = element ? new JaxbDataFormat({...element}) : new JaxbDataFormat();
|
3315
|
-
|
3316
|
-
return def;
|
3317
|
-
}
|
3318
|
-
|
3319
|
-
static readJsonApiDataFormat = (element: any): JsonApiDataFormat => {
|
3320
|
-
|
3321
|
-
let def = element ? new JsonApiDataFormat({...element}) : new JsonApiDataFormat();
|
3322
|
-
|
3323
|
-
return def;
|
3324
|
-
}
|
3325
|
-
|
3326
|
-
static readJsonDataFormat = (element: any): JsonDataFormat => {
|
3327
|
-
|
3328
|
-
let def = element ? new JsonDataFormat({...element}) : new JsonDataFormat();
|
3329
|
-
|
3330
|
-
return def;
|
3331
|
-
}
|
3332
|
-
|
3333
|
-
static readLZFDataFormat = (element: any): LZFDataFormat => {
|
3334
|
-
|
3335
|
-
let def = element ? new LZFDataFormat({...element}) : new LZFDataFormat();
|
3336
|
-
|
3337
|
-
return def;
|
3338
|
-
}
|
3339
|
-
|
3340
|
-
static readMimeMultipartDataFormat = (element: any): MimeMultipartDataFormat => {
|
3341
|
-
|
3342
|
-
let def = element ? new MimeMultipartDataFormat({...element}) : new MimeMultipartDataFormat();
|
3343
|
-
|
3344
|
-
return def;
|
3345
|
-
}
|
3346
|
-
|
3347
|
-
static readPGPDataFormat = (element: any): PGPDataFormat => {
|
3348
|
-
|
3349
|
-
let def = element ? new PGPDataFormat({...element}) : new PGPDataFormat();
|
3350
|
-
|
3351
|
-
return def;
|
3352
|
-
}
|
3353
|
-
|
3354
|
-
static readParquetAvroDataFormat = (element: any): ParquetAvroDataFormat => {
|
3355
|
-
|
3356
|
-
let def = element ? new ParquetAvroDataFormat({...element}) : new ParquetAvroDataFormat();
|
3357
|
-
|
3358
|
-
return def;
|
3359
|
-
}
|
3360
|
-
|
3361
|
-
static readProtobufDataFormat = (element: any): ProtobufDataFormat => {
|
3362
|
-
|
3363
|
-
let def = element ? new ProtobufDataFormat({...element}) : new ProtobufDataFormat();
|
3364
|
-
|
3365
|
-
return def;
|
3366
|
-
}
|
3367
|
-
|
3368
|
-
static readRssDataFormat = (element: any): RssDataFormat => {
|
3369
|
-
|
3370
|
-
let def = element ? new RssDataFormat({...element}) : new RssDataFormat();
|
3371
|
-
|
3372
|
-
return def;
|
3373
|
-
}
|
3374
|
-
|
3375
|
-
static readSoapDataFormat = (element: any): SoapDataFormat => {
|
3376
|
-
if (element && typeof element === 'string') element = {contextPath: element};
|
3377
|
-
let def = element ? new SoapDataFormat({...element}) : new SoapDataFormat();
|
3378
|
-
|
3379
|
-
return def;
|
3380
|
-
}
|
3381
|
-
|
3382
|
-
static readSwiftMtDataFormat = (element: any): SwiftMtDataFormat => {
|
3383
|
-
|
3384
|
-
let def = element ? new SwiftMtDataFormat({...element}) : new SwiftMtDataFormat();
|
3385
|
-
|
3386
|
-
return def;
|
3387
|
-
}
|
3388
|
-
|
3389
|
-
static readSwiftMxDataFormat = (element: any): SwiftMxDataFormat => {
|
3390
|
-
|
3391
|
-
let def = element ? new SwiftMxDataFormat({...element}) : new SwiftMxDataFormat();
|
3392
|
-
|
3393
|
-
return def;
|
3394
|
-
}
|
3395
|
-
|
3396
|
-
static readSyslogDataFormat = (element: any): SyslogDataFormat => {
|
3397
|
-
|
3398
|
-
let def = element ? new SyslogDataFormat({...element}) : new SyslogDataFormat();
|
3399
|
-
|
3400
|
-
return def;
|
3401
|
-
}
|
3402
|
-
|
3403
|
-
static readTarFileDataFormat = (element: any): TarFileDataFormat => {
|
3404
|
-
|
3405
|
-
let def = element ? new TarFileDataFormat({...element}) : new TarFileDataFormat();
|
3406
|
-
|
3407
|
-
return def;
|
3408
|
-
}
|
3409
|
-
|
3410
|
-
static readThriftDataFormat = (element: any): ThriftDataFormat => {
|
3411
|
-
|
3412
|
-
let def = element ? new ThriftDataFormat({...element}) : new ThriftDataFormat();
|
3413
|
-
|
3414
|
-
return def;
|
3415
|
-
}
|
3416
|
-
|
3417
|
-
static readTidyMarkupDataFormat = (element: any): TidyMarkupDataFormat => {
|
3418
|
-
|
3419
|
-
let def = element ? new TidyMarkupDataFormat({...element}) : new TidyMarkupDataFormat();
|
3420
|
-
|
3421
|
-
return def;
|
3422
|
-
}
|
3423
|
-
|
3424
|
-
static readUniVocityCsvDataFormat = (element: any): UniVocityCsvDataFormat => {
|
3425
|
-
|
3426
|
-
let def = element ? new UniVocityCsvDataFormat({...element}) : new UniVocityCsvDataFormat();
|
3427
|
-
def.univocityHeader = element && element?.univocityHeader ? element?.univocityHeader.map((x:any) => CamelDefinitionYamlStep.readUniVocityHeader(x)) :[];
|
3428
|
-
|
3429
|
-
return def;
|
3430
|
-
}
|
3431
|
-
|
3432
|
-
static readUniVocityFixedDataFormat = (element: any): UniVocityFixedDataFormat => {
|
3433
|
-
|
3434
|
-
let def = element ? new UniVocityFixedDataFormat({...element}) : new UniVocityFixedDataFormat();
|
3435
|
-
def.univocityHeader = element && element?.univocityHeader ? element?.univocityHeader.map((x:any) => CamelDefinitionYamlStep.readUniVocityHeader(x)) :[];
|
3436
|
-
|
3437
|
-
return def;
|
3438
|
-
}
|
3439
|
-
|
3440
|
-
static readUniVocityHeader = (element: any): UniVocityHeader => {
|
3441
|
-
|
3442
|
-
let def = element ? new UniVocityHeader({...element}) : new UniVocityHeader();
|
3443
|
-
|
3444
|
-
return def;
|
3445
|
-
}
|
3446
|
-
|
3447
|
-
static readUniVocityTsvDataFormat = (element: any): UniVocityTsvDataFormat => {
|
3448
|
-
|
3449
|
-
let def = element ? new UniVocityTsvDataFormat({...element}) : new UniVocityTsvDataFormat();
|
3450
|
-
def.univocityHeader = element && element?.univocityHeader ? element?.univocityHeader.map((x:any) => CamelDefinitionYamlStep.readUniVocityHeader(x)) :[];
|
3451
|
-
|
3452
|
-
return def;
|
3453
|
-
}
|
3454
|
-
|
3455
|
-
static readXMLSecurityDataFormat = (element: any): XMLSecurityDataFormat => {
|
3456
|
-
|
3457
|
-
let def = element ? new XMLSecurityDataFormat({...element}) : new XMLSecurityDataFormat();
|
3458
|
-
|
3459
|
-
return def;
|
3460
|
-
}
|
3461
|
-
|
3462
|
-
static readYAMLDataFormat = (element: any): YAMLDataFormat => {
|
3463
|
-
|
3464
|
-
let def = element ? new YAMLDataFormat({...element}) : new YAMLDataFormat();
|
3465
|
-
def.typeFilter = element && element?.typeFilter ? element?.typeFilter.map((x:any) => CamelDefinitionYamlStep.readYAMLTypeFilterDefinition(x)) :[];
|
3466
|
-
|
3467
|
-
return def;
|
3468
|
-
}
|
3469
|
-
|
3470
|
-
static readYAMLTypeFilterDefinition = (element: any): YAMLTypeFilterDefinition => {
|
3471
|
-
|
3472
|
-
let def = element ? new YAMLTypeFilterDefinition({...element}) : new YAMLTypeFilterDefinition();
|
3473
|
-
|
3474
|
-
return def;
|
3475
|
-
}
|
3476
|
-
|
3477
|
-
static readZipDeflaterDataFormat = (element: any): ZipDeflaterDataFormat => {
|
3478
|
-
|
3479
|
-
let def = element ? new ZipDeflaterDataFormat({...element}) : new ZipDeflaterDataFormat();
|
3480
|
-
|
3481
|
-
return def;
|
3482
|
-
}
|
3483
|
-
|
3484
|
-
static readZipFileDataFormat = (element: any): ZipFileDataFormat => {
|
3485
|
-
|
3486
|
-
let def = element ? new ZipFileDataFormat({...element}) : new ZipFileDataFormat();
|
3487
|
-
|
3488
|
-
return def;
|
3489
|
-
}
|
3490
|
-
|
3491
|
-
static readDeadLetterChannelDefinition = (element: any): DeadLetterChannelDefinition => {
|
3492
|
-
|
3493
|
-
let def = element ? new DeadLetterChannelDefinition({...element}) : new DeadLetterChannelDefinition();
|
3494
|
-
if (element?.redeliveryPolicy !== undefined) {
|
3495
|
-
if (Array.isArray(element.redeliveryPolicy)) {
|
3496
|
-
def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy[0]);
|
3497
|
-
} else {
|
3498
|
-
def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy);
|
3499
|
-
}
|
3500
|
-
}
|
3501
|
-
|
3502
|
-
return def;
|
3503
|
-
}
|
3504
|
-
|
3505
|
-
static readDefaultErrorHandlerDefinition = (element: any): DefaultErrorHandlerDefinition => {
|
3506
|
-
|
3507
|
-
let def = element ? new DefaultErrorHandlerDefinition({...element}) : new DefaultErrorHandlerDefinition();
|
3508
|
-
if (element?.redeliveryPolicy !== undefined) {
|
3509
|
-
if (Array.isArray(element.redeliveryPolicy)) {
|
3510
|
-
def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy[0]);
|
3511
|
-
} else {
|
3512
|
-
def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy);
|
3513
|
-
}
|
3514
|
-
}
|
3515
|
-
|
3516
|
-
return def;
|
3517
|
-
}
|
3518
|
-
|
3519
|
-
static readJtaTransactionErrorHandlerDefinition = (element: any): JtaTransactionErrorHandlerDefinition => {
|
3520
|
-
|
3521
|
-
let def = element ? new JtaTransactionErrorHandlerDefinition({...element}) : new JtaTransactionErrorHandlerDefinition();
|
3522
|
-
if (element?.redeliveryPolicy !== undefined) {
|
3523
|
-
if (Array.isArray(element.redeliveryPolicy)) {
|
3524
|
-
def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy[0]);
|
3525
|
-
} else {
|
3526
|
-
def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy);
|
3527
|
-
}
|
3528
|
-
}
|
3529
|
-
|
3530
|
-
return def;
|
3531
|
-
}
|
3532
|
-
|
3533
|
-
static readNoErrorHandlerDefinition = (element: any): NoErrorHandlerDefinition => {
|
3534
|
-
|
3535
|
-
let def = element ? new NoErrorHandlerDefinition({...element}) : new NoErrorHandlerDefinition();
|
3536
|
-
|
3537
|
-
return def;
|
3538
|
-
}
|
3539
|
-
|
3540
|
-
static readRefErrorHandlerDefinition = (element: any): RefErrorHandlerDefinition => {
|
3541
|
-
if (element && typeof element === 'string') element = {ref: element};
|
3542
|
-
let def = element ? new RefErrorHandlerDefinition({...element}) : new RefErrorHandlerDefinition();
|
3543
|
-
|
3544
|
-
return def;
|
3545
|
-
}
|
3546
|
-
|
3547
|
-
static readSpringTransactionErrorHandlerDefinition = (element: any): SpringTransactionErrorHandlerDefinition => {
|
3548
|
-
|
3549
|
-
let def = element ? new SpringTransactionErrorHandlerDefinition({...element}) : new SpringTransactionErrorHandlerDefinition();
|
3550
|
-
if (element?.redeliveryPolicy !== undefined) {
|
3551
|
-
if (Array.isArray(element.redeliveryPolicy)) {
|
3552
|
-
def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy[0]);
|
3553
|
-
} else {
|
3554
|
-
def.redeliveryPolicy = CamelDefinitionYamlStep.readRedeliveryPolicyDefinition(element.redeliveryPolicy);
|
3555
|
-
}
|
3556
|
-
}
|
3557
|
-
|
3558
|
-
return def;
|
3559
|
-
}
|
3560
|
-
|
3561
|
-
static readCSimpleExpression = (element: any): CSimpleExpression => {
|
3562
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3563
|
-
let def = element ? new CSimpleExpression({...element}) : new CSimpleExpression();
|
3564
|
-
|
3565
|
-
return def;
|
3566
|
-
}
|
3567
|
-
|
3568
|
-
static readConstantExpression = (element: any): ConstantExpression => {
|
3569
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3570
|
-
let def = element ? new ConstantExpression({...element}) : new ConstantExpression();
|
3571
|
-
|
3572
|
-
return def;
|
3573
|
-
}
|
3574
|
-
|
3575
|
-
static readDatasonnetExpression = (element: any): DatasonnetExpression => {
|
3576
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3577
|
-
let def = element ? new DatasonnetExpression({...element}) : new DatasonnetExpression();
|
3578
|
-
|
3579
|
-
return def;
|
3580
|
-
}
|
3581
|
-
|
3582
|
-
static readExchangePropertyExpression = (element: any): ExchangePropertyExpression => {
|
3583
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3584
|
-
let def = element ? new ExchangePropertyExpression({...element}) : new ExchangePropertyExpression();
|
3585
|
-
|
3586
|
-
return def;
|
3587
|
-
}
|
3588
|
-
|
3589
|
-
static readExpressionDefinition = (element: any): ExpressionDefinition => {
|
3590
|
-
|
3591
|
-
let def = element ? new ExpressionDefinition({...element}) : new ExpressionDefinition();
|
3592
|
-
if (element?.constant !== undefined) {
|
3593
|
-
if (Array.isArray(element.constant)) {
|
3594
|
-
def.constant = CamelDefinitionYamlStep.readConstantExpression(element.constant[0]);
|
3595
|
-
} else {
|
3596
|
-
def.constant = CamelDefinitionYamlStep.readConstantExpression(element.constant);
|
3597
|
-
}
|
3598
|
-
}
|
3599
|
-
if (element?.datasonnet !== undefined) {
|
3600
|
-
if (Array.isArray(element.datasonnet)) {
|
3601
|
-
def.datasonnet = CamelDefinitionYamlStep.readDatasonnetExpression(element.datasonnet[0]);
|
3602
|
-
} else {
|
3603
|
-
def.datasonnet = CamelDefinitionYamlStep.readDatasonnetExpression(element.datasonnet);
|
3604
|
-
}
|
3605
|
-
}
|
3606
|
-
if (element?.jq !== undefined) {
|
3607
|
-
if (Array.isArray(element.jq)) {
|
3608
|
-
def.jq = CamelDefinitionYamlStep.readJqExpression(element.jq[0]);
|
3609
|
-
} else {
|
3610
|
-
def.jq = CamelDefinitionYamlStep.readJqExpression(element.jq);
|
3611
|
-
}
|
3612
|
-
}
|
3613
|
-
if (element?.js !== undefined) {
|
3614
|
-
if (Array.isArray(element.js)) {
|
3615
|
-
def.js = CamelDefinitionYamlStep.readJavaScriptExpression(element.js[0]);
|
3616
|
-
} else {
|
3617
|
-
def.js = CamelDefinitionYamlStep.readJavaScriptExpression(element.js);
|
3618
|
-
}
|
3619
|
-
}
|
3620
|
-
if (element?.language !== undefined) {
|
3621
|
-
if (Array.isArray(element.language)) {
|
3622
|
-
def.language = CamelDefinitionYamlStep.readLanguageExpression(element.language[0]);
|
3623
|
-
} else {
|
3624
|
-
def.language = CamelDefinitionYamlStep.readLanguageExpression(element.language);
|
3625
|
-
}
|
3626
|
-
}
|
3627
|
-
if (element?.simple !== undefined) {
|
3628
|
-
if (Array.isArray(element.simple)) {
|
3629
|
-
def.simple = CamelDefinitionYamlStep.readSimpleExpression(element.simple[0]);
|
3630
|
-
} else {
|
3631
|
-
def.simple = CamelDefinitionYamlStep.readSimpleExpression(element.simple);
|
3632
|
-
}
|
3633
|
-
}
|
3634
|
-
if (element?.tokenize !== undefined) {
|
3635
|
-
if (Array.isArray(element.tokenize)) {
|
3636
|
-
def.tokenize = CamelDefinitionYamlStep.readTokenizerExpression(element.tokenize[0]);
|
3637
|
-
} else {
|
3638
|
-
def.tokenize = CamelDefinitionYamlStep.readTokenizerExpression(element.tokenize);
|
3639
|
-
}
|
3640
|
-
}
|
3641
|
-
if (element?.ref !== undefined) {
|
3642
|
-
if (Array.isArray(element.ref)) {
|
3643
|
-
def.ref = CamelDefinitionYamlStep.readRefExpression(element.ref[0]);
|
3644
|
-
} else {
|
3645
|
-
def.ref = CamelDefinitionYamlStep.readRefExpression(element.ref);
|
3646
|
-
}
|
3647
|
-
}
|
3648
|
-
if (element?.xpath !== undefined) {
|
3649
|
-
if (Array.isArray(element.xpath)) {
|
3650
|
-
def.xpath = CamelDefinitionYamlStep.readXPathExpression(element.xpath[0]);
|
3651
|
-
} else {
|
3652
|
-
def.xpath = CamelDefinitionYamlStep.readXPathExpression(element.xpath);
|
3653
|
-
}
|
3654
|
-
}
|
3655
|
-
if (element?.java !== undefined) {
|
3656
|
-
if (Array.isArray(element.java)) {
|
3657
|
-
def.java = CamelDefinitionYamlStep.readJavaExpression(element.java[0]);
|
3658
|
-
} else {
|
3659
|
-
def.java = CamelDefinitionYamlStep.readJavaExpression(element.java);
|
3660
|
-
}
|
3661
|
-
}
|
3662
|
-
if (element?.wasm !== undefined) {
|
3663
|
-
if (Array.isArray(element.wasm)) {
|
3664
|
-
def.wasm = CamelDefinitionYamlStep.readWasmExpression(element.wasm[0]);
|
3665
|
-
} else {
|
3666
|
-
def.wasm = CamelDefinitionYamlStep.readWasmExpression(element.wasm);
|
3667
|
-
}
|
3668
|
-
}
|
3669
|
-
if (element?.csimple !== undefined) {
|
3670
|
-
if (Array.isArray(element.csimple)) {
|
3671
|
-
def.csimple = CamelDefinitionYamlStep.readCSimpleExpression(element.csimple[0]);
|
3672
|
-
} else {
|
3673
|
-
def.csimple = CamelDefinitionYamlStep.readCSimpleExpression(element.csimple);
|
3674
|
-
}
|
3675
|
-
}
|
3676
|
-
if (element?.jsonpath !== undefined) {
|
3677
|
-
if (Array.isArray(element.jsonpath)) {
|
3678
|
-
def.jsonpath = CamelDefinitionYamlStep.readJsonPathExpression(element.jsonpath[0]);
|
3679
|
-
} else {
|
3680
|
-
def.jsonpath = CamelDefinitionYamlStep.readJsonPathExpression(element.jsonpath);
|
3681
|
-
}
|
3682
|
-
}
|
3683
|
-
if (element?.ognl !== undefined) {
|
3684
|
-
if (Array.isArray(element.ognl)) {
|
3685
|
-
def.ognl = CamelDefinitionYamlStep.readOgnlExpression(element.ognl[0]);
|
3686
|
-
} else {
|
3687
|
-
def.ognl = CamelDefinitionYamlStep.readOgnlExpression(element.ognl);
|
3688
|
-
}
|
3689
|
-
}
|
3690
|
-
if (element?.python !== undefined) {
|
3691
|
-
if (Array.isArray(element.python)) {
|
3692
|
-
def.python = CamelDefinitionYamlStep.readPythonExpression(element.python[0]);
|
3693
|
-
} else {
|
3694
|
-
def.python = CamelDefinitionYamlStep.readPythonExpression(element.python);
|
3695
|
-
}
|
3696
|
-
}
|
3697
|
-
if (element?.mvel !== undefined) {
|
3698
|
-
if (Array.isArray(element.mvel)) {
|
3699
|
-
def.mvel = CamelDefinitionYamlStep.readMvelExpression(element.mvel[0]);
|
3700
|
-
} else {
|
3701
|
-
def.mvel = CamelDefinitionYamlStep.readMvelExpression(element.mvel);
|
3702
|
-
}
|
3703
|
-
}
|
3704
|
-
if (element?.method !== undefined) {
|
3705
|
-
if (Array.isArray(element.method)) {
|
3706
|
-
def.method = CamelDefinitionYamlStep.readMethodCallExpression(element.method[0]);
|
3707
|
-
} else {
|
3708
|
-
def.method = CamelDefinitionYamlStep.readMethodCallExpression(element.method);
|
3709
|
-
}
|
3710
|
-
}
|
3711
|
-
if (element?.xquery !== undefined) {
|
3712
|
-
if (Array.isArray(element.xquery)) {
|
3713
|
-
def.xquery = CamelDefinitionYamlStep.readXQueryExpression(element.xquery[0]);
|
3714
|
-
} else {
|
3715
|
-
def.xquery = CamelDefinitionYamlStep.readXQueryExpression(element.xquery);
|
3716
|
-
}
|
3717
|
-
}
|
3718
|
-
if (element?.hl7terser !== undefined) {
|
3719
|
-
if (Array.isArray(element.hl7terser)) {
|
3720
|
-
def.hl7terser = CamelDefinitionYamlStep.readHl7TerserExpression(element.hl7terser[0]);
|
3721
|
-
} else {
|
3722
|
-
def.hl7terser = CamelDefinitionYamlStep.readHl7TerserExpression(element.hl7terser);
|
3723
|
-
}
|
3724
|
-
}
|
3725
|
-
if (element?.spel !== undefined) {
|
3726
|
-
if (Array.isArray(element.spel)) {
|
3727
|
-
def.spel = CamelDefinitionYamlStep.readSpELExpression(element.spel[0]);
|
3728
|
-
} else {
|
3729
|
-
def.spel = CamelDefinitionYamlStep.readSpELExpression(element.spel);
|
3730
|
-
}
|
3731
|
-
}
|
3732
|
-
if (element?.groovy !== undefined) {
|
3733
|
-
if (Array.isArray(element.groovy)) {
|
3734
|
-
def.groovy = CamelDefinitionYamlStep.readGroovyExpression(element.groovy[0]);
|
3735
|
-
} else {
|
3736
|
-
def.groovy = CamelDefinitionYamlStep.readGroovyExpression(element.groovy);
|
3737
|
-
}
|
3738
|
-
}
|
3739
|
-
if (element?.exchangeProperty !== undefined) {
|
3740
|
-
if (Array.isArray(element.exchangeProperty)) {
|
3741
|
-
def.exchangeProperty = CamelDefinitionYamlStep.readExchangePropertyExpression(element.exchangeProperty[0]);
|
3742
|
-
} else {
|
3743
|
-
def.exchangeProperty = CamelDefinitionYamlStep.readExchangePropertyExpression(element.exchangeProperty);
|
3744
|
-
}
|
3745
|
-
}
|
3746
|
-
if (element?.variable !== undefined) {
|
3747
|
-
if (Array.isArray(element.variable)) {
|
3748
|
-
def.variable = CamelDefinitionYamlStep.readVariableExpression(element.variable[0]);
|
3749
|
-
} else {
|
3750
|
-
def.variable = CamelDefinitionYamlStep.readVariableExpression(element.variable);
|
3751
|
-
}
|
3752
|
-
}
|
3753
|
-
if (element?.header !== undefined) {
|
3754
|
-
if (Array.isArray(element.header)) {
|
3755
|
-
def.header = CamelDefinitionYamlStep.readHeaderExpression(element.header[0]);
|
3756
|
-
} else {
|
3757
|
-
def.header = CamelDefinitionYamlStep.readHeaderExpression(element.header);
|
3758
|
-
}
|
3759
|
-
}
|
3760
|
-
if (element?.xtokenize !== undefined) {
|
3761
|
-
if (Array.isArray(element.xtokenize)) {
|
3762
|
-
def.xtokenize = CamelDefinitionYamlStep.readXMLTokenizerExpression(element.xtokenize[0]);
|
3763
|
-
} else {
|
3764
|
-
def.xtokenize = CamelDefinitionYamlStep.readXMLTokenizerExpression(element.xtokenize);
|
3765
|
-
}
|
3766
|
-
}
|
3767
|
-
|
3768
|
-
return def;
|
3769
|
-
}
|
3770
|
-
|
3771
|
-
static readGroovyExpression = (element: any): GroovyExpression => {
|
3772
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3773
|
-
let def = element ? new GroovyExpression({...element}) : new GroovyExpression();
|
3774
|
-
|
3775
|
-
return def;
|
3776
|
-
}
|
3777
|
-
|
3778
|
-
static readHeaderExpression = (element: any): HeaderExpression => {
|
3779
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3780
|
-
let def = element ? new HeaderExpression({...element}) : new HeaderExpression();
|
3781
|
-
|
3782
|
-
return def;
|
3783
|
-
}
|
3784
|
-
|
3785
|
-
static readHl7TerserExpression = (element: any): Hl7TerserExpression => {
|
3786
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3787
|
-
let def = element ? new Hl7TerserExpression({...element}) : new Hl7TerserExpression();
|
3788
|
-
|
3789
|
-
return def;
|
3790
|
-
}
|
3791
|
-
|
3792
|
-
static readJavaExpression = (element: any): JavaExpression => {
|
3793
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3794
|
-
let def = element ? new JavaExpression({...element}) : new JavaExpression();
|
3795
|
-
|
3796
|
-
return def;
|
3797
|
-
}
|
3798
|
-
|
3799
|
-
static readJavaScriptExpression = (element: any): JavaScriptExpression => {
|
3800
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3801
|
-
let def = element ? new JavaScriptExpression({...element}) : new JavaScriptExpression();
|
3802
|
-
|
3803
|
-
return def;
|
3804
|
-
}
|
3805
|
-
|
3806
|
-
static readJqExpression = (element: any): JqExpression => {
|
3807
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3808
|
-
let def = element ? new JqExpression({...element}) : new JqExpression();
|
3809
|
-
|
3810
|
-
return def;
|
3811
|
-
}
|
3812
|
-
|
3813
|
-
static readJsonPathExpression = (element: any): JsonPathExpression => {
|
3814
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3815
|
-
let def = element ? new JsonPathExpression({...element}) : new JsonPathExpression();
|
3816
|
-
|
3817
|
-
return def;
|
3818
|
-
}
|
3819
|
-
|
3820
|
-
static readLanguageExpression = (element: any): LanguageExpression => {
|
3821
|
-
|
3822
|
-
let def = element ? new LanguageExpression({...element}) : new LanguageExpression();
|
3823
|
-
|
3824
|
-
return def;
|
3825
|
-
}
|
3826
|
-
|
3827
|
-
static readMethodCallExpression = (element: any): MethodCallExpression => {
|
3828
|
-
|
3829
|
-
let def = element ? new MethodCallExpression({...element}) : new MethodCallExpression();
|
3830
|
-
|
3831
|
-
return def;
|
3832
|
-
}
|
3833
|
-
|
3834
|
-
static readMvelExpression = (element: any): MvelExpression => {
|
3835
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3836
|
-
let def = element ? new MvelExpression({...element}) : new MvelExpression();
|
3837
|
-
|
3838
|
-
return def;
|
3839
|
-
}
|
3840
|
-
|
3841
|
-
static readOgnlExpression = (element: any): OgnlExpression => {
|
3842
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3843
|
-
let def = element ? new OgnlExpression({...element}) : new OgnlExpression();
|
3844
|
-
|
3845
|
-
return def;
|
3846
|
-
}
|
3847
|
-
|
3848
|
-
static readPythonExpression = (element: any): PythonExpression => {
|
3849
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3850
|
-
let def = element ? new PythonExpression({...element}) : new PythonExpression();
|
3851
|
-
|
3852
|
-
return def;
|
3853
|
-
}
|
3854
|
-
|
3855
|
-
static readRefExpression = (element: any): RefExpression => {
|
3856
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3857
|
-
let def = element ? new RefExpression({...element}) : new RefExpression();
|
3858
|
-
|
3859
|
-
return def;
|
3860
|
-
}
|
3861
|
-
|
3862
|
-
static readSimpleExpression = (element: any): SimpleExpression => {
|
3863
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3864
|
-
let def = element ? new SimpleExpression({...element}) : new SimpleExpression();
|
3865
|
-
|
3866
|
-
return def;
|
3867
|
-
}
|
3868
|
-
|
3869
|
-
static readSpELExpression = (element: any): SpELExpression => {
|
3870
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3871
|
-
let def = element ? new SpELExpression({...element}) : new SpELExpression();
|
3872
|
-
|
3873
|
-
return def;
|
3874
|
-
}
|
3875
|
-
|
3876
|
-
static readTokenizerExpression = (element: any): TokenizerExpression => {
|
3877
|
-
if (element && typeof element === 'string') element = {token: element};
|
3878
|
-
let def = element ? new TokenizerExpression({...element}) : new TokenizerExpression();
|
3879
|
-
|
3880
|
-
return def;
|
3881
|
-
}
|
3882
|
-
|
3883
|
-
static readVariableExpression = (element: any): VariableExpression => {
|
3884
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3885
|
-
let def = element ? new VariableExpression({...element}) : new VariableExpression();
|
3886
|
-
|
3887
|
-
return def;
|
3888
|
-
}
|
3889
|
-
|
3890
|
-
static readWasmExpression = (element: any): WasmExpression => {
|
3891
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3892
|
-
let def = element ? new WasmExpression({...element}) : new WasmExpression();
|
3893
|
-
|
3894
|
-
return def;
|
3895
|
-
}
|
3896
|
-
|
3897
|
-
static readXMLTokenizerExpression = (element: any): XMLTokenizerExpression => {
|
3898
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3899
|
-
let def = element ? new XMLTokenizerExpression({...element}) : new XMLTokenizerExpression();
|
3900
|
-
def.namespace = element && element?.namespace ? element?.namespace.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[];
|
3901
|
-
|
3902
|
-
return def;
|
3903
|
-
}
|
3904
|
-
|
3905
|
-
static readXPathExpression = (element: any): XPathExpression => {
|
3906
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3907
|
-
let def = element ? new XPathExpression({...element}) : new XPathExpression();
|
3908
|
-
def.namespace = element && element?.namespace ? element?.namespace.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[];
|
3909
|
-
|
3910
|
-
return def;
|
3911
|
-
}
|
3912
|
-
|
3913
|
-
static readXQueryExpression = (element: any): XQueryExpression => {
|
3914
|
-
if (element && typeof element === 'string') element = {expression: element};
|
3915
|
-
let def = element ? new XQueryExpression({...element}) : new XQueryExpression();
|
3916
|
-
def.namespace = element && element?.namespace ? element?.namespace.map((x:any) => CamelDefinitionYamlStep.readPropertyDefinition(x)) :[];
|
3917
|
-
|
3918
|
-
return def;
|
3919
|
-
}
|
3920
|
-
|
3921
|
-
static readCustomLoadBalancerDefinition = (element: any): CustomLoadBalancerDefinition => {
|
3922
|
-
if (element && typeof element === 'string') element = {ref: element};
|
3923
|
-
let def = element ? new CustomLoadBalancerDefinition({...element}) : new CustomLoadBalancerDefinition();
|
3924
|
-
|
3925
|
-
return def;
|
3926
|
-
}
|
3927
|
-
|
3928
|
-
static readFailoverLoadBalancerDefinition = (element: any): FailoverLoadBalancerDefinition => {
|
3929
|
-
|
3930
|
-
let def = element ? new FailoverLoadBalancerDefinition({...element}) : new FailoverLoadBalancerDefinition();
|
3931
|
-
|
3932
|
-
return def;
|
3933
|
-
}
|
3934
|
-
|
3935
|
-
static readRandomLoadBalancerDefinition = (element: any): RandomLoadBalancerDefinition => {
|
3936
|
-
|
3937
|
-
let def = element ? new RandomLoadBalancerDefinition({...element}) : new RandomLoadBalancerDefinition();
|
3938
|
-
|
3939
|
-
return def;
|
3940
|
-
}
|
3941
|
-
|
3942
|
-
static readRoundRobinLoadBalancerDefinition = (element: any): RoundRobinLoadBalancerDefinition => {
|
3943
|
-
|
3944
|
-
let def = element ? new RoundRobinLoadBalancerDefinition({...element}) : new RoundRobinLoadBalancerDefinition();
|
3945
|
-
|
3946
|
-
return def;
|
3947
|
-
}
|
3948
|
-
|
3949
|
-
static readStickyLoadBalancerDefinition = (element: any): StickyLoadBalancerDefinition => {
|
3950
|
-
|
3951
|
-
let def = element ? new StickyLoadBalancerDefinition({...element}) : new StickyLoadBalancerDefinition();
|
3952
|
-
if (element?.correlationExpression !== undefined) {
|
3953
|
-
if (Array.isArray(element.correlationExpression)) {
|
3954
|
-
def.correlationExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.correlationExpression[0]);
|
3955
|
-
} else {
|
3956
|
-
def.correlationExpression = CamelDefinitionYamlStep.readExpressionSubElementDefinition(element.correlationExpression);
|
3957
|
-
}
|
3958
|
-
}
|
3959
|
-
|
3960
|
-
return def;
|
3961
|
-
}
|
3962
|
-
|
3963
|
-
static readTopicLoadBalancerDefinition = (element: any): TopicLoadBalancerDefinition => {
|
3964
|
-
|
3965
|
-
let def = element ? new TopicLoadBalancerDefinition({...element}) : new TopicLoadBalancerDefinition();
|
3966
|
-
|
3967
|
-
return def;
|
3968
|
-
}
|
3969
|
-
|
3970
|
-
static readWeightedLoadBalancerDefinition = (element: any): WeightedLoadBalancerDefinition => {
|
3971
|
-
|
3972
|
-
let def = element ? new WeightedLoadBalancerDefinition({...element}) : new WeightedLoadBalancerDefinition();
|
3973
|
-
|
3974
|
-
return def;
|
3975
|
-
}
|
3976
|
-
|
3977
|
-
static readApiKeyDefinition = (element: any): ApiKeyDefinition => {
|
3978
|
-
|
3979
|
-
let def = element ? new ApiKeyDefinition({...element}) : new ApiKeyDefinition();
|
3980
|
-
|
3981
|
-
return def;
|
3982
|
-
}
|
3983
|
-
|
3984
|
-
static readBasicAuthDefinition = (element: any): BasicAuthDefinition => {
|
3985
|
-
|
3986
|
-
let def = element ? new BasicAuthDefinition({...element}) : new BasicAuthDefinition();
|
3987
|
-
|
3988
|
-
return def;
|
3989
|
-
}
|
3990
|
-
|
3991
|
-
static readBearerTokenDefinition = (element: any): BearerTokenDefinition => {
|
3992
|
-
|
3993
|
-
let def = element ? new BearerTokenDefinition({...element}) : new BearerTokenDefinition();
|
3994
|
-
|
3995
|
-
return def;
|
3996
|
-
}
|
3997
|
-
|
3998
|
-
static readDeleteDefinition = (element: any): DeleteDefinition => {
|
3999
|
-
|
4000
|
-
let def = element ? new DeleteDefinition({...element}) : new DeleteDefinition();
|
4001
|
-
def.security = element && element?.security ? element?.security.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[];
|
4002
|
-
def.param = element && element?.param ? element?.param.map((x:any) => CamelDefinitionYamlStep.readParamDefinition(x)) :[];
|
4003
|
-
def.responseMessage = element && element?.responseMessage ? element?.responseMessage.map((x:any) => CamelDefinitionYamlStep.readResponseMessageDefinition(x)) :[];
|
4004
|
-
|
4005
|
-
return def;
|
4006
|
-
}
|
4007
|
-
|
4008
|
-
static readGetDefinition = (element: any): GetDefinition => {
|
4009
|
-
|
4010
|
-
let def = element ? new GetDefinition({...element}) : new GetDefinition();
|
4011
|
-
def.security = element && element?.security ? element?.security.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[];
|
4012
|
-
def.param = element && element?.param ? element?.param.map((x:any) => CamelDefinitionYamlStep.readParamDefinition(x)) :[];
|
4013
|
-
def.responseMessage = element && element?.responseMessage ? element?.responseMessage.map((x:any) => CamelDefinitionYamlStep.readResponseMessageDefinition(x)) :[];
|
4014
|
-
|
4015
|
-
return def;
|
4016
|
-
}
|
4017
|
-
|
4018
|
-
static readHeadDefinition = (element: any): HeadDefinition => {
|
4019
|
-
|
4020
|
-
let def = element ? new HeadDefinition({...element}) : new HeadDefinition();
|
4021
|
-
def.security = element && element?.security ? element?.security.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[];
|
4022
|
-
def.param = element && element?.param ? element?.param.map((x:any) => CamelDefinitionYamlStep.readParamDefinition(x)) :[];
|
4023
|
-
def.responseMessage = element && element?.responseMessage ? element?.responseMessage.map((x:any) => CamelDefinitionYamlStep.readResponseMessageDefinition(x)) :[];
|
4024
|
-
|
4025
|
-
return def;
|
4026
|
-
}
|
4027
|
-
|
4028
|
-
static readMutualTLSDefinition = (element: any): MutualTLSDefinition => {
|
4029
|
-
|
4030
|
-
let def = element ? new MutualTLSDefinition({...element}) : new MutualTLSDefinition();
|
4031
|
-
|
4032
|
-
return def;
|
4033
|
-
}
|
4034
|
-
|
4035
|
-
static readOAuth2Definition = (element: any): OAuth2Definition => {
|
4036
|
-
|
4037
|
-
let def = element ? new OAuth2Definition({...element}) : new OAuth2Definition();
|
4038
|
-
def.scopes = element && element?.scopes ? element?.scopes.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[];
|
4039
|
-
|
4040
|
-
return def;
|
4041
|
-
}
|
4042
|
-
|
4043
|
-
static readOpenApiDefinition = (element: any): OpenApiDefinition => {
|
4044
|
-
|
4045
|
-
let def = element ? new OpenApiDefinition({...element}) : new OpenApiDefinition();
|
4046
|
-
|
4047
|
-
return def;
|
4048
|
-
}
|
4049
|
-
|
4050
|
-
static readOpenIdConnectDefinition = (element: any): OpenIdConnectDefinition => {
|
4051
|
-
|
4052
|
-
let def = element ? new OpenIdConnectDefinition({...element}) : new OpenIdConnectDefinition();
|
4053
|
-
|
4054
|
-
return def;
|
4055
|
-
}
|
4056
|
-
|
4057
|
-
static readParamDefinition = (element: any): ParamDefinition => {
|
4058
|
-
|
4059
|
-
let def = element ? new ParamDefinition({...element}) : new ParamDefinition();
|
4060
|
-
def.examples = element && element?.examples ? element?.examples.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[];
|
4061
|
-
|
4062
|
-
return def;
|
4063
|
-
}
|
4064
|
-
|
4065
|
-
static readPatchDefinition = (element: any): PatchDefinition => {
|
4066
|
-
|
4067
|
-
let def = element ? new PatchDefinition({...element}) : new PatchDefinition();
|
4068
|
-
def.security = element && element?.security ? element?.security.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[];
|
4069
|
-
def.param = element && element?.param ? element?.param.map((x:any) => CamelDefinitionYamlStep.readParamDefinition(x)) :[];
|
4070
|
-
def.responseMessage = element && element?.responseMessage ? element?.responseMessage.map((x:any) => CamelDefinitionYamlStep.readResponseMessageDefinition(x)) :[];
|
4071
|
-
|
4072
|
-
return def;
|
4073
|
-
}
|
4074
|
-
|
4075
|
-
static readPostDefinition = (element: any): PostDefinition => {
|
4076
|
-
|
4077
|
-
let def = element ? new PostDefinition({...element}) : new PostDefinition();
|
4078
|
-
def.security = element && element?.security ? element?.security.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[];
|
4079
|
-
def.param = element && element?.param ? element?.param.map((x:any) => CamelDefinitionYamlStep.readParamDefinition(x)) :[];
|
4080
|
-
def.responseMessage = element && element?.responseMessage ? element?.responseMessage.map((x:any) => CamelDefinitionYamlStep.readResponseMessageDefinition(x)) :[];
|
4081
|
-
|
4082
|
-
return def;
|
4083
|
-
}
|
4084
|
-
|
4085
|
-
static readPutDefinition = (element: any): PutDefinition => {
|
4086
|
-
|
4087
|
-
let def = element ? new PutDefinition({...element}) : new PutDefinition();
|
4088
|
-
def.security = element && element?.security ? element?.security.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[];
|
4089
|
-
def.param = element && element?.param ? element?.param.map((x:any) => CamelDefinitionYamlStep.readParamDefinition(x)) :[];
|
4090
|
-
def.responseMessage = element && element?.responseMessage ? element?.responseMessage.map((x:any) => CamelDefinitionYamlStep.readResponseMessageDefinition(x)) :[];
|
4091
|
-
|
4092
|
-
return def;
|
4093
|
-
}
|
4094
|
-
|
4095
|
-
static readResponseHeaderDefinition = (element: any): ResponseHeaderDefinition => {
|
4096
|
-
|
4097
|
-
let def = element ? new ResponseHeaderDefinition({...element}) : new ResponseHeaderDefinition();
|
4098
|
-
|
4099
|
-
return def;
|
4100
|
-
}
|
4101
|
-
|
4102
|
-
static readResponseMessageDefinition = (element: any): ResponseMessageDefinition => {
|
4103
|
-
|
4104
|
-
let def = element ? new ResponseMessageDefinition({...element}) : new ResponseMessageDefinition();
|
4105
|
-
def.examples = element && element?.examples ? element?.examples.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[];
|
4106
|
-
def.header = element && element?.header ? element?.header.map((x:any) => CamelDefinitionYamlStep.readResponseHeaderDefinition(x)) :[];
|
4107
|
-
|
4108
|
-
return def;
|
4109
|
-
}
|
4110
|
-
|
4111
|
-
static readRestBindingDefinition = (element: any): RestBindingDefinition => {
|
4112
|
-
|
4113
|
-
let def = element ? new RestBindingDefinition({...element}) : new RestBindingDefinition();
|
4114
|
-
|
4115
|
-
return def;
|
4116
|
-
}
|
4117
|
-
|
4118
|
-
static readRestConfigurationDefinition = (element: any): RestConfigurationDefinition => {
|
4119
|
-
|
4120
|
-
let def = element ? new RestConfigurationDefinition({...element}) : new RestConfigurationDefinition();
|
4121
|
-
def.corsHeaders = element && element?.corsHeaders ? element?.corsHeaders.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[];
|
4122
|
-
def.dataFormatProperty = element && element?.dataFormatProperty ? element?.dataFormatProperty.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[];
|
4123
|
-
def.consumerProperty = element && element?.consumerProperty ? element?.consumerProperty.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[];
|
4124
|
-
def.endpointProperty = element && element?.endpointProperty ? element?.endpointProperty.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[];
|
4125
|
-
def.apiProperty = element && element?.apiProperty ? element?.apiProperty.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[];
|
4126
|
-
def.componentProperty = element && element?.componentProperty ? element?.componentProperty.map((x:any) => CamelDefinitionYamlStep.readRestPropertyDefinition(x)) :[];
|
4127
|
-
|
4128
|
-
return def;
|
4129
|
-
}
|
4130
|
-
|
4131
|
-
static readRestDefinition = (element: any): RestDefinition => {
|
4132
|
-
|
4133
|
-
let def = element ? new RestDefinition({...element}) : new RestDefinition();
|
4134
|
-
def.head = element && element?.head ? element?.head.map((x:any) => CamelDefinitionYamlStep.readHeadDefinition(x)) :[];
|
4135
|
-
def.patch = element && element?.patch ? element?.patch.map((x:any) => CamelDefinitionYamlStep.readPatchDefinition(x)) :[];
|
4136
|
-
if (element?.openApi !== undefined) {
|
4137
|
-
if (Array.isArray(element.openApi)) {
|
4138
|
-
def.openApi = CamelDefinitionYamlStep.readOpenApiDefinition(element.openApi[0]);
|
4139
|
-
} else {
|
4140
|
-
def.openApi = CamelDefinitionYamlStep.readOpenApiDefinition(element.openApi);
|
4141
|
-
}
|
4142
|
-
}
|
4143
|
-
def.post = element && element?.post ? element?.post.map((x:any) => CamelDefinitionYamlStep.readPostDefinition(x)) :[];
|
4144
|
-
def.securityRequirements = element && element?.securityRequirements ? element?.securityRequirements.map((x:any) => CamelDefinitionYamlStep.readSecurityDefinition(x)) :[];
|
4145
|
-
def.get = element && element?.get ? element?.get.map((x:any) => CamelDefinitionYamlStep.readGetDefinition(x)) :[];
|
4146
|
-
if (element?.securityDefinitions !== undefined) {
|
4147
|
-
if (Array.isArray(element.securityDefinitions)) {
|
4148
|
-
def.securityDefinitions = CamelDefinitionYamlStep.readRestSecuritiesDefinition(element.securityDefinitions[0]);
|
4149
|
-
} else {
|
4150
|
-
def.securityDefinitions = CamelDefinitionYamlStep.readRestSecuritiesDefinition(element.securityDefinitions);
|
4151
|
-
}
|
4152
|
-
}
|
4153
|
-
def.delete = element && element?.delete ? element?.delete.map((x:any) => CamelDefinitionYamlStep.readDeleteDefinition(x)) :[];
|
4154
|
-
def.put = element && element?.put ? element?.put.map((x:any) => CamelDefinitionYamlStep.readPutDefinition(x)) :[];
|
4155
|
-
|
4156
|
-
return def;
|
4157
|
-
}
|
4158
|
-
|
4159
|
-
static readRestPropertyDefinition = (element: any): RestPropertyDefinition => {
|
4160
|
-
|
4161
|
-
let def = element ? new RestPropertyDefinition({...element}) : new RestPropertyDefinition();
|
4162
|
-
|
4163
|
-
return def;
|
4164
|
-
}
|
4165
|
-
|
4166
|
-
static readRestSecuritiesDefinition = (element: any): RestSecuritiesDefinition => {
|
4167
|
-
|
4168
|
-
let def = element ? new RestSecuritiesDefinition({...element}) : new RestSecuritiesDefinition();
|
4169
|
-
if (element?.openIdConnect !== undefined) {
|
4170
|
-
if (Array.isArray(element.openIdConnect)) {
|
4171
|
-
def.openIdConnect = CamelDefinitionYamlStep.readOpenIdConnectDefinition(element.openIdConnect[0]);
|
4172
|
-
} else {
|
4173
|
-
def.openIdConnect = CamelDefinitionYamlStep.readOpenIdConnectDefinition(element.openIdConnect);
|
4174
|
-
}
|
4175
|
-
}
|
4176
|
-
if (element?.apiKey !== undefined) {
|
4177
|
-
if (Array.isArray(element.apiKey)) {
|
4178
|
-
def.apiKey = CamelDefinitionYamlStep.readApiKeyDefinition(element.apiKey[0]);
|
4179
|
-
} else {
|
4180
|
-
def.apiKey = CamelDefinitionYamlStep.readApiKeyDefinition(element.apiKey);
|
4181
|
-
}
|
4182
|
-
}
|
4183
|
-
if (element?.basicAuth !== undefined) {
|
4184
|
-
if (Array.isArray(element.basicAuth)) {
|
4185
|
-
def.basicAuth = CamelDefinitionYamlStep.readBasicAuthDefinition(element.basicAuth[0]);
|
4186
|
-
} else {
|
4187
|
-
def.basicAuth = CamelDefinitionYamlStep.readBasicAuthDefinition(element.basicAuth);
|
4188
|
-
}
|
4189
|
-
}
|
4190
|
-
if (element?.mutualTLS !== undefined) {
|
4191
|
-
if (Array.isArray(element.mutualTLS)) {
|
4192
|
-
def.mutualTLS = CamelDefinitionYamlStep.readMutualTLSDefinition(element.mutualTLS[0]);
|
4193
|
-
} else {
|
4194
|
-
def.mutualTLS = CamelDefinitionYamlStep.readMutualTLSDefinition(element.mutualTLS);
|
4195
|
-
}
|
4196
|
-
}
|
4197
|
-
if (element?.bearer !== undefined) {
|
4198
|
-
if (Array.isArray(element.bearer)) {
|
4199
|
-
def.bearer = CamelDefinitionYamlStep.readBearerTokenDefinition(element.bearer[0]);
|
4200
|
-
} else {
|
4201
|
-
def.bearer = CamelDefinitionYamlStep.readBearerTokenDefinition(element.bearer);
|
4202
|
-
}
|
4203
|
-
}
|
4204
|
-
if (element?.oauth2 !== undefined) {
|
4205
|
-
if (Array.isArray(element.oauth2)) {
|
4206
|
-
def.oauth2 = CamelDefinitionYamlStep.readOAuth2Definition(element.oauth2[0]);
|
4207
|
-
} else {
|
4208
|
-
def.oauth2 = CamelDefinitionYamlStep.readOAuth2Definition(element.oauth2);
|
4209
|
-
}
|
4210
|
-
}
|
4211
|
-
|
4212
|
-
return def;
|
4213
|
-
}
|
4214
|
-
|
4215
|
-
static readRestsDefinition = (element: any): RestsDefinition => {
|
4216
|
-
|
4217
|
-
let def = element ? new RestsDefinition({...element}) : new RestsDefinition();
|
4218
|
-
def.rest = element && element?.rest ? element?.rest.map((x:any) => CamelDefinitionYamlStep.readRestDefinition(x)) :[];
|
4219
|
-
|
4220
|
-
return def;
|
4221
|
-
}
|
4222
|
-
|
4223
|
-
static readSecurityDefinition = (element: any): SecurityDefinition => {
|
4224
|
-
|
4225
|
-
let def = element ? new SecurityDefinition({...element}) : new SecurityDefinition();
|
4226
|
-
|
4227
|
-
return def;
|
4228
|
-
}
|
4229
|
-
|
4230
|
-
static readLangChain4jTokenizerDefinition = (element: any): LangChain4jTokenizerDefinition => {
|
4231
|
-
|
4232
|
-
let def = element ? new LangChain4jTokenizerDefinition({...element}) : new LangChain4jTokenizerDefinition();
|
4233
|
-
|
4234
|
-
return def;
|
4235
|
-
}
|
4236
|
-
|
4237
|
-
static readCustomTransformerDefinition = (element: any): CustomTransformerDefinition => {
|
4238
|
-
|
4239
|
-
let def = element ? new CustomTransformerDefinition({...element}) : new CustomTransformerDefinition();
|
4240
|
-
|
4241
|
-
return def;
|
4242
|
-
}
|
4243
|
-
|
4244
|
-
static readDataFormatTransformerDefinition = (element: any): DataFormatTransformerDefinition => {
|
4245
|
-
|
4246
|
-
let def = element ? new DataFormatTransformerDefinition({...element}) : new DataFormatTransformerDefinition();
|
4247
|
-
if (element?.univocityCsv !== undefined) {
|
4248
|
-
if (Array.isArray(element.univocityCsv)) {
|
4249
|
-
def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv[0]);
|
4250
|
-
} else {
|
4251
|
-
def.univocityCsv = CamelDefinitionYamlStep.readUniVocityCsvDataFormat(element.univocityCsv);
|
4252
|
-
}
|
4253
|
-
}
|
4254
|
-
if (element?.protobuf !== undefined) {
|
4255
|
-
if (Array.isArray(element.protobuf)) {
|
4256
|
-
def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf[0]);
|
4257
|
-
} else {
|
4258
|
-
def.protobuf = CamelDefinitionYamlStep.readProtobufDataFormat(element.protobuf);
|
4259
|
-
}
|
4260
|
-
}
|
4261
|
-
if (element?.tarFile !== undefined) {
|
4262
|
-
if (Array.isArray(element.tarFile)) {
|
4263
|
-
def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile[0]);
|
4264
|
-
} else {
|
4265
|
-
def.tarFile = CamelDefinitionYamlStep.readTarFileDataFormat(element.tarFile);
|
4266
|
-
}
|
4267
|
-
}
|
4268
|
-
if (element?.tidyMarkup !== undefined) {
|
4269
|
-
if (Array.isArray(element.tidyMarkup)) {
|
4270
|
-
def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup[0]);
|
4271
|
-
} else {
|
4272
|
-
def.tidyMarkup = CamelDefinitionYamlStep.readTidyMarkupDataFormat(element.tidyMarkup);
|
4273
|
-
}
|
4274
|
-
}
|
4275
|
-
if (element?.csv !== undefined) {
|
4276
|
-
if (Array.isArray(element.csv)) {
|
4277
|
-
def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv[0]);
|
4278
|
-
} else {
|
4279
|
-
def.csv = CamelDefinitionYamlStep.readCsvDataFormat(element.csv);
|
4280
|
-
}
|
4281
|
-
}
|
4282
|
-
if (element?.base64 !== undefined) {
|
4283
|
-
if (Array.isArray(element.base64)) {
|
4284
|
-
def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64[0]);
|
4285
|
-
} else {
|
4286
|
-
def.base64 = CamelDefinitionYamlStep.readBase64DataFormat(element.base64);
|
4287
|
-
}
|
4288
|
-
}
|
4289
|
-
if (element?.zipDeflater !== undefined) {
|
4290
|
-
if (Array.isArray(element.zipDeflater)) {
|
4291
|
-
def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater[0]);
|
4292
|
-
} else {
|
4293
|
-
def.zipDeflater = CamelDefinitionYamlStep.readZipDeflaterDataFormat(element.zipDeflater);
|
4294
|
-
}
|
4295
|
-
}
|
4296
|
-
if (element?.bindy !== undefined) {
|
4297
|
-
if (Array.isArray(element.bindy)) {
|
4298
|
-
def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy[0]);
|
4299
|
-
} else {
|
4300
|
-
def.bindy = CamelDefinitionYamlStep.readBindyDataFormat(element.bindy);
|
4301
|
-
}
|
4302
|
-
}
|
4303
|
-
if (element?.syslog !== undefined) {
|
4304
|
-
if (Array.isArray(element.syslog)) {
|
4305
|
-
def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog[0]);
|
4306
|
-
} else {
|
4307
|
-
def.syslog = CamelDefinitionYamlStep.readSyslogDataFormat(element.syslog);
|
4308
|
-
}
|
4309
|
-
}
|
4310
|
-
if (element?.zipFile !== undefined) {
|
4311
|
-
if (Array.isArray(element.zipFile)) {
|
4312
|
-
def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile[0]);
|
4313
|
-
} else {
|
4314
|
-
def.zipFile = CamelDefinitionYamlStep.readZipFileDataFormat(element.zipFile);
|
4315
|
-
}
|
4316
|
-
}
|
4317
|
-
if (element?.jaxb !== undefined) {
|
4318
|
-
if (Array.isArray(element.jaxb)) {
|
4319
|
-
def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb[0]);
|
4320
|
-
} else {
|
4321
|
-
def.jaxb = CamelDefinitionYamlStep.readJaxbDataFormat(element.jaxb);
|
4322
|
-
}
|
4323
|
-
}
|
4324
|
-
if (element?.parquetAvro !== undefined) {
|
4325
|
-
if (Array.isArray(element.parquetAvro)) {
|
4326
|
-
def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro[0]);
|
4327
|
-
} else {
|
4328
|
-
def.parquetAvro = CamelDefinitionYamlStep.readParquetAvroDataFormat(element.parquetAvro);
|
4329
|
-
}
|
4330
|
-
}
|
4331
|
-
if (element?.rss !== undefined) {
|
4332
|
-
if (Array.isArray(element.rss)) {
|
4333
|
-
def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss[0]);
|
4334
|
-
} else {
|
4335
|
-
def.rss = CamelDefinitionYamlStep.readRssDataFormat(element.rss);
|
4336
|
-
}
|
4337
|
-
}
|
4338
|
-
if (element?.mimeMultipart !== undefined) {
|
4339
|
-
if (Array.isArray(element.mimeMultipart)) {
|
4340
|
-
def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart[0]);
|
4341
|
-
} else {
|
4342
|
-
def.mimeMultipart = CamelDefinitionYamlStep.readMimeMultipartDataFormat(element.mimeMultipart);
|
4343
|
-
}
|
4344
|
-
}
|
4345
|
-
if (element?.asn1 !== undefined) {
|
4346
|
-
if (Array.isArray(element.asn1)) {
|
4347
|
-
def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1[0]);
|
4348
|
-
} else {
|
4349
|
-
def.asn1 = CamelDefinitionYamlStep.readASN1DataFormat(element.asn1);
|
4350
|
-
}
|
4351
|
-
}
|
4352
|
-
if (element?.pgp !== undefined) {
|
4353
|
-
if (Array.isArray(element.pgp)) {
|
4354
|
-
def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp[0]);
|
4355
|
-
} else {
|
4356
|
-
def.pgp = CamelDefinitionYamlStep.readPGPDataFormat(element.pgp);
|
4357
|
-
}
|
4358
|
-
}
|
4359
|
-
if (element?.thrift !== undefined) {
|
4360
|
-
if (Array.isArray(element.thrift)) {
|
4361
|
-
def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift[0]);
|
4362
|
-
} else {
|
4363
|
-
def.thrift = CamelDefinitionYamlStep.readThriftDataFormat(element.thrift);
|
4364
|
-
}
|
4365
|
-
}
|
4366
|
-
if (element?.json !== undefined) {
|
4367
|
-
if (Array.isArray(element.json)) {
|
4368
|
-
def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json[0]);
|
4369
|
-
} else {
|
4370
|
-
def.json = CamelDefinitionYamlStep.readJsonDataFormat(element.json);
|
4371
|
-
}
|
4372
|
-
}
|
4373
|
-
if (element?.lzf !== undefined) {
|
4374
|
-
if (Array.isArray(element.lzf)) {
|
4375
|
-
def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf[0]);
|
4376
|
-
} else {
|
4377
|
-
def.lzf = CamelDefinitionYamlStep.readLZFDataFormat(element.lzf);
|
4378
|
-
}
|
4379
|
-
}
|
4380
|
-
if (element?.fhirXml !== undefined) {
|
4381
|
-
if (Array.isArray(element.fhirXml)) {
|
4382
|
-
def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml[0]);
|
4383
|
-
} else {
|
4384
|
-
def.fhirXml = CamelDefinitionYamlStep.readFhirXmlDataFormat(element.fhirXml);
|
4385
|
-
}
|
4386
|
-
}
|
4387
|
-
if (element?.barcode !== undefined) {
|
4388
|
-
if (Array.isArray(element.barcode)) {
|
4389
|
-
def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode[0]);
|
4390
|
-
} else {
|
4391
|
-
def.barcode = CamelDefinitionYamlStep.readBarcodeDataFormat(element.barcode);
|
4392
|
-
}
|
4393
|
-
}
|
4394
|
-
if (element?.avro !== undefined) {
|
4395
|
-
if (Array.isArray(element.avro)) {
|
4396
|
-
def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro[0]);
|
4397
|
-
} else {
|
4398
|
-
def.avro = CamelDefinitionYamlStep.readAvroDataFormat(element.avro);
|
4399
|
-
}
|
4400
|
-
}
|
4401
|
-
if (element?.yaml !== undefined) {
|
4402
|
-
if (Array.isArray(element.yaml)) {
|
4403
|
-
def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml[0]);
|
4404
|
-
} else {
|
4405
|
-
def.yaml = CamelDefinitionYamlStep.readYAMLDataFormat(element.yaml);
|
4406
|
-
}
|
4407
|
-
}
|
4408
|
-
if (element?.beanio !== undefined) {
|
4409
|
-
if (Array.isArray(element.beanio)) {
|
4410
|
-
def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio[0]);
|
4411
|
-
} else {
|
4412
|
-
def.beanio = CamelDefinitionYamlStep.readBeanioDataFormat(element.beanio);
|
4413
|
-
}
|
4414
|
-
}
|
4415
|
-
if (element?.fhirJson !== undefined) {
|
4416
|
-
if (Array.isArray(element.fhirJson)) {
|
4417
|
-
def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson[0]);
|
4418
|
-
} else {
|
4419
|
-
def.fhirJson = CamelDefinitionYamlStep.readFhirJsonDataFormat(element.fhirJson);
|
4420
|
-
}
|
4421
|
-
}
|
4422
|
-
if (element?.custom !== undefined) {
|
4423
|
-
if (Array.isArray(element.custom)) {
|
4424
|
-
def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom[0]);
|
4425
|
-
} else {
|
4426
|
-
def.custom = CamelDefinitionYamlStep.readCustomDataFormat(element.custom);
|
4427
|
-
}
|
4428
|
-
}
|
4429
|
-
if (element?.flatpack !== undefined) {
|
4430
|
-
if (Array.isArray(element.flatpack)) {
|
4431
|
-
def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack[0]);
|
4432
|
-
} else {
|
4433
|
-
def.flatpack = CamelDefinitionYamlStep.readFlatpackDataFormat(element.flatpack);
|
4434
|
-
}
|
4435
|
-
}
|
4436
|
-
if (element?.swiftMx !== undefined) {
|
4437
|
-
if (Array.isArray(element.swiftMx)) {
|
4438
|
-
def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx[0]);
|
4439
|
-
} else {
|
4440
|
-
def.swiftMx = CamelDefinitionYamlStep.readSwiftMxDataFormat(element.swiftMx);
|
4441
|
-
}
|
4442
|
-
}
|
4443
|
-
if (element?.cbor !== undefined) {
|
4444
|
-
if (Array.isArray(element.cbor)) {
|
4445
|
-
def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor[0]);
|
4446
|
-
} else {
|
4447
|
-
def.cbor = CamelDefinitionYamlStep.readCBORDataFormat(element.cbor);
|
4448
|
-
}
|
4449
|
-
}
|
4450
|
-
if (element?.crypto !== undefined) {
|
4451
|
-
if (Array.isArray(element.crypto)) {
|
4452
|
-
def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto[0]);
|
4453
|
-
} else {
|
4454
|
-
def.crypto = CamelDefinitionYamlStep.readCryptoDataFormat(element.crypto);
|
4455
|
-
}
|
4456
|
-
}
|
4457
|
-
if (element?.swiftMt !== undefined) {
|
4458
|
-
if (Array.isArray(element.swiftMt)) {
|
4459
|
-
def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt[0]);
|
4460
|
-
} else {
|
4461
|
-
def.swiftMt = CamelDefinitionYamlStep.readSwiftMtDataFormat(element.swiftMt);
|
4462
|
-
}
|
4463
|
-
}
|
4464
|
-
if (element?.univocityTsv !== undefined) {
|
4465
|
-
if (Array.isArray(element.univocityTsv)) {
|
4466
|
-
def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv[0]);
|
4467
|
-
} else {
|
4468
|
-
def.univocityTsv = CamelDefinitionYamlStep.readUniVocityTsvDataFormat(element.univocityTsv);
|
4469
|
-
}
|
4470
|
-
}
|
4471
|
-
if (element?.hl7 !== undefined) {
|
4472
|
-
if (Array.isArray(element.hl7)) {
|
4473
|
-
def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7[0]);
|
4474
|
-
} else {
|
4475
|
-
def.hl7 = CamelDefinitionYamlStep.readHL7DataFormat(element.hl7);
|
4476
|
-
}
|
4477
|
-
}
|
4478
|
-
if (element?.jsonApi !== undefined) {
|
4479
|
-
if (Array.isArray(element.jsonApi)) {
|
4480
|
-
def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi[0]);
|
4481
|
-
} else {
|
4482
|
-
def.jsonApi = CamelDefinitionYamlStep.readJsonApiDataFormat(element.jsonApi);
|
4483
|
-
}
|
4484
|
-
}
|
4485
|
-
if (element?.xmlSecurity !== undefined) {
|
4486
|
-
if (Array.isArray(element.xmlSecurity)) {
|
4487
|
-
def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity[0]);
|
4488
|
-
} else {
|
4489
|
-
def.xmlSecurity = CamelDefinitionYamlStep.readXMLSecurityDataFormat(element.xmlSecurity);
|
4490
|
-
}
|
4491
|
-
}
|
4492
|
-
if (element?.ical !== undefined) {
|
4493
|
-
if (Array.isArray(element.ical)) {
|
4494
|
-
def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical[0]);
|
4495
|
-
} else {
|
4496
|
-
def.ical = CamelDefinitionYamlStep.readIcalDataFormat(element.ical);
|
4497
|
-
}
|
4498
|
-
}
|
4499
|
-
if (element?.univocityFixed !== undefined) {
|
4500
|
-
if (Array.isArray(element.univocityFixed)) {
|
4501
|
-
def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed[0]);
|
4502
|
-
} else {
|
4503
|
-
def.univocityFixed = CamelDefinitionYamlStep.readUniVocityFixedDataFormat(element.univocityFixed);
|
4504
|
-
}
|
4505
|
-
}
|
4506
|
-
if (element?.jacksonXml !== undefined) {
|
4507
|
-
if (Array.isArray(element.jacksonXml)) {
|
4508
|
-
def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml[0]);
|
4509
|
-
} else {
|
4510
|
-
def.jacksonXml = CamelDefinitionYamlStep.readJacksonXMLDataFormat(element.jacksonXml);
|
4511
|
-
}
|
4512
|
-
}
|
4513
|
-
if (element?.grok !== undefined) {
|
4514
|
-
if (Array.isArray(element.grok)) {
|
4515
|
-
def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok[0]);
|
4516
|
-
} else {
|
4517
|
-
def.grok = CamelDefinitionYamlStep.readGrokDataFormat(element.grok);
|
4518
|
-
}
|
4519
|
-
}
|
4520
|
-
if (element?.gzipDeflater !== undefined) {
|
4521
|
-
if (Array.isArray(element.gzipDeflater)) {
|
4522
|
-
def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater[0]);
|
4523
|
-
} else {
|
4524
|
-
def.gzipDeflater = CamelDefinitionYamlStep.readGzipDeflaterDataFormat(element.gzipDeflater);
|
4525
|
-
}
|
4526
|
-
}
|
4527
|
-
if (element?.soap !== undefined) {
|
4528
|
-
if (Array.isArray(element.soap)) {
|
4529
|
-
def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap[0]);
|
4530
|
-
} else {
|
4531
|
-
def.soap = CamelDefinitionYamlStep.readSoapDataFormat(element.soap);
|
4532
|
-
}
|
4533
|
-
}
|
4534
|
-
|
4535
|
-
return def;
|
4536
|
-
}
|
4537
|
-
|
4538
|
-
static readEndpointTransformerDefinition = (element: any): EndpointTransformerDefinition => {
|
4539
|
-
|
4540
|
-
let def = element ? new EndpointTransformerDefinition({...element}) : new EndpointTransformerDefinition();
|
4541
|
-
def = ComponentApi.parseElementUri(def);
|
4542
|
-
|
4543
|
-
return def;
|
4544
|
-
}
|
4545
|
-
|
4546
|
-
static readLoadTransformerDefinition = (element: any): LoadTransformerDefinition => {
|
4547
|
-
|
4548
|
-
let def = element ? new LoadTransformerDefinition({...element}) : new LoadTransformerDefinition();
|
4549
|
-
|
4550
|
-
return def;
|
4551
|
-
}
|
4552
|
-
|
4553
|
-
static readTransformersDefinition = (element: any): TransformersDefinition => {
|
4554
|
-
|
4555
|
-
let def = element ? new TransformersDefinition({...element}) : new TransformersDefinition();
|
4556
|
-
if (element?.endpointTransformer !== undefined) {
|
4557
|
-
if (Array.isArray(element.endpointTransformer)) {
|
4558
|
-
def.endpointTransformer = CamelDefinitionYamlStep.readEndpointTransformerDefinition(element.endpointTransformer[0]);
|
4559
|
-
} else {
|
4560
|
-
def.endpointTransformer = CamelDefinitionYamlStep.readEndpointTransformerDefinition(element.endpointTransformer);
|
4561
|
-
}
|
4562
|
-
}
|
4563
|
-
if (element?.customTransformer !== undefined) {
|
4564
|
-
if (Array.isArray(element.customTransformer)) {
|
4565
|
-
def.customTransformer = CamelDefinitionYamlStep.readCustomTransformerDefinition(element.customTransformer[0]);
|
4566
|
-
} else {
|
4567
|
-
def.customTransformer = CamelDefinitionYamlStep.readCustomTransformerDefinition(element.customTransformer);
|
4568
|
-
}
|
4569
|
-
}
|
4570
|
-
if (element?.loadTransformer !== undefined) {
|
4571
|
-
if (Array.isArray(element.loadTransformer)) {
|
4572
|
-
def.loadTransformer = CamelDefinitionYamlStep.readLoadTransformerDefinition(element.loadTransformer[0]);
|
4573
|
-
} else {
|
4574
|
-
def.loadTransformer = CamelDefinitionYamlStep.readLoadTransformerDefinition(element.loadTransformer);
|
4575
|
-
}
|
4576
|
-
}
|
4577
|
-
if (element?.dataFormatTransformer !== undefined) {
|
4578
|
-
if (Array.isArray(element.dataFormatTransformer)) {
|
4579
|
-
def.dataFormatTransformer = CamelDefinitionYamlStep.readDataFormatTransformerDefinition(element.dataFormatTransformer[0]);
|
4580
|
-
} else {
|
4581
|
-
def.dataFormatTransformer = CamelDefinitionYamlStep.readDataFormatTransformerDefinition(element.dataFormatTransformer);
|
4582
|
-
}
|
4583
|
-
}
|
4584
|
-
|
4585
|
-
return def;
|
4586
|
-
}
|
4587
|
-
|
4588
|
-
static readCustomValidatorDefinition = (element: any): CustomValidatorDefinition => {
|
4589
|
-
|
4590
|
-
let def = element ? new CustomValidatorDefinition({...element}) : new CustomValidatorDefinition();
|
4591
|
-
|
4592
|
-
return def;
|
4593
|
-
}
|
4594
|
-
|
4595
|
-
static readEndpointValidatorDefinition = (element: any): EndpointValidatorDefinition => {
|
4596
|
-
|
4597
|
-
let def = element ? new EndpointValidatorDefinition({...element}) : new EndpointValidatorDefinition();
|
4598
|
-
def = ComponentApi.parseElementUri(def);
|
4599
|
-
|
4600
|
-
return def;
|
4601
|
-
}
|
4602
|
-
|
4603
|
-
static readPredicateValidatorDefinition = (element: any): PredicateValidatorDefinition => {
|
4604
|
-
|
4605
|
-
let def = element ? new PredicateValidatorDefinition({...element}) : new PredicateValidatorDefinition();
|
4606
|
-
if (element?.expression !== undefined) {
|
4607
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(element.expression);
|
4608
|
-
} else {
|
4609
|
-
const languageName: string | undefined = Object.keys(element).filter(key => CamelMetadataApi.hasLanguage(key))[0] || undefined;
|
4610
|
-
if (languageName){
|
4611
|
-
const exp:any = {};
|
4612
|
-
exp[languageName] = element[languageName]
|
4613
|
-
def.expression = CamelDefinitionYamlStep.readExpressionDefinition(exp);
|
4614
|
-
delete (def as any)[languageName];
|
4615
|
-
}
|
4616
|
-
}
|
4617
|
-
|
4618
|
-
return def;
|
4619
|
-
}
|
4620
|
-
|
4621
|
-
static readValidatorsDefinition = (element: any): ValidatorsDefinition => {
|
4622
|
-
|
4623
|
-
let def = element ? new ValidatorsDefinition({...element}) : new ValidatorsDefinition();
|
4624
|
-
if (element?.predicateValidator !== undefined) {
|
4625
|
-
if (Array.isArray(element.predicateValidator)) {
|
4626
|
-
def.predicateValidator = CamelDefinitionYamlStep.readPredicateValidatorDefinition(element.predicateValidator[0]);
|
4627
|
-
} else {
|
4628
|
-
def.predicateValidator = CamelDefinitionYamlStep.readPredicateValidatorDefinition(element.predicateValidator);
|
4629
|
-
}
|
4630
|
-
}
|
4631
|
-
if (element?.endpointValidator !== undefined) {
|
4632
|
-
if (Array.isArray(element.endpointValidator)) {
|
4633
|
-
def.endpointValidator = CamelDefinitionYamlStep.readEndpointValidatorDefinition(element.endpointValidator[0]);
|
4634
|
-
} else {
|
4635
|
-
def.endpointValidator = CamelDefinitionYamlStep.readEndpointValidatorDefinition(element.endpointValidator);
|
4636
|
-
}
|
4637
|
-
}
|
4638
|
-
if (element?.customValidator !== undefined) {
|
4639
|
-
if (Array.isArray(element.customValidator)) {
|
4640
|
-
def.customValidator = CamelDefinitionYamlStep.readCustomValidatorDefinition(element.customValidator[0]);
|
4641
|
-
} else {
|
4642
|
-
def.customValidator = CamelDefinitionYamlStep.readCustomValidatorDefinition(element.customValidator);
|
4643
|
-
}
|
4644
|
-
}
|
4645
|
-
|
4646
|
-
return def;
|
4647
|
-
}
|
4648
|
-
|
4649
|
-
static readStep = (body: any, clone: boolean = false): CamelElement => {
|
4650
|
-
const name = Object.getOwnPropertyNames(body)[0];
|
4651
|
-
const newBody = CamelUtil.camelizeBody(name, body[name], clone);
|
4652
|
-
switch (name) {
|
4653
|
-
case 'aggregate': return CamelDefinitionYamlStep.readAggregateDefinition(newBody);
|
4654
|
-
case 'bean': return CamelDefinitionYamlStep.readBeanDefinition(newBody);
|
4655
|
-
case 'doCatch': return CamelDefinitionYamlStep.readCatchDefinition(newBody);
|
4656
|
-
case 'choice': return CamelDefinitionYamlStep.readChoiceDefinition(newBody);
|
4657
|
-
case 'circuitBreaker': return CamelDefinitionYamlStep.readCircuitBreakerDefinition(newBody);
|
4658
|
-
case 'claimCheck': return CamelDefinitionYamlStep.readClaimCheckDefinition(newBody);
|
4659
|
-
case 'convertBodyTo': return CamelDefinitionYamlStep.readConvertBodyDefinition(newBody);
|
4660
|
-
case 'convertHeaderTo': return CamelDefinitionYamlStep.readConvertHeaderDefinition(newBody);
|
4661
|
-
case 'convertVariableTo': return CamelDefinitionYamlStep.readConvertVariableDefinition(newBody);
|
4662
|
-
case 'delay': return CamelDefinitionYamlStep.readDelayDefinition(newBody);
|
4663
|
-
case 'dynamicRouter': return CamelDefinitionYamlStep.readDynamicRouterDefinition(newBody);
|
4664
|
-
case 'enrich': return CamelDefinitionYamlStep.readEnrichDefinition(newBody);
|
4665
|
-
case 'filter': return CamelDefinitionYamlStep.readFilterDefinition(newBody);
|
4666
|
-
case 'doFinally': return CamelDefinitionYamlStep.readFinallyDefinition(newBody);
|
4667
|
-
case 'idempotentConsumer': return CamelDefinitionYamlStep.readIdempotentConsumerDefinition(newBody);
|
4668
|
-
case 'kamelet': return CamelDefinitionYamlStep.readKameletDefinition(newBody);
|
4669
|
-
case 'loadBalance': return CamelDefinitionYamlStep.readLoadBalanceDefinition(newBody);
|
4670
|
-
case 'log': return CamelDefinitionYamlStep.readLogDefinition(newBody);
|
4671
|
-
case 'loop': return CamelDefinitionYamlStep.readLoopDefinition(newBody);
|
4672
|
-
case 'marshal': return CamelDefinitionYamlStep.readMarshalDefinition(newBody);
|
4673
|
-
case 'multicast': return CamelDefinitionYamlStep.readMulticastDefinition(newBody);
|
4674
|
-
case 'onFallback': return CamelDefinitionYamlStep.readOnFallbackDefinition(newBody);
|
4675
|
-
case 'otherwise': return CamelDefinitionYamlStep.readOtherwiseDefinition(newBody);
|
4676
|
-
case 'pausable': return CamelDefinitionYamlStep.readPausableDefinition(newBody);
|
4677
|
-
case 'pipeline': return CamelDefinitionYamlStep.readPipelineDefinition(newBody);
|
4678
|
-
case 'policy': return CamelDefinitionYamlStep.readPolicyDefinition(newBody);
|
4679
|
-
case 'poll': return CamelDefinitionYamlStep.readPollDefinition(newBody);
|
4680
|
-
case 'pollEnrich': return CamelDefinitionYamlStep.readPollEnrichDefinition(newBody);
|
4681
|
-
case 'process': return CamelDefinitionYamlStep.readProcessDefinition(newBody);
|
4682
|
-
case 'recipientList': return CamelDefinitionYamlStep.readRecipientListDefinition(newBody);
|
4683
|
-
case 'removeHeader': return CamelDefinitionYamlStep.readRemoveHeaderDefinition(newBody);
|
4684
|
-
case 'removeHeaders': return CamelDefinitionYamlStep.readRemoveHeadersDefinition(newBody);
|
4685
|
-
case 'removeProperties': return CamelDefinitionYamlStep.readRemovePropertiesDefinition(newBody);
|
4686
|
-
case 'removeProperty': return CamelDefinitionYamlStep.readRemovePropertyDefinition(newBody);
|
4687
|
-
case 'removeVariable': return CamelDefinitionYamlStep.readRemoveVariableDefinition(newBody);
|
4688
|
-
case 'resequence': return CamelDefinitionYamlStep.readResequenceDefinition(newBody);
|
4689
|
-
case 'resumable': return CamelDefinitionYamlStep.readResumableDefinition(newBody);
|
4690
|
-
case 'rollback': return CamelDefinitionYamlStep.readRollbackDefinition(newBody);
|
4691
|
-
case 'routingSlip': return CamelDefinitionYamlStep.readRoutingSlipDefinition(newBody);
|
4692
|
-
case 'saga': return CamelDefinitionYamlStep.readSagaDefinition(newBody);
|
4693
|
-
case 'sample': return CamelDefinitionYamlStep.readSamplingDefinition(newBody);
|
4694
|
-
case 'script': return CamelDefinitionYamlStep.readScriptDefinition(newBody);
|
4695
|
-
case 'setBody': return CamelDefinitionYamlStep.readSetBodyDefinition(newBody);
|
4696
|
-
case 'setExchangePattern': return CamelDefinitionYamlStep.readSetExchangePatternDefinition(newBody);
|
4697
|
-
case 'setHeader': return CamelDefinitionYamlStep.readSetHeaderDefinition(newBody);
|
4698
|
-
case 'setHeaders': return CamelDefinitionYamlStep.readSetHeadersDefinition(newBody);
|
4699
|
-
case 'setProperty': return CamelDefinitionYamlStep.readSetPropertyDefinition(newBody);
|
4700
|
-
case 'setVariable': return CamelDefinitionYamlStep.readSetVariableDefinition(newBody);
|
4701
|
-
case 'setVariables': return CamelDefinitionYamlStep.readSetVariablesDefinition(newBody);
|
4702
|
-
case 'sort': return CamelDefinitionYamlStep.readSortDefinition(newBody);
|
4703
|
-
case 'split': return CamelDefinitionYamlStep.readSplitDefinition(newBody);
|
4704
|
-
case 'step': return CamelDefinitionYamlStep.readStepDefinition(newBody);
|
4705
|
-
case 'stop': return CamelDefinitionYamlStep.readStopDefinition(newBody);
|
4706
|
-
case 'threads': return CamelDefinitionYamlStep.readThreadsDefinition(newBody);
|
4707
|
-
case 'throttle': return CamelDefinitionYamlStep.readThrottleDefinition(newBody);
|
4708
|
-
case 'throwException': return CamelDefinitionYamlStep.readThrowExceptionDefinition(newBody);
|
4709
|
-
case 'to': return CamelDefinitionYamlStep.readToDefinition(newBody);
|
4710
|
-
case 'toD': return CamelDefinitionYamlStep.readToDynamicDefinition(newBody);
|
4711
|
-
case 'transacted': return CamelDefinitionYamlStep.readTransactedDefinition(newBody);
|
4712
|
-
case 'transform': return CamelDefinitionYamlStep.readTransformDefinition(newBody);
|
4713
|
-
case 'doTry': return CamelDefinitionYamlStep.readTryDefinition(newBody);
|
4714
|
-
case 'unmarshal': return CamelDefinitionYamlStep.readUnmarshalDefinition(newBody);
|
4715
|
-
case 'validate': return CamelDefinitionYamlStep.readValidateDefinition(newBody);
|
4716
|
-
case 'when': return CamelDefinitionYamlStep.readWhenDefinition(newBody);
|
4717
|
-
case 'whenSkipSendToEndpoint': return CamelDefinitionYamlStep.readWhenSkipSendToEndpointDefinition(newBody);
|
4718
|
-
case 'wireTap': return CamelDefinitionYamlStep.readWireTapDefinition(newBody);
|
4719
|
-
case 'langChain4j': return CamelDefinitionYamlStep.readLangChain4jTokenizerDefinition(newBody);
|
4720
|
-
default: return new CamelElement('');
|
4721
|
-
}
|
4722
|
-
}
|
4723
|
-
|
4724
|
-
static readSteps = (elements: any[] | undefined): CamelElement[] => {
|
4725
|
-
const result: CamelElement[] = []
|
4726
|
-
if (elements !== undefined){
|
4727
|
-
elements.forEach(e => {
|
4728
|
-
result.push(CamelDefinitionYamlStep.readStep(e));
|
4729
|
-
})
|
4730
|
-
}
|
4731
|
-
return result
|
4732
|
-
}
|
4733
|
-
}
|