forked from vertigo-io/vertigo-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-renaming-tool.xml
626 lines (554 loc) · 34.2 KB
/
update-renaming-tool.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== -->
<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
<!-- ====================================================================== -->
<project name="Vertigo Update Renaming Tool" default="">
<!-- =================================================================== -->
<!-- Proprietes -->
<!-- =================================================================== -->
<property name="src.encoding" value="utf8" />
<property name="src.path" value="." />
<!-- ====================================================================== -->
<!-- Replace quarto's ksp definitions by a Java definition provider -->
<!-- ====================================================================== -->
<target name="0.9.3 to 0.9.4 publisher definitions from ksp to Java" description="Replace quarto's ksp definitions by a Java definition provider">
<copy todir="${src.path}" >
<fileset dir="${src.path}">
<include name="**/*.ksp" />
<containsregexp expression="create(\s)*(PublisherNode|PublisherDefinition)"/>
</fileset>
<globmapper from="*.ksp" to="*.ksp2java" casesensitive="no"/>
</copy>
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.ksp2java" />
</fileset>
<regexp pattern="\n\s*\}\s*\n" />
<substitution expression=".build();${line.separator}${line.separator}" />
</replaceregexp>
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.ksp2java" />
</fileset>
<regexp pattern="\n\s*\}" />
<substitution expression=".build();${line.separator}${line.separator}}" />
</replaceregexp>
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.ksp2java" />
</fileset>
<regexp pattern="package\s*([A-Za-z0-9\.]*)\.([A-Za-z0-9]+)" />
<substitution expression="package \1.\2;
${line.separator}import java.util.List;
${line.separator}import io.vertigo.core.definition.Definition;
${line.separator}import io.vertigo.core.definition.DefinitionSpace;
${line.separator}import io.vertigo.core.definition.SimpleDefinitionProvider;
${line.separator}import io.vertigo.quarto.services.publisher.metamodel.PublisherDataDefinition;
${line.separator}import io.vertigo.quarto.services.publisher.metamodel.PublisherNodeDefinition;
${line.separator}import io.vertigo.quarto.services.publisher.metamodel.PublisherNodeDefinitionBuilder;
${line.separator}import io.vertigo.util.ListBuilder;
${line.separator}
${line.separator}public final class \2PublisherDefinitionProvider implements SimpleDefinitionProvider {
${line.separator}
${line.separator}@Override
${line.separator}public List<Definition> provideDefinitions(final DefinitionSpace definitionSpace) {
${line.separator} return new ListBuilder<Definition>()
${line.separator} .add(/*TODO*/)
${line.separator} .build();
${line.separator} } " />
</replaceregexp>
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.ksp2java" />
</fileset>
<regexp pattern="create\s*PublisherNode\s*([A-Za-z_0-9]+)\s*\{" />
<substitution expression="private final PublisherNodeDefinition \1 = new PublisherNodeDefinitionBuilder()" />
</replaceregexp>
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.ksp2java" />
</fileset>
<regexp pattern="stringField\s*([A-Za-z_0-9]+)\s*\{\s*\}" />
<substitution expression=".addStringField("\1")" />
</replaceregexp>
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.ksp2java" />
</fileset>
<regexp pattern="booleanField\s*([A-Za-z_0-9]+)\s*\{\s*\}" />
<substitution expression=".addBooleanField("\1")" />
</replaceregexp>
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.ksp2java" />
</fileset>
<regexp pattern="imageField\s*([A-Za-z_0-9]+)\s*\{\s*\}" />
<substitution expression=".addImageField("\1")" />
</replaceregexp>
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.ksp2java" />
</fileset>
<regexp pattern="dataField\s*([A-Za-z_0-9]+)\s*\{\s*type\s*:\s*([A-Za-z_0-9]+)\s*\}" />
<substitution expression=".addNodeField("\1", \2)" />
</replaceregexp>
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.ksp2java" />
</fileset>
<regexp pattern="listField\s*([A-Za-z_0-9]+)\s*\{\s*type\s*:\s*([A-Za-z_0-9]+)\s*\}" />
<substitution expression=".addListField("\1", \2)" />
</replaceregexp>
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.ksp2java" />
</fileset>
<regexp pattern="create\s*PublisherDefinition\s*([A-Za-z_0-9]+)\s*\{\s*root\s*:\s*([A-Za-z_0-9]+)(\s)*\}" />
<substitution expression="private final PublisherDataDefinition \1 = new PublisherDataDefinition("\1", \2);" />
</replaceregexp>
</target>
<!-- ====================================================================== -->
<!-- Generation des classes de tests -->
<!-- ====================================================================== -->
<target name="0.9.3 to 0.9.4" description="Usefull renames from 0.9.3 to 0.9.4">
<echo message="Renamed in *.java : io.vertigo.lang.Describable to io.vertigo.core.component.Describable" />
<replace dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.lang.Describable" value="io.vertigo.core.component.Describable" summary="true">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : io.vertigo.core.spaces.component. to io.vertigo.core.component." />
<replace dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.core.spaces.component." value="io.vertigo.core.component." summary="true">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : new WrappedException(.*, e); to WrappedException.wrap(e, msg)" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.java" />
</fileset>
<regexp pattern="new WrappedException\((".+"), e\);" />
<substitution expression="WrappedException.wrap(e, \1);" />
</replaceregexp>
<echo message="Renamed in *.java : new WrappedException(e); to WrappedException.wrap(e);" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="true">
<fileset dir="${src.path}">
<include name="**/*.java" />
</fileset>
<regexp pattern="throw new WrappedException\((.+)\);" />
<substitution expression="throw WrappedException.wrap\(\1\);" />
</replaceregexp>
<echo message="Renamed in *.java : WrappedException.wrapIfNeeded(e); to WrappedException.wrap(e);" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="true">
<fileset dir="${src.path}">
<include name="**/*.java" />
</fileset>
<regexp pattern="throw WrappedException.wrapIfNeeded\((.+)\);" />
<substitution expression="throw WrappedException.wrap\(\1\);" />
</replaceregexp>
<echo message="Renamed in *.java : Injector to DIInjector" />
<replace dir="${src.path}" encoding="${src.encoding}" token=".Injector;" value=".DIInjector;" summary="true">
<include name="**/*.java" />
</replace>
<replace dir="${src.path}" encoding="${src.encoding}" token=" Injector." value=" DIInjector." summary="true">
<include name="**/*.java" />
</replace>
<replace dir="${src.path}" encoding="${src.encoding}" token="\tInjector." value="\tDIInjector." summary="true">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : io.vertigo.core.spaces.definiton. to io.vertigo.core.definition." />
<replace dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.core.spaces.definiton." value="io.vertigo.core.definition." summary="true">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : .getStringValue("([a-zA-Z0-9\.]+)"); to .getParam(\1).getValueAsString" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.java" />
</fileset>
<regexp pattern="\.getStringValue\("([a-zA-Z0-9\.]+)"\)" />
<substitution expression=".getParam("\1").getValueAsString()" />
</replaceregexp>
<echo message="Renamed in *.java : .getBooleanValue("([a-zA-Z0-9\.]+)"); to .getParam(\1).getValueAsBoolean" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.java" />
</fileset>
<regexp pattern="\.getBooleanValue\("([a-zA-Z0-9\.]+)"\)" />
<substitution expression=".getParam("\1").getValueAsBoolean()" />
</replaceregexp>
<echo message="Renamed in *.java : .getIntValue("([a-zA-Z0-9\.]+)"); to .getParam(\1).getValueAsInt" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.java" />
</fileset>
<regexp pattern="\.getIntValue\("([a-zA-Z0-9\.]+)"\)" />
<substitution expression=".getParam("\1").getValueAsInt()" />
</replaceregexp>
<echo message="Renamed in *.java : .getLongValue("([a-zA-Z0-9\.]+)"); to .getParam(\1).getValueAsLong" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.java" />
</fileset>
<regexp pattern="\.getLongValue\("([a-zA-Z0-9\.]+)"\)" />
<substitution expression=".getParam("\1").getValueAsLong()" />
</replaceregexp>
<echo message="Renamed in *.xml : io.vertigo.x.([a-zA-Z]+).account to io.vertigo.x.account.\1" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.xml" />
</fileset>
<regexp pattern="io\.vertigo\.x\.([a-zA-Z]+)\.account" />
<substitution expression="io.vertigo.x.account.\1" />
</replaceregexp>
<echo message="Renamed in *.xml : io.vertigo.x.([a-zA-Z]+).audit to io.vertigo.x.audit.\1" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.xml" />
</fileset>
<regexp pattern="io\.vertigo\.x\.([a-zA-Z]+)\.audit" />
<substitution expression="io.vertigo.x.audit.\1" />
</replaceregexp>
<echo message="Renamed in *.xml : io.vertigo.x.([a-zA-Z]+).comment to io.vertigo.x.comment.\1" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.xml" />
</fileset>
<regexp pattern="io\.vertigo\.x\.([a-zA-Z]+)\.comment" />
<substitution expression="io.vertigo.x.comment.\1" />
</replaceregexp>
<echo message="Renamed in *.xml : io.vertigo.x.([a-zA-Z]+).notification to io.vertigo.x.notification.\1" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.xml" />
</fileset>
<regexp pattern="io\.vertigo\.x\.([a-zA-Z]+)\.notification" />
<substitution expression="io.vertigo.x.notification.\1" />
</replaceregexp>
<echo message="Renamed in *.xml : io.vertigo.x.([a-zA-Z]+).rules to io.vertigo.x.rules.\1" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.xml" />
</fileset>
<regexp pattern="io\.vertigo\.x\.([a-zA-Z]+)\.rules" />
<substitution expression="io.vertigo.x.rules.\1" />
</replaceregexp>
<echo message="Renamed in *.xml : api="([a-zA-Z]+)Manager" class="io.vertigo.x.([a-zA-Z\.]+)Manager to api="\1Services" class="io.vertigo.x.\2Services" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.xml" />
</fileset>
<regexp pattern="api="([a-zA-Z]+)Manager" class="io\.vertigo\.x\.([a-zA-Z\.]+)Manager" />
<substitution expression="api="\1Services" class="io.vertigo.x.\2Services" />
</replaceregexp>
<echo message="Renamed in *.xml : api="WorkflowServices" class="io.vertigo.x.impl.workflow.WorkflowServices to api="WorkflowManager" class="io.vertigo.x.impl.workflow.WorkflowManager" />
<replace dir="${src.path}" encoding="${src.encoding}" token="api="WorkflowServices" class="io.vertigo.x.impl.workflow.WorkflowServices" value="api="WorkflowManager" class="io.vertigo.x.impl.workflow.WorkflowManager" summary="true">
<include name="**/*.xml" />
</replace>
<echo message="Renamed in *.xml : io.vertigo.x.account.impl.services.AccountServicesImpl to io.vertigo.x.account.impl.services.AccountServicesImpl" />
<replace dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.x.account.impl.services.AccountServicesImpl" value="io.vertigo.x.account.impl.services.AccountServicesImpl" summary="true">
<include name="**/*.xml" />
</replace>
</target>
<target name="0.9.2 to 0.9.3" description="Usefull renames from 0.9.2 to 0.9.3">
<echo message="Renamed in *.java : io.vertigo.lang.Option to java.util.Optional" />
<replace dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.lang.Option" value="java.util.Optional" summary="true">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : Option< to Optional<" />
<replace dir="${src.path}" encoding="${src.encoding}" token="Option<" value="Optional<" summary="true">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : Option. to Optional." />
<replace dir="${src.path}" encoding="${src.encoding}" token="Option." value="Optional." summary="true">
<include name="**/*.java" />
</replace>
<echo message="Replace in *.ksp persistent: "false",\n(\t)+key to field" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.ksp" />
</fileset>
<regexp pattern="persistent\s*:\s*"false"(,)?\s*\n(\s+)key " />
<substitution expression="field " />
</replaceregexp>
<echo message="Replace in *.ksp persistent: "false",\n(\t)+field to field" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.ksp" />
</fileset>
<regexp pattern="persistent\s*:\s*"false"(,)?\s*\n(\s+)field " />
<substitution expression="field " />
</replaceregexp>
<echo message="Replace in *.java <D extends DtObject> URI<D> to <E extends Entity> URI<E>" />
<replace dir="${src.path}" encoding="${src.encoding}" token="<D extends DtObject> URI<D>" value="<E extends Entity> URI<E>" summary="true">
<include name="**/*.java" />
</replace>
<echo message="Replace in *SearchLoader.java super(taskManager); to super(taskManager, transactionManager);" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*SearchLoader.java" />
</fileset>
<regexp pattern="\)\s+\{\s*\n(\s+)super\(taskManager\);" />
<substitution expression=", final VTransactionManager transactionManager) {${line.separator}\1super(taskManager, transactionManager);" />
</replaceregexp>
<echo message="Replace in *SearchLoader.java import io.vertigo.dynamo.task.TaskManager; to import io.vertigo.dynamo.task.TaskManager;\nimport io.vertigo.dynamo.transaction.VTransactionManager;" />
<replace dir="${src.path}" encoding="${src.encoding}" token="import io.vertigo.dynamo.task.TaskManager;" value="import io.vertigo.dynamo.task.TaskManager;${line.separator}import io.vertigo.dynamo.transaction.VTransactionManager;" summary="true">
<include name="**/*SearchLoader.java" />
</replace>
<echo message="Replace in *SearchLoader.java loadData(final List<URI<?>> to loadData(final SearchChunk<?> searchChunk) { final List<URI<?>> uris = searchChunk.getAllURIs();" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*SearchLoader.java" />
</fileset>
<regexp pattern="loadData\(\n?\s*final\s+List<URI<([A-Za-z0-9]+)>>\s+([A-Za-z0-9]+)\)\s+\{\s+\n(\s+)" />
<substitution expression="loadData(final SearchChunk<\1> searchChunk) \{${line.separator}\3final List<URI<\1>> \2 = searchChunk.getAllURIs();${line.separator}\3" />
</replaceregexp>
<echo message="Replace in *SearchLoader.java import io.vertigo.dynamo.search.metamodel.SearchIndexDefinition; to import io.vertigo.dynamo.search.metamodel.SearchChunk;\\nimport io.vertigo.dynamo.search.metamodel.SearchIndexDefinition;" />
<replace dir="${src.path}" encoding="${src.encoding}" token="import io.vertigo.dynamo.search.metamodel.SearchIndexDefinition;" value="import io.vertigo.dynamo.search.metamodel.SearchChunk;${line.separator}import io.vertigo.dynamo.search.metamodel.SearchIndexDefinition;" summary="true">
<include name="**/*SearchLoader.java" />
</replace>
<echo message="Replace in *.xml io.vertigo.quarto.impl.export. to io.vertigo.quarto.impl.export." />
<replace dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.quarto.impl.export." value="io.vertigo.quarto.impl.export." summary="true">
<include name="**/*.xml" />
</replace>
<echo message="Replace in *.xml io.vertigo.quarto.plugins.export. to io.vertigo.quarto.plugins.export." />
<replace dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.quarto.plugins.export." value="io.vertigo.quarto.plugins.export." summary="true">
<include name="**/*.xml" />
</replace>
</target>
<target name="0.9.1 to 0.9.2" description="Usefull renames from 0.9.1 to 0.9.2">
<echo message="Renamed in *.java : Option.some( to Option.of(" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="Option.some(" value="Option.of(">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : Option.option( to Option.ofNullable(" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="Option.option(" value="Option.ofNullable(">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : .isDefined() to .isPresent()" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token=".isDefined()" value=".isPresent()">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : .getOrElse( to .orElse(" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token=".getOrElse(" value=".orElse(">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : .none() to .empty()" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token=".none()" value=".empty()">
<include name="**/*.java" />
</replace>
<!-- Can't do that too many false positive
<echo message="Replace in *.java opt.isEmpty() to !opt.isPresent()" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/*.java"/>
</fileset>
<regexp pattern="([a-z][a-zA-Z]+)\.isEmpty\(\)" />
<substitution expression="!\1.isPresent()" />
</replaceregexp> -->
</target>
<target name="0.9.0 to 0.9.1" description="Usefull renames from 0.9.0 to 0.9.1">
<echo message="Renamed in *.java : getFileStore().get( to getFileStore().read(" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="getFileStore().get(" value="getFileStore().read(">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.xml : .event.EventManagerImpl to .eventbus.EventBusManagerImpl" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token=".event.EventManagerImpl" value=".eventbus.EventManagerImpl">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<echo message="Renamed in *.xml : EventManager to EventBusManager" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="EventManager" value="EventBusManager">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
</target>
<target name="0.8.3 to 0.9.0" description="Usefull renames from 0.8.3 to 0.9.0">
<!-- <echo message="Renamed in LocalManager in boot : LocalManager to <boot local=\'<boot>\'" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}"
token="io.vertigo.dynamox.search.DefaultListFilterBuilder" value="io.vertigo.dynamox.search.DslListFilterBuilder">
<include name="**/*.xml"/>
<exclude name="update-renaming-tool.xml"/>
</replace>
-->
<echo message="Renamed in *.xml : io.vertigo.commons.plugins.resource.java.ClassPathResourceResolverPlugin to io.vertigo.core.plugins.resource.classpath.ClassPathResourceResolverPlugin" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.commons.plugins.resource.java.ClassPathResourceResolverPlugin" value="io.vertigo.core.plugins.resource.classpath.ClassPathResourceResolverPlugin">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<echo message="Renamed in *.xml : io.vertigo.core.plugins.config.xml.XmlConfigPlugin to io.vertigo.core.plugins.param.xml.XmlParamPlugin" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.core.plugins.config.xml.XmlConfigPlugin" value="io.vertigo.core.plugins.param.xml.XmlParamPlugin">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<echo message="Renamed in *.xml : <property to <param" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="<property " value="<param ">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<!-- Can't replace because of too many false positives
<echo message="Renamed in *.xml : </property to </param" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="</property" value="</param">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
-->
<echo message="Renamed in *.xml : <config to <path" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="<config " value="<path ">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<!-- Can't replace because of too many false positives
<echo message="Renamed in *.xml : </config to </path" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="</config" value="</path">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace -->
<echo message="Renamed in *.xml : <application-config to <config" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="<application-config" value="<config">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<echo message="Renamed in *.xml : </application-config to </config" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="</application-config" value="</config">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<echo message="Renamed in *.java : io.vertigo.core.Home to io.vertigo.app.Home" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.core.Home" value="io.vertigo.app.Home">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : io.vertigo.core.App and AppListener to io.vertigo.app.App" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.core.App" value="io.vertigo.app.App">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : io.vertigo.core.Boot to io.vertigo.app.Boot" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.core.Boot" value="io.vertigo.app.Boot">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : io.vertigo.core.config. to io.vertigo.app.config." />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.core.config." value="io.vertigo.app.config.">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : Home.getComponentSpace() to Home.getApp().getComponentSpace()" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="Home.getComponentSpace()" value="Home.getApp().getComponentSpace()">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : Home.getDefinitionSpace() to Home.getApp().getDefinitionSpace()" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="Home.getDefinitionSpace()" value="Home.getApp().getDefinitionSpace()">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : ConfigManager to ParamManager" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="ConfigManager" value="ParamManager">
<include name="**/*.java" />
</replace>
</target>
<target name="0.8.2 to 0.8.3" description="Usefull renames from 0.8.2 to 0.8.3">
<echo message="Renamed in *.ksp : io.vertigo.dynamox.search.DslListFilterBuilderDefaultListFilterBuilder to io.vertigo.dynamox.search.DslListFilterBuilderDslListFilterBuilder" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.dynamox.search.DefaultListFilterBuilder" value="io.vertigo.dynamox.search.DslListFilterBuilder">
<include name="**/*.ksp" />
</replace>
<echo message="Renamed in pom.xml : <vertigo.version>0.8.2</vertigo.version> to <vertigo.version>0.8.3</vertigo.version>" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="<vertigo.version>0.8.2</vertigo.version>" value="<vertigo.version>0.8.3</vertigo.version>">
<include name="**/pom.xml" />
</replace>
</target>
<target name="0.8.1 to 0.8.2" description="Usefull renames from 0.8.1 to 0.8.2">
<echo message="Renamed in *.xml : io.vertigo.vega.rest.* to io.vertigo.vega.webservice.*" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.vega.rest." value="io.vertigo.vega.webservice.">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<echo message="Renamed in pom.xml : <vertigo.version>0.8.1</vertigo.version> to <vertigo.version>0.8.2</vertigo.version>" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="<vertigo.version>0.8.1</vertigo.version>" value="<vertigo.version>0.8.2</vertigo.version>">
<include name="**/pom.xml" />
</replace>
<echo message="Renamed in *.java : import io.vertigo.vega.rest.* to io.vertigo.vega.webservice.*" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="import io.vertigo.vega.rest." value="import io.vertigo.vega.webservice.">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : "vertigo.rest.Session" to "vertigo.webservice.Session"" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token=""vertigo.rest.Session"" value=""vertigo.webservice.Session"">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.xml : io.vertigo.vega.impl.rest.RestManagerImpl to io.vertigo.vega.impl.webservice.WebServiceManagerImpl" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.vega.impl.rest.RestManagerImpl" value="io.vertigo.vega.impl.webservice.WebServiceManagerImpl">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<echo message="Renamed in *.xml : RestManager to WebServiceManager" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="RestManager" value="WebServiceManager">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<echo message="Renamed in *.java : extends DefaultSearchLoader to extends AbstractSqlSearchLoader" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="extends DefaultSearchLoader" value="extends AbstractSqlSearchLoader">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : extends .getFileInfo( to extends .get(" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token=".getFileInfo(" value=".get(">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : .deleteFileInfo( to extends .delete(" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token=".deleteFileInfo(" value=".delete(">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : getBrokerConfig() to extends getDataStoreConfig()" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="getBrokerConfig()" value="getDataStoreConfig()">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : extends DefaultSearchLoader to extends AbstractSqlSearchLoader" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.dynamox.search.DefaultSearchLoader" value="io.vertigo.dynamox.search.AbstractSqlSearchLoader">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.xml : io.vertigo.vega.plugins.rest.instrospector.annotations.AnnotationsEndPointIntrospectorPlugin to io.vertigo.vega.plugins.webservice.instrospector.annotations.AnnotationsWebServiceIntrospectorPlugin" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.vega.plugins.rest.instrospector.annotations.AnnotationsEndPointIntrospectorPlugin" value="io.vertigo.vega.plugins.webservice.instrospector.annotations.AnnotationsWebServiceIntrospectorPlugin">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<echo message="Renamed in *.xml : io.vertigo.vega.plugins.webservice.webserver.sparkjava.SparkJavaServletFilterWebServerPlugin to io.vertigo.vega.plugins.webservice.webserver.sparkjava.SparkJavaServletFilterWebServerPlugin" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.vega.plugins.rest.routesregister.sparkjava.SparkJavaRoutesRegisterPlugin" value="io.vertigo.vega.plugins.webservice.webserver.sparkjava.SparkJavaServletFilterWebServerPlugin">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<echo message="Renamed in *.xml : io.vertigo.vega.rest.engine.GoogleJsonEngine to io.vertigo.vega.engines.webservice.json.GoogleJsonEngine" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.vega.rest.engine.GoogleJsonEngine" value="io.vertigo.vega.engines.webservice.json.GoogleJsonEngine">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<echo message="Renamed in *.xml : SwaggerWebServices to SwaggerWebServices" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="SwaggerRestServices" value="SwaggerWebServices">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<echo message="Renamed in *.xml : XxxxWebRestHandlerPlugin to XxxxWebServiceHandlerPlugin" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="RestHandlerPlugin" value="WebServiceHandlerPlugin">
<include name="**/*.xml" />
<exclude name="update-renaming-tool.xml" />
</replace>
<echo message="Renamed in *.java : import io.vertigo.vega.webservice.RestfulService to import io.vertigo.vega.webservice.WebServices" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="import io.vertigo.vega.webservice.RestfulService" value="import io.vertigo.vega.webservice.WebServices">
<include name="**/*.java" />
</replace>
<echo message="Renamed in *.java : implements RestfulService to implements WebServices" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="implements RestfulService" value="implements WebServices">
<include name="**/*.java" />
</replace>
<echo message="Renamed in web.xml io.vertigo.vega.impl.rest.servlet.ApplicationServletContextListener to io.vertigo.vega.impl.webservice.servlet.AppServletContextListener" />
<replace summary="true" dir="${src.path}" encoding="${src.encoding}" token="io.vertigo.vega.impl.rest.servlet.ApplicationServletContextListener" value="io.vertigo.vega.impl.webservice.servlet.AppServletContextListener">
<include name="**/web.xml" />
</replace>
<echo message="Replaced in web.xml spark.servlet.SparkFilter and application by a new VegaSparkFilter" />
<replaceregexp encoding="${src.encoding}" flags="gis" byline="false">
<fileset dir="${src.path}">
<include name="**/web.xml" />
</fileset>
<regexp pattern="<filter-name>SparkFilter</filter-name>
([ \t\n]+?)<filter-class>spark.servlet.SparkFilter</filter-class>
([ \t\n]+?)<init-param>
([ \t\n]+?)<param-name>applicationClass</param-name>
([ \t\n]+?)<param-value>io.vertigo.vega.plugins.webservice.routesregister.sparkjava.VegaSparkApplication</param-value>
([ \t\n]+?)</init-param>>" />
<substitution expression="<filter>
([ \t\n]+?)<filter-name>SparkFilter</filter-name>
([ \t\n]+?)<filter-class>io.vertigo.vega.plugins.webservice.webserver.sparkjava.VegaSparkFilter</filter-class>
([ \t\n]+?)</filter>>" />
</replaceregexp>
</target>
</project>