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 package org.jomc.cli.commands;
37
38 import java.io.File;
39 import java.util.logging.Level;
40 import javax.xml.bind.JAXBElement;
41 import javax.xml.bind.JAXBException;
42 import javax.xml.bind.Unmarshaller;
43 import org.apache.commons.cli.CommandLine;
44 import org.jomc.model.Module;
45 import org.jomc.model.Modules;
46 import org.jomc.model.modlet.DefaultModelProcessor;
47 import org.jomc.model.modlet.DefaultModelProvider;
48 import org.jomc.model.modlet.DefaultModelValidator;
49 import org.jomc.model.modlet.ModelHelper;
50 import org.jomc.modlet.Model;
51 import org.jomc.modlet.ModelContext;
52 import org.jomc.modlet.ModelException;
53 import org.jomc.tools.modlet.ToolsModelProcessor;
54 import org.jomc.tools.modlet.ToolsModelProvider;
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
79
80
81 public abstract class AbstractModelCommand extends AbstractModletCommand
82 {
83
84
85
86
87
88
89
90 @Override
91 protected ModelContext createModelContext( final CommandLine commandLine, final ClassLoader classLoader )
92 throws CommandExecutionException
93 {
94 if ( commandLine == null )
95 {
96 throw new NullPointerException( "commandLine" );
97 }
98
99 final ModelContext modelContext = super.createModelContext( commandLine, classLoader );
100
101 if ( commandLine.hasOption( this.getTransformerLocationOption().getOpt() ) )
102 {
103 modelContext.setAttribute( DefaultModelProcessor.TRANSFORMER_LOCATION_ATTRIBUTE_NAME,
104 commandLine.getOptionValue( this.getTransformerLocationOption().getOpt() ) );
105
106 }
107
108 if ( commandLine.hasOption( this.getModuleLocationOption().getOpt() ) )
109 {
110 modelContext.setAttribute( DefaultModelProvider.MODULE_LOCATION_ATTRIBUTE_NAME,
111 commandLine.getOptionValue( this.getModuleLocationOption().getOpt() ) );
112
113 }
114
115 modelContext.setAttribute( ToolsModelProvider.MODEL_OBJECT_CLASSPATH_RESOLUTION_ENABLED_ATTRIBUTE_NAME,
116 !commandLine.hasOption( this.getNoClasspathResolutionOption().getOpt() ) );
117
118 modelContext.setAttribute( ToolsModelProcessor.MODEL_OBJECT_CLASSPATH_RESOLUTION_ENABLED_ATTRIBUTE_NAME,
119 !commandLine.hasOption( this.getNoClasspathResolutionOption().getOpt() ) );
120
121 modelContext.setAttribute( DefaultModelProvider.VALIDATING_ATTRIBUTE_NAME,
122 !commandLine.hasOption( this.getNoModelResourceValidation().getOpt() ) );
123
124 modelContext.setAttribute( DefaultModelValidator.VALIDATE_JAVA_ATTRIBUTE_NAME,
125 !commandLine.hasOption( this.getNoJavaValidationOption().getOpt() ) );
126
127 return modelContext;
128 }
129
130
131
132
133
134
135
136
137
138
139
140 protected Model getModel( final ModelContext context, final CommandLine commandLine )
141 throws CommandExecutionException
142 {
143 try
144 {
145 Model model = new Model();
146 model.setIdentifier( this.getModel( commandLine ) );
147 Modules modules = new Modules();
148 ModelHelper.setModules( model, modules );
149
150 if ( commandLine.hasOption( this.getDocumentsOption().getOpt() ) )
151 {
152 final Unmarshaller u = context.createUnmarshaller( model.getIdentifier() );
153
154 if ( !commandLine.hasOption( this.getNoModelResourceValidation().getOpt() ) )
155 {
156 u.setSchema( context.createSchema( model.getIdentifier() ) );
157 }
158
159 for ( final File f : this.getDocumentFiles( commandLine ) )
160 {
161 if ( this.isLoggable( Level.FINEST ) )
162 {
163 this.log( Level.FINEST, this.getReadingMessage( this.getLocale(), f.getAbsolutePath() ), null );
164 }
165
166 Object o = u.unmarshal( f );
167 if ( o instanceof JAXBElement<?> )
168 {
169 o = ( (JAXBElement<?>) o ).getValue();
170 }
171
172 if ( o instanceof Module )
173 {
174 modules.getModule().add( (Module) o );
175 }
176 else if ( o instanceof Modules )
177 {
178 modules.getModule().addAll( ( (Modules) o ).getModule() );
179 }
180 else if ( this.isLoggable( Level.WARNING ) )
181 {
182 this.log( Level.WARNING, this.getCannotProcessMessage(
183 this.getLocale(), f.getAbsolutePath(), o.toString() ), null );
184
185 }
186 }
187 }
188
189 if ( commandLine.hasOption( this.getClasspathOption().getOpt() ) )
190 {
191 model = context.findModel( model );
192 modules = ModelHelper.getModules( model );
193 }
194
195 if ( modules != null && !commandLine.hasOption( this.getNoClasspathResolutionOption().getOpt() ) )
196 {
197 final Module classpathModule = modules.getClasspathModule(
198 Modules.getDefaultClasspathModuleName(), context.getClassLoader() );
199
200 if ( classpathModule != null && modules.getModule( classpathModule.getName() ) == null )
201 {
202 modules.getModule().add( classpathModule );
203 }
204 }
205
206 if ( !commandLine.hasOption( this.getNoModelProcessingOption().getOpt() ) )
207 {
208 model = context.processModel( model );
209 modules = ModelHelper.getModules( model );
210 }
211
212 assert modules != null : "Modules '" + this.getModel( commandLine ) + "' not found.";
213 return model;
214 }
215 catch ( final ModelException e )
216 {
217 throw new CommandExecutionException( getExceptionMessage( e ), e );
218 }
219 catch ( final JAXBException e )
220 {
221 String message = getExceptionMessage( e );
222 if ( message == null )
223 {
224 message = getExceptionMessage( e.getLinkedException() );
225 }
226
227 throw new CommandExecutionException( message, e );
228 }
229 }
230
231
232
233
234
235 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
236 public AbstractModelCommand()
237 {
238
239 super();
240
241 }
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
259 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
260 private org.apache.commons.cli.Option getClasspathOption()
261 {
262 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Classpath Option" );
263 assert _d != null : "'Classpath Option' dependency not found.";
264 return _d;
265 }
266
267
268
269
270
271
272
273
274
275
276
277
278 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
279 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
280 private org.apache.commons.cli.Option getDocumentsOption()
281 {
282 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Documents Option" );
283 assert _d != null : "'Documents Option' dependency not found.";
284 return _d;
285 }
286
287
288
289
290
291
292
293
294
295
296
297
298 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
299 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
300 private java.util.Locale getLocale()
301 {
302 final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" );
303 assert _d != null : "'Locale' dependency not found.";
304 return _d;
305 }
306
307
308
309
310
311
312
313
314
315
316
317
318 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
319 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
320 private org.apache.commons.cli.Option getModelContextFactoryOption()
321 {
322 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Model Context Factory Option" );
323 assert _d != null : "'Model Context Factory Option' dependency not found.";
324 return _d;
325 }
326
327
328
329
330
331
332
333
334
335
336
337
338 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
339 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
340 private org.apache.commons.cli.Option getModelOption()
341 {
342 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Model Option" );
343 assert _d != null : "'Model Option' dependency not found.";
344 return _d;
345 }
346
347
348
349
350
351
352
353
354
355
356
357
358 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
359 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
360 private org.apache.commons.cli.Option getModletLocationOption()
361 {
362 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Modlet Location Option" );
363 assert _d != null : "'Modlet Location Option' dependency not found.";
364 return _d;
365 }
366
367
368
369
370
371
372
373
374
375
376
377
378 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
379 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
380 private org.apache.commons.cli.Option getModletSchemaSystemIdOption()
381 {
382 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Modlet Schema System Id Option" );
383 assert _d != null : "'Modlet Schema System Id Option' dependency not found.";
384 return _d;
385 }
386
387
388
389
390
391
392
393
394
395
396
397
398 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
399 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
400 private org.apache.commons.cli.Option getModuleLocationOption()
401 {
402 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Module Location Option" );
403 assert _d != null : "'Module Location Option' dependency not found.";
404 return _d;
405 }
406
407
408
409
410
411
412
413
414
415
416
417
418 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
419 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
420 private org.apache.commons.cli.Option getNoClasspathResolutionOption()
421 {
422 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Classpath Resolution Option" );
423 assert _d != null : "'No Classpath Resolution Option' dependency not found.";
424 return _d;
425 }
426
427
428
429
430
431
432
433
434
435
436
437
438 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
439 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
440 private org.apache.commons.cli.Option getNoJavaValidationOption()
441 {
442 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Java Validation Option" );
443 assert _d != null : "'No Java Validation Option' dependency not found.";
444 return _d;
445 }
446
447
448
449
450
451
452
453
454
455
456
457
458 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
459 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
460 private org.apache.commons.cli.Option getNoModelProcessingOption()
461 {
462 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Model Processing Option" );
463 assert _d != null : "'No Model Processing Option' dependency not found.";
464 return _d;
465 }
466
467
468
469
470
471
472
473
474
475
476
477
478 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
479 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
480 private org.apache.commons.cli.Option getNoModelResourceValidation()
481 {
482 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Model Resource Validation" );
483 assert _d != null : "'No Model Resource Validation' dependency not found.";
484 return _d;
485 }
486
487
488
489
490
491
492
493
494
495
496
497
498 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
499 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
500 private org.apache.commons.cli.Option getNoModletResourceValidation()
501 {
502 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Modlet Resource Validation" );
503 assert _d != null : "'No Modlet Resource Validation' dependency not found.";
504 return _d;
505 }
506
507
508
509
510
511
512
513
514
515
516
517
518 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
519 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
520 private org.apache.commons.cli.Option getPlatformProviderLocationOption()
521 {
522 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Platform Provider Location Option" );
523 assert _d != null : "'Platform Provider Location Option' dependency not found.";
524 return _d;
525 }
526
527
528
529
530
531
532
533
534
535
536
537
538 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
539 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
540 private org.apache.commons.cli.Option getProviderLocationOption()
541 {
542 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Provider Location Option" );
543 assert _d != null : "'Provider Location Option' dependency not found.";
544 return _d;
545 }
546
547
548
549
550
551
552
553
554
555
556
557
558 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
559 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
560 private org.apache.commons.cli.Option getTransformerLocationOption()
561 {
562 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Transformer Location Option" );
563 assert _d != null : "'Transformer Location Option' dependency not found.";
564 return _d;
565 }
566
567
568
569
570
571
572
573
574
575
576
577
578 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
579 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
580 private java.lang.String getAbbreviatedCommandName()
581 {
582 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Abbreviated Command Name" );
583 assert _p != null : "'Abbreviated Command Name' property not found.";
584 return _p;
585 }
586
587
588
589
590
591
592
593
594 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
595 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
596 private java.lang.String getApplicationModlet()
597 {
598 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Application Modlet" );
599 assert _p != null : "'Application Modlet' property not found.";
600 return _p;
601 }
602
603
604
605
606
607
608
609
610 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
611 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
612 private java.lang.String getCommandName()
613 {
614 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Command Name" );
615 assert _p != null : "'Command Name' property not found.";
616 return _p;
617 }
618
619
620
621
622
623
624
625
626 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
627 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
628 private java.lang.String getModletExcludes()
629 {
630 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Modlet Excludes" );
631 assert _p != null : "'Modlet Excludes' property not found.";
632 return _p;
633 }
634
635
636
637
638
639
640
641
642 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
643 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
644 private java.lang.String getProviderExcludes()
645 {
646 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Provider Excludes" );
647 assert _p != null : "'Provider Excludes' property not found.";
648 return _p;
649 }
650
651
652
653
654
655
656
657
658 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
659 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
660 private java.lang.String getSchemaExcludes()
661 {
662 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Schema Excludes" );
663 assert _p != null : "'Schema Excludes' property not found.";
664 return _p;
665 }
666
667
668
669
670
671
672
673
674 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
675 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
676 private java.lang.String getServiceExcludes()
677 {
678 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Service Excludes" );
679 assert _p != null : "'Service Excludes' property not found.";
680 return _p;
681 }
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
698 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
699 private String getApplicationTitle( final java.util.Locale locale )
700 {
701 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Application Title", locale );
702 assert _m != null : "'Application Title' message not found.";
703 return _m;
704 }
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
720 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
721 private String getCannotProcessMessage( final java.util.Locale locale, final java.lang.String itemInfo, final java.lang.String detailMessage )
722 {
723 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Cannot Process Message", locale, itemInfo, detailMessage );
724 assert _m != null : "'Cannot Process Message' message not found.";
725 return _m;
726 }
727
728
729
730
731
732
733
734
735
736
737
738
739
740 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
741 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
742 private String getClasspathElementInfo( final java.util.Locale locale, final java.lang.String classpathElement )
743 {
744 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Classpath Element Info", locale, classpathElement );
745 assert _m != null : "'Classpath Element Info' message not found.";
746 return _m;
747 }
748
749
750
751
752
753
754
755
756
757
758
759
760
761 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
762 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
763 private String getClasspathElementNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName )
764 {
765 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Classpath Element Not Found Warning", locale, fileName );
766 assert _m != null : "'Classpath Element Not Found Warning' message not found.";
767 return _m;
768 }
769
770
771
772
773
774
775
776
777
778
779
780
781
782 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
783 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
784 private String getCommandFailureMessage( final java.util.Locale locale, final java.lang.String toolName )
785 {
786 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Failure Message", locale, toolName );
787 assert _m != null : "'Command Failure Message' message not found.";
788 return _m;
789 }
790
791
792
793
794
795
796
797
798
799
800
801
802
803 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
804 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
805 private String getCommandInfoMessage( final java.util.Locale locale, final java.lang.String toolName )
806 {
807 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Info Message", locale, toolName );
808 assert _m != null : "'Command Info Message' message not found.";
809 return _m;
810 }
811
812
813
814
815
816
817
818
819
820
821
822
823
824 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
825 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
826 private String getCommandSuccessMessage( final java.util.Locale locale, final java.lang.String toolName )
827 {
828 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Success Message", locale, toolName );
829 assert _m != null : "'Command Success Message' message not found.";
830 return _m;
831 }
832
833
834
835
836
837
838
839
840
841
842
843
844
845 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
846 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
847 private String getDefaultLogLevelInfo( final java.util.Locale locale, final java.lang.String defaultLogLevel )
848 {
849 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Default Log Level Info", locale, defaultLogLevel );
850 assert _m != null : "'Default Log Level Info' message not found.";
851 return _m;
852 }
853
854
855
856
857
858
859
860
861
862
863
864
865
866 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
867 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
868 private String getDocumentFileInfo( final java.util.Locale locale, final java.lang.String documentFile )
869 {
870 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Document File Info", locale, documentFile );
871 assert _m != null : "'Document File Info' message not found.";
872 return _m;
873 }
874
875
876
877
878
879
880
881
882
883
884
885
886
887 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
888 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
889 private String getDocumentFileNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName )
890 {
891 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Document File Not Found Warning", locale, fileName );
892 assert _m != null : "'Document File Not Found Warning' message not found.";
893 return _m;
894 }
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
910 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
911 private String getExcludedModletInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String modletIdentifier )
912 {
913 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Modlet Info", locale, resourceName, modletIdentifier );
914 assert _m != null : "'Excluded Modlet Info' message not found.";
915 return _m;
916 }
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
932 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
933 private String getExcludedProviderInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String providerName )
934 {
935 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Provider Info", locale, resourceName, providerName );
936 assert _m != null : "'Excluded Provider Info' message not found.";
937 return _m;
938 }
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
954 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
955 private String getExcludedSchemaInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String contextId )
956 {
957 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Schema Info", locale, resourceName, contextId );
958 assert _m != null : "'Excluded Schema Info' message not found.";
959 return _m;
960 }
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
976 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
977 private String getExcludedServiceInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String serviceName )
978 {
979 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Service Info", locale, resourceName, serviceName );
980 assert _m != null : "'Excluded Service Info' message not found.";
981 return _m;
982 }
983
984
985
986
987
988
989
990
991
992
993
994
995
996 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
997 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
998 private String getInvalidModelMessage( final java.util.Locale locale, final java.lang.String modelIdentifier )
999 {
1000 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Invalid Model Message", locale, modelIdentifier );
1001 assert _m != null : "'Invalid Model Message' message not found.";
1002 return _m;
1003 }
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1016 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1017 private String getLongDescriptionMessage( final java.util.Locale locale )
1018 {
1019 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Long Description Message", locale );
1020 assert _m != null : "'Long Description Message' message not found.";
1021 return _m;
1022 }
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1037 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1038 private String getReadingMessage( final java.util.Locale locale, final java.lang.String locationInfo )
1039 {
1040 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Reading Message", locale, locationInfo );
1041 assert _m != null : "'Reading Message' message not found.";
1042 return _m;
1043 }
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1056 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1057 private String getSeparator( final java.util.Locale locale )
1058 {
1059 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Separator", locale );
1060 assert _m != null : "'Separator' message not found.";
1061 return _m;
1062 }
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074 @SuppressWarnings({"unchecked", "unused", "PMD.UnnecessaryFullyQualifiedName"})
1075 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1076 private String getShortDescriptionMessage( final java.util.Locale locale )
1077 {
1078 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Short Description Message", locale );
1079 assert _m != null : "'Short Description Message' message not found.";
1080 return _m;
1081 }
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.9", comments = "See http://www.jomc.org/jomc/1.9/jomc-tools-1.9" )
1159 @Override
1160 public org.apache.commons.cli.Options getOptions()
1161 {
1162 final org.apache.commons.cli.Options options = new org.apache.commons.cli.Options();
1163 options.addOption( this.getClasspathOption() );
1164 options.addOption( this.getDocumentsOption() );
1165 options.addOption( this.getModelContextFactoryOption() );
1166 options.addOption( this.getModelOption() );
1167 options.addOption( this.getModletLocationOption() );
1168 options.addOption( this.getModletSchemaSystemIdOption() );
1169 options.addOption( this.getModuleLocationOption() );
1170 options.addOption( this.getNoClasspathResolutionOption() );
1171 options.addOption( this.getNoJavaValidationOption() );
1172 options.addOption( this.getNoModelProcessingOption() );
1173 options.addOption( this.getNoModelResourceValidation() );
1174 options.addOption( this.getNoModletResourceValidation() );
1175 options.addOption( this.getPlatformProviderLocationOption() );
1176 options.addOption( this.getProviderLocationOption() );
1177 options.addOption( this.getTransformerLocationOption() );
1178 return options;
1179 }
1180
1181
1182
1183 }