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.io.IOException;
40 import java.net.URL;
41 import java.util.Arrays;
42 import java.util.Enumeration;
43 import java.util.Iterator;
44 import java.util.List;
45 import java.util.logging.Level;
46 import javax.xml.bind.JAXBElement;
47 import javax.xml.bind.JAXBException;
48 import javax.xml.bind.Marshaller;
49 import javax.xml.bind.Unmarshaller;
50 import javax.xml.bind.util.JAXBResult;
51 import javax.xml.bind.util.JAXBSource;
52 import javax.xml.transform.Transformer;
53 import javax.xml.transform.TransformerException;
54 import javax.xml.transform.stream.StreamSource;
55 import org.apache.commons.cli.CommandLine;
56 import org.jomc.modlet.DefaultModletProvider;
57 import org.jomc.modlet.ModelContext;
58 import org.jomc.modlet.ModelException;
59 import org.jomc.modlet.ModelValidationReport;
60 import org.jomc.modlet.Modlet;
61 import org.jomc.modlet.ModletObject;
62 import org.jomc.modlet.Modlets;
63 import org.jomc.modlet.ObjectFactory;
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
88
89
90 public final class MergeModletsCommand extends AbstractModletCommand
91 {
92
93
94
95
96 protected void executeCommand( final CommandLine commandLine ) throws CommandExecutionException
97 {
98 if ( commandLine == null )
99 {
100 throw new NullPointerException( "commandLine" );
101 }
102
103 CommandLineClassLoader classLoader = null;
104 boolean suppressExceptionOnClose = true;
105
106 try
107 {
108 classLoader = new CommandLineClassLoader( commandLine );
109 final Modlets modlets = new Modlets();
110 final ModelContext context = this.createModelContext( commandLine, classLoader );
111 final Marshaller marshaller = context.createMarshaller( ModletObject.MODEL_PUBLIC_ID );
112 final Unmarshaller unmarshaller = context.createUnmarshaller( ModletObject.MODEL_PUBLIC_ID );
113
114 if ( !commandLine.hasOption( this.getNoModletResourceValidation().getOpt() ) )
115 {
116 unmarshaller.setSchema( context.createSchema( ModletObject.MODEL_PUBLIC_ID ) );
117 }
118
119 File stylesheetFile = null;
120 if ( commandLine.hasOption( this.getStylesheetOption().getOpt() ) )
121 {
122 stylesheetFile = new File( commandLine.getOptionValue( this.getStylesheetOption().getOpt() ) );
123 }
124
125 String modletVersion = null;
126 if ( commandLine.hasOption( this.getModletVersionOption().getOpt() ) )
127 {
128 modletVersion = commandLine.getOptionValue( this.getModletVersionOption().getOpt() );
129 }
130
131 String modletVendor = null;
132 if ( commandLine.hasOption( this.getModletVendorOption().getOpt() ) )
133 {
134 modletVendor = commandLine.getOptionValue( this.getModletVendorOption().getOpt() );
135 }
136
137 if ( commandLine.hasOption( this.getDocumentsOption().getOpt() ) )
138 {
139 for ( File f : this.getDocumentFiles( commandLine ) )
140 {
141 if ( this.isLoggable( Level.FINEST ) )
142 {
143 this.log( Level.FINEST, this.getReadingMessage( this.getLocale(), f.getAbsolutePath() ), null );
144 }
145
146 Object o = unmarshaller.unmarshal( f );
147 if ( o instanceof JAXBElement<?> )
148 {
149 o = ( (JAXBElement<?>) o ).getValue();
150 }
151
152 if ( o instanceof Modlet )
153 {
154 modlets.getModlet().add( (Modlet) o );
155 }
156 else if ( o instanceof Modlets )
157 {
158 modlets.getModlet().addAll( ( (Modlets) o ).getModlet() );
159 }
160 else if ( this.isLoggable( Level.WARNING ) )
161 {
162 this.log( Level.WARNING, this.getCannotProcessMessage(
163 this.getLocale(), f.getAbsolutePath(), o.toString() ), null );
164
165 }
166 }
167 }
168
169 if ( commandLine.hasOption( this.getClasspathOption().getOpt() ) )
170 {
171 String[] resourceNames = null;
172
173 if ( commandLine.hasOption( this.getResourcesOption().getOpt() ) )
174 {
175 resourceNames = commandLine.getOptionValues( this.getResourcesOption().getOpt() );
176 }
177
178 if ( resourceNames == null )
179 {
180 resourceNames = new String[]
181 {
182 DefaultModletProvider.getDefaultModletLocation()
183 };
184 }
185
186 for ( String resource : resourceNames )
187 {
188 for ( final Enumeration<URL> e = classLoader.getResources( resource ); e.hasMoreElements(); )
189 {
190 final URL url = e.nextElement();
191
192 if ( this.isLoggable( Level.FINEST ) )
193 {
194 this.log( Level.FINEST, this.getReadingMessage( this.getLocale(), url.toExternalForm() ),
195 null );
196
197 }
198
199 Object o = unmarshaller.unmarshal( url );
200 if ( o instanceof JAXBElement<?> )
201 {
202 o = ( (JAXBElement<?>) o ).getValue();
203 }
204
205 if ( o instanceof Modlet )
206 {
207 modlets.getModlet().add( (Modlet) o );
208 }
209 else if ( o instanceof Modlets )
210 {
211 modlets.getModlet().addAll( ( (Modlets) o ).getModlet() );
212 }
213 else if ( this.isLoggable( Level.WARNING ) )
214 {
215 this.log( Level.WARNING, this.getCannotProcessMessage(
216 this.getLocale(), url.toExternalForm(), o.toString() ), null );
217
218 }
219 }
220 }
221 }
222
223 for ( final Iterator<Modlet> it = modlets.getModlet().iterator(); it.hasNext(); )
224 {
225 if ( this.getApplicationModlet().equals( it.next().getName() ) )
226 {
227 it.remove();
228 }
229 }
230
231 modlets.getModlet().addAll( classLoader.getExcludedModlets().getModlet() );
232
233 if ( commandLine.hasOption( this.getModletIncludesOption().getOpt() ) )
234 {
235 final String[] values = commandLine.getOptionValues( this.getModletIncludesOption().getOpt() );
236
237 if ( values != null )
238 {
239 final List<String> includes = Arrays.asList( values );
240
241 for ( final Iterator<Modlet> it = modlets.getModlet().iterator(); it.hasNext(); )
242 {
243 final Modlet m = it.next();
244 if ( !includes.contains( m.getName() ) )
245 {
246 this.log( Level.INFO, this.getExcludingModletInfo( this.getLocale(), m.getName() ), null );
247 it.remove();
248 }
249 else
250 {
251 this.log( Level.INFO, this.getIncludingModletInfo( this.getLocale(), m.getName() ), null );
252 }
253 }
254 }
255 }
256
257 if ( commandLine.hasOption( this.getModletExcludesOption().getOpt() ) )
258 {
259 final String[] values = commandLine.getOptionValues( this.getModletExcludesOption().getOpt() );
260
261 if ( values != null )
262 {
263 for ( String exclude : values )
264 {
265 final Modlet m = modlets.getModlet( exclude );
266
267 if ( m != null )
268 {
269 this.log( Level.INFO, this.getExcludingModletInfo( this.getLocale(), m.getName() ), null );
270 modlets.getModlet().remove( m );
271 }
272 }
273 }
274 }
275
276 final ModelValidationReport validationReport =
277 context.validateModel( ModletObject.MODEL_PUBLIC_ID,
278 new JAXBSource( marshaller, new ObjectFactory().createModlets( modlets ) ) );
279
280 this.log( validationReport, marshaller );
281
282 if ( !validationReport.isModelValid() )
283 {
284 throw new CommandExecutionException( this.getInvalidModelMessage(
285 this.getLocale(), ModletObject.MODEL_PUBLIC_ID ) );
286
287 }
288
289 Modlet mergedModlet = modlets.getMergedModlet(
290 commandLine.getOptionValue( this.getModletNameOption().getOpt() ), this.getModel( commandLine ) );
291
292 mergedModlet.setVersion( modletVersion );
293 mergedModlet.setVendor( modletVendor );
294
295 final File modletFile = new File( commandLine.getOptionValue( this.getDocumentOption().getOpt() ) );
296
297 if ( stylesheetFile != null )
298 {
299 final Transformer transformer = this.createTransformer( new StreamSource( stylesheetFile ) );
300 final JAXBSource source =
301 new JAXBSource( marshaller, new ObjectFactory().createModlet( mergedModlet ) );
302
303 final JAXBResult result = new JAXBResult( unmarshaller );
304 unmarshaller.setSchema( null );
305 transformer.transform( source, result );
306
307 if ( result.getResult() instanceof JAXBElement<?>
308 && ( (JAXBElement<?>) result.getResult() ).getValue() instanceof Modlet )
309 {
310 mergedModlet = (Modlet) ( (JAXBElement<?>) result.getResult() ).getValue();
311 }
312 else
313 {
314 throw new CommandExecutionException( this.getIllegalTransformationResultError(
315 this.getLocale(), stylesheetFile.getAbsolutePath() ) );
316
317 }
318 }
319
320 marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE );
321
322 if ( commandLine.hasOption( this.getDocumentEncodingOption().getOpt() ) )
323 {
324 marshaller.setProperty( Marshaller.JAXB_ENCODING,
325 commandLine.getOptionValue( this.getDocumentEncodingOption().getOpt() ) );
326
327 }
328
329 marshaller.setSchema( context.createSchema( ModletObject.MODEL_PUBLIC_ID ) );
330 marshaller.marshal( new ObjectFactory().createModlet( mergedModlet ), modletFile );
331
332 if ( this.isLoggable( Level.INFO ) )
333 {
334 this.log( Level.INFO, this.getWriteInfo( this.getLocale(), modletFile.getAbsolutePath() ), null );
335 }
336
337 suppressExceptionOnClose = false;
338 }
339 catch ( final IOException e )
340 {
341 throw new CommandExecutionException( getExceptionMessage( e ), e );
342 }
343 catch ( final TransformerException e )
344 {
345 String message = getExceptionMessage( e );
346 if ( message == null )
347 {
348 message = getExceptionMessage( e.getException() );
349 }
350
351 throw new CommandExecutionException( message, e );
352 }
353 catch ( final JAXBException e )
354 {
355 String message = getExceptionMessage( e );
356 if ( message == null )
357 {
358 message = getExceptionMessage( e.getLinkedException() );
359 }
360
361 throw new CommandExecutionException( message, e );
362 }
363 catch ( final ModelException e )
364 {
365 throw new CommandExecutionException( getExceptionMessage( e ), e );
366 }
367 finally
368 {
369 try
370 {
371 if ( classLoader != null )
372 {
373 classLoader.close();
374 }
375 }
376 catch ( final IOException e )
377 {
378 if ( suppressExceptionOnClose )
379 {
380 this.log( Level.SEVERE, getExceptionMessage( e ), e );
381 }
382 else
383 {
384 throw new CommandExecutionException( getExceptionMessage( e ), e );
385 }
386 }
387 }
388 }
389
390
391
392
393
394 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
395 public MergeModletsCommand()
396 {
397
398 super();
399
400 }
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
418 private org.apache.commons.cli.Option getClasspathOption()
419 {
420 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ClasspathOption" );
421 assert _d != null : "'ClasspathOption' dependency not found.";
422 return _d;
423 }
424
425
426
427
428
429
430
431
432
433
434
435
436 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
437 private org.apache.commons.cli.Option getDocumentEncodingOption()
438 {
439 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "DocumentEncodingOption" );
440 assert _d != null : "'DocumentEncodingOption' dependency not found.";
441 return _d;
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 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
470 private org.apache.commons.cli.Option getDocumentOption()
471 {
472 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "DocumentOption" );
473 assert _d != null : "'DocumentOption' dependency not found.";
474 return _d;
475 }
476
477
478
479
480
481
482
483
484
485
486
487
488 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
489 private org.apache.commons.cli.Option getDocumentsOption()
490 {
491 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "DocumentsOption" );
492 assert _d != null : "'DocumentsOption' dependency not found.";
493 return _d;
494 }
495
496
497
498
499
500
501
502
503
504
505
506
507 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
508 private java.util.Locale getLocale()
509 {
510 final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" );
511 assert _d != null : "'Locale' dependency not found.";
512 return _d;
513 }
514
515
516
517
518
519
520
521
522
523
524
525
526 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
527 private org.apache.commons.cli.Option getModelContextFactoryOption()
528 {
529 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModelContextFactoryOption" );
530 assert _d != null : "'ModelContextFactoryOption' dependency not found.";
531 return _d;
532 }
533
534
535
536
537
538
539
540
541
542
543
544
545 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
546 private org.apache.commons.cli.Option getModelOption()
547 {
548 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModelOption" );
549 assert _d != null : "'ModelOption' dependency not found.";
550 return _d;
551 }
552
553
554
555
556
557
558
559
560
561
562
563
564 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
565 private org.apache.commons.cli.Option getModletExcludesOption()
566 {
567 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModletExcludesOption" );
568 assert _d != null : "'ModletExcludesOption' dependency not found.";
569 return _d;
570 }
571
572
573
574
575
576
577
578
579
580
581
582
583 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
584 private org.apache.commons.cli.Option getModletIncludesOption()
585 {
586 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModletIncludesOption" );
587 assert _d != null : "'ModletIncludesOption' dependency not found.";
588 return _d;
589 }
590
591
592
593
594
595
596
597
598
599
600
601
602 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
603 private org.apache.commons.cli.Option getModletLocationOption()
604 {
605 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModletLocationOption" );
606 assert _d != null : "'ModletLocationOption' dependency not found.";
607 return _d;
608 }
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
636 private org.apache.commons.cli.Option getModletNameOption()
637 {
638 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModletNameOption" );
639 assert _d != null : "'ModletNameOption' dependency not found.";
640 return _d;
641 }
642
643
644
645
646
647
648
649
650
651
652
653
654 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
655 private org.apache.commons.cli.Option getModletSchemaSystemIdOption()
656 {
657 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModletSchemaSystemIdOption" );
658 assert _d != null : "'ModletSchemaSystemIdOption' dependency not found.";
659 return _d;
660 }
661
662
663
664
665
666
667
668
669
670
671
672
673 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
674 private org.apache.commons.cli.Option getModletVendorOption()
675 {
676 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModletVendorOption" );
677 assert _d != null : "'ModletVendorOption' dependency not found.";
678 return _d;
679 }
680
681
682
683
684
685
686
687
688
689
690
691
692 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
693 private org.apache.commons.cli.Option getModletVersionOption()
694 {
695 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModletVersionOption" );
696 assert _d != null : "'ModletVersionOption' dependency not found.";
697 return _d;
698 }
699
700
701
702
703
704
705
706
707
708
709
710
711 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
712 private org.apache.commons.cli.Option getNoModletResourceValidation()
713 {
714 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoModletResourceValidation" );
715 assert _d != null : "'NoModletResourceValidation' dependency not found.";
716 return _d;
717 }
718
719
720
721
722
723
724
725
726
727
728
729
730 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
731 private org.apache.commons.cli.Option getPlatformProviderLocationOption()
732 {
733 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "PlatformProviderLocationOption" );
734 assert _d != null : "'PlatformProviderLocationOption' dependency not found.";
735 return _d;
736 }
737
738
739
740
741
742
743
744
745
746
747
748
749 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
750 private org.apache.commons.cli.Option getProviderLocationOption()
751 {
752 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ProviderLocationOption" );
753 assert _d != null : "'ProviderLocationOption' dependency not found.";
754 return _d;
755 }
756
757
758
759
760
761
762
763
764
765
766
767
768 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
769 private org.apache.commons.cli.Option getResourcesOption()
770 {
771 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ResourcesOption" );
772 assert _d != null : "'ResourcesOption' dependency not found.";
773 return _d;
774 }
775
776
777
778
779
780
781
782
783
784
785
786
787 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
788 private org.apache.commons.cli.Option getStylesheetOption()
789 {
790 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "StylesheetOption" );
791 assert _d != null : "'StylesheetOption' dependency not found.";
792 return _d;
793 }
794
795
796
797
798
799
800
801
802
803
804
805
806 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
807 private java.lang.String getAbbreviatedCommandName()
808 {
809 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "abbreviatedCommandName" );
810 assert _p != null : "'abbreviatedCommandName' property not found.";
811 return _p;
812 }
813
814
815
816
817
818
819
820
821 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
822 private java.lang.String getApplicationModlet()
823 {
824 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "applicationModlet" );
825 assert _p != null : "'applicationModlet' property not found.";
826 return _p;
827 }
828
829
830
831
832
833
834
835
836 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
837 private java.lang.String getCommandName()
838 {
839 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "commandName" );
840 assert _p != null : "'commandName' property not found.";
841 return _p;
842 }
843
844
845
846
847
848
849
850
851 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
852 private java.lang.String getModletExcludes()
853 {
854 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "modletExcludes" );
855 assert _p != null : "'modletExcludes' property not found.";
856 return _p;
857 }
858
859
860
861
862
863
864
865
866 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
867 private java.lang.String getProviderExcludes()
868 {
869 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "providerExcludes" );
870 assert _p != null : "'providerExcludes' property not found.";
871 return _p;
872 }
873
874
875
876
877
878
879
880
881 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
882 private java.lang.String getSchemaExcludes()
883 {
884 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "schemaExcludes" );
885 assert _p != null : "'schemaExcludes' property not found.";
886 return _p;
887 }
888
889
890
891
892
893
894
895
896 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
897 private java.lang.String getServiceExcludes()
898 {
899 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "serviceExcludes" );
900 assert _p != null : "'serviceExcludes' property not found.";
901 return _p;
902 }
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
919 private String getApplicationTitle( final java.util.Locale locale )
920 {
921 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "applicationTitle", locale );
922 assert _m != null : "'applicationTitle' message not found.";
923 return _m;
924 }
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
940 private String getCannotProcessMessage( final java.util.Locale locale, final java.lang.String itemInfo, final java.lang.String detailMessage )
941 {
942 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "cannotProcessMessage", locale, itemInfo, detailMessage );
943 assert _m != null : "'cannotProcessMessage' message not found.";
944 return _m;
945 }
946
947
948
949
950
951
952
953
954
955
956
957
958
959 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
960 private String getClasspathElementInfo( final java.util.Locale locale, final java.lang.String classpathElement )
961 {
962 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "classpathElementInfo", locale, classpathElement );
963 assert _m != null : "'classpathElementInfo' message not found.";
964 return _m;
965 }
966
967
968
969
970
971
972
973
974
975
976
977
978
979 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
980 private String getClasspathElementNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName )
981 {
982 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "classpathElementNotFoundWarning", locale, fileName );
983 assert _m != null : "'classpathElementNotFoundWarning' message not found.";
984 return _m;
985 }
986
987
988
989
990
991
992
993
994
995
996
997
998
999 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1000 private String getCommandFailureMessage( final java.util.Locale locale, final java.lang.String toolName )
1001 {
1002 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandFailureMessage", locale, toolName );
1003 assert _m != null : "'commandFailureMessage' message not found.";
1004 return _m;
1005 }
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1020 private String getCommandInfoMessage( final java.util.Locale locale, final java.lang.String toolName )
1021 {
1022 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandInfoMessage", locale, toolName );
1023 assert _m != null : "'commandInfoMessage' message not found.";
1024 return _m;
1025 }
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1040 private String getCommandSuccessMessage( final java.util.Locale locale, final java.lang.String toolName )
1041 {
1042 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandSuccessMessage", locale, toolName );
1043 assert _m != null : "'commandSuccessMessage' message not found.";
1044 return _m;
1045 }
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1060 private String getDefaultLogLevelInfo( final java.util.Locale locale, final java.lang.String defaultLogLevel )
1061 {
1062 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "defaultLogLevelInfo", locale, defaultLogLevel );
1063 assert _m != null : "'defaultLogLevelInfo' message not found.";
1064 return _m;
1065 }
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1080 private String getDocumentFileInfo( final java.util.Locale locale, final java.lang.String documentFile )
1081 {
1082 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "documentFileInfo", locale, documentFile );
1083 assert _m != null : "'documentFileInfo' message not found.";
1084 return _m;
1085 }
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1100 private String getDocumentFileNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName )
1101 {
1102 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "documentFileNotFoundWarning", locale, fileName );
1103 assert _m != null : "'documentFileNotFoundWarning' message not found.";
1104 return _m;
1105 }
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1121 private String getExcludedModletInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String modletIdentifier )
1122 {
1123 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedModletInfo", locale, resourceName, modletIdentifier );
1124 assert _m != null : "'excludedModletInfo' message not found.";
1125 return _m;
1126 }
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1142 private String getExcludedProviderInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String providerName )
1143 {
1144 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedProviderInfo", locale, resourceName, providerName );
1145 assert _m != null : "'excludedProviderInfo' message not found.";
1146 return _m;
1147 }
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1163 private String getExcludedSchemaInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String contextId )
1164 {
1165 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedSchemaInfo", locale, resourceName, contextId );
1166 assert _m != null : "'excludedSchemaInfo' message not found.";
1167 return _m;
1168 }
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1184 private String getExcludedServiceInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String serviceName )
1185 {
1186 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedServiceInfo", locale, resourceName, serviceName );
1187 assert _m != null : "'excludedServiceInfo' message not found.";
1188 return _m;
1189 }
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1204 private String getExcludingModletInfo( final java.util.Locale locale, final java.lang.String modletName )
1205 {
1206 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludingModletInfo", locale, modletName );
1207 assert _m != null : "'excludingModletInfo' message not found.";
1208 return _m;
1209 }
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1224 private String getIllegalTransformationResultError( final java.util.Locale locale, final java.lang.String stylesheetInfo )
1225 {
1226 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "illegalTransformationResultError", locale, stylesheetInfo );
1227 assert _m != null : "'illegalTransformationResultError' message not found.";
1228 return _m;
1229 }
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1244 private String getIncludingModletInfo( final java.util.Locale locale, final java.lang.String modletName )
1245 {
1246 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "includingModletInfo", locale, modletName );
1247 assert _m != null : "'includingModletInfo' message not found.";
1248 return _m;
1249 }
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1264 private String getInvalidModelMessage( final java.util.Locale locale, final java.lang.String modelIdentifier )
1265 {
1266 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "invalidModelMessage", locale, modelIdentifier );
1267 assert _m != null : "'invalidModelMessage' message not found.";
1268 return _m;
1269 }
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1283 private String getLongDescriptionMessage( final java.util.Locale locale )
1284 {
1285 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "longDescriptionMessage", locale );
1286 assert _m != null : "'longDescriptionMessage' message not found.";
1287 return _m;
1288 }
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1303 private String getReadingMessage( final java.util.Locale locale, final java.lang.String locationInfo )
1304 {
1305 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "readingMessage", locale, locationInfo );
1306 assert _m != null : "'readingMessage' message not found.";
1307 return _m;
1308 }
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1321 private String getSeparator( final java.util.Locale locale )
1322 {
1323 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "separator", locale );
1324 assert _m != null : "'separator' message not found.";
1325 return _m;
1326 }
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1340 private String getShortDescriptionMessage( final java.util.Locale locale )
1341 {
1342 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "shortDescriptionMessage", locale );
1343 assert _m != null : "'shortDescriptionMessage' message not found.";
1344 return _m;
1345 }
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1360 private String getWriteInfo( final java.util.Locale locale, final java.lang.String fileName )
1361 {
1362 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "writeInfo", locale, fileName );
1363 assert _m != null : "'writeInfo' message not found.";
1364 return _m;
1365 }
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.3", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.3" )
1455 @Override
1456 public org.apache.commons.cli.Options getOptions()
1457 {
1458 final org.apache.commons.cli.Options options = new org.apache.commons.cli.Options();
1459 options.addOption( this.getClasspathOption() );
1460 options.addOption( this.getDocumentEncodingOption() );
1461 options.addOption( this.getDocumentOption() );
1462 options.addOption( this.getDocumentsOption() );
1463 options.addOption( this.getModelContextFactoryOption() );
1464 options.addOption( this.getModelOption() );
1465 options.addOption( this.getModletExcludesOption() );
1466 options.addOption( this.getModletIncludesOption() );
1467 options.addOption( this.getModletLocationOption() );
1468 options.addOption( this.getModletNameOption() );
1469 options.addOption( this.getModletSchemaSystemIdOption() );
1470 options.addOption( this.getModletVendorOption() );
1471 options.addOption( this.getModletVersionOption() );
1472 options.addOption( this.getNoModletResourceValidation() );
1473 options.addOption( this.getPlatformProviderLocationOption() );
1474 options.addOption( this.getProviderLocationOption() );
1475 options.addOption( this.getResourcesOption() );
1476 options.addOption( this.getStylesheetOption() );
1477 return options;
1478 }
1479
1480
1481 }