1
2
3
4
5
6 package org.codehaus.mojo.appassembler.model;
7
8
9
10
11
12
13 @SuppressWarnings( "all" )
14 public class Daemon
15 implements java.io.Serializable
16 {
17
18
19
20
21
22
23
24
25 private String id;
26
27
28
29
30 private String mainClass;
31
32
33
34
35 private String wrapperMainClass = "org.tanukisoftware.wrapper.WrapperSimpleApp";
36
37
38
39
40 private Classpath classpath;
41
42
43
44
45 private java.util.List<String> commandLineArguments;
46
47
48
49
50 private String configurationDirectory = "repo";
51
52
53
54
55 private JvmSettings jvmSettings;
56
57
58
59
60 private String environmentSetupFileName;
61
62
63
64
65 private boolean showConsoleWindow = true;
66
67
68
69
70 private boolean useTimestampInSnapshotFileName = true;
71
72
73
74
75 private boolean useDaemonIdAsWrapperConfName = false;
76
77
78
79
80
81
82
83
84 private boolean useDaemonIdAsWrapperExePrefixName = false;
85
86
87
88
89 private boolean useWildcardClassPath = false;
90
91
92
93
94 private java.util.List<GeneratorConfiguration> generatorConfigurations;
95
96
97
98
99 private String repositoryName = "repo";
100
101
102
103
104 private String licenseHeaderFile;
105
106
107
108
109 private String wrapperLogFile;
110
111
112
113
114 private String unixScriptTemplate;
115
116
117
118
119 private String windowsScriptTemplate;
120
121
122
123
124 private String externalDeltaPackDirectory;
125
126
127
128
129 private String endorsedDir;
130
131
132
133
134 private String preWrapperConf;
135
136
137
138
139 private String modelEncoding = "UTF-8";
140
141
142
143
144
145
146
147
148
149
150
151 public void addCommandLineArgument( String string )
152 {
153 getCommandLineArguments().add( string );
154 }
155
156
157
158
159
160
161 public void addGeneratorConfiguration( GeneratorConfiguration generatorConfiguration )
162 {
163 getGeneratorConfigurations().add( generatorConfiguration );
164 }
165
166
167
168
169
170
171 public Classpath getClasspath()
172 {
173 return this.classpath;
174 }
175
176
177
178
179
180
181 public java.util.List<String> getCommandLineArguments()
182 {
183 if ( this.commandLineArguments == null )
184 {
185 this.commandLineArguments = new java.util.ArrayList<String>();
186 }
187
188 return this.commandLineArguments;
189 }
190
191
192
193
194
195
196 public String getConfigurationDirectory()
197 {
198 return this.configurationDirectory;
199 }
200
201
202
203
204
205
206 public String getEndorsedDir()
207 {
208 return this.endorsedDir;
209 }
210
211
212
213
214
215
216 public String getEnvironmentSetupFileName()
217 {
218 return this.environmentSetupFileName;
219 }
220
221
222
223
224
225
226 public String getExternalDeltaPackDirectory()
227 {
228 return this.externalDeltaPackDirectory;
229 }
230
231
232
233
234
235
236 public java.util.List<GeneratorConfiguration> getGeneratorConfigurations()
237 {
238 if ( this.generatorConfigurations == null )
239 {
240 this.generatorConfigurations = new java.util.ArrayList<GeneratorConfiguration>();
241 }
242
243 return this.generatorConfigurations;
244 }
245
246
247
248
249
250
251 public String getId()
252 {
253 return this.id;
254 }
255
256
257
258
259
260
261 public JvmSettings getJvmSettings()
262 {
263 return this.jvmSettings;
264 }
265
266
267
268
269
270
271 public String getLicenseHeaderFile()
272 {
273 return this.licenseHeaderFile;
274 }
275
276
277
278
279
280
281 public String getMainClass()
282 {
283 return this.mainClass;
284 }
285
286
287
288
289
290
291 public String getModelEncoding()
292 {
293 return this.modelEncoding;
294 }
295
296
297
298
299
300
301 public String getPreWrapperConf()
302 {
303 return this.preWrapperConf;
304 }
305
306
307
308
309
310
311 public String getRepositoryName()
312 {
313 return this.repositoryName;
314 }
315
316
317
318
319
320
321 public String getUnixScriptTemplate()
322 {
323 return this.unixScriptTemplate;
324 }
325
326
327
328
329
330
331 public String getWindowsScriptTemplate()
332 {
333 return this.windowsScriptTemplate;
334 }
335
336
337
338
339
340
341 public String getWrapperLogFile()
342 {
343 return this.wrapperLogFile;
344 }
345
346
347
348
349
350
351 public String getWrapperMainClass()
352 {
353 return this.wrapperMainClass;
354 }
355
356
357
358
359
360
361 public boolean isShowConsoleWindow()
362 {
363 return this.showConsoleWindow;
364 }
365
366
367
368
369
370
371 public boolean isUseDaemonIdAsWrapperConfName()
372 {
373 return this.useDaemonIdAsWrapperConfName;
374 }
375
376
377
378
379
380
381
382
383
384 public boolean isUseDaemonIdAsWrapperExePrefixName()
385 {
386 return this.useDaemonIdAsWrapperExePrefixName;
387 }
388
389
390
391
392
393
394 public boolean isUseTimestampInSnapshotFileName()
395 {
396 return this.useTimestampInSnapshotFileName;
397 }
398
399
400
401
402
403
404 public boolean isUseWildcardClassPath()
405 {
406 return this.useWildcardClassPath;
407 }
408
409
410
411
412
413
414 public void removeCommandLineArgument( String string )
415 {
416 getCommandLineArguments().remove( string );
417 }
418
419
420
421
422
423
424 public void removeGeneratorConfiguration( GeneratorConfiguration generatorConfiguration )
425 {
426 getGeneratorConfigurations().remove( generatorConfiguration );
427 }
428
429
430
431
432
433
434 public void setClasspath( Classpath classpath )
435 {
436 this.classpath = classpath;
437 }
438
439
440
441
442
443
444 public void setCommandLineArguments( java.util.List<String> commandLineArguments )
445 {
446 this.commandLineArguments = commandLineArguments;
447 }
448
449
450
451
452
453
454 public void setConfigurationDirectory( String configurationDirectory )
455 {
456 this.configurationDirectory = configurationDirectory;
457 }
458
459
460
461
462
463
464 public void setEndorsedDir( String endorsedDir )
465 {
466 this.endorsedDir = endorsedDir;
467 }
468
469
470
471
472
473
474 public void setEnvironmentSetupFileName( String environmentSetupFileName )
475 {
476 this.environmentSetupFileName = environmentSetupFileName;
477 }
478
479
480
481
482
483
484 public void setExternalDeltaPackDirectory( String externalDeltaPackDirectory )
485 {
486 this.externalDeltaPackDirectory = externalDeltaPackDirectory;
487 }
488
489
490
491
492
493
494 public void setGeneratorConfigurations( java.util.List<GeneratorConfiguration> generatorConfigurations )
495 {
496 this.generatorConfigurations = generatorConfigurations;
497 }
498
499
500
501
502
503
504 public void setId( String id )
505 {
506 this.id = id;
507 }
508
509
510
511
512
513
514 public void setJvmSettings( JvmSettings jvmSettings )
515 {
516 this.jvmSettings = jvmSettings;
517 }
518
519
520
521
522
523
524 public void setLicenseHeaderFile( String licenseHeaderFile )
525 {
526 this.licenseHeaderFile = licenseHeaderFile;
527 }
528
529
530
531
532
533
534 public void setMainClass( String mainClass )
535 {
536 this.mainClass = mainClass;
537 }
538
539
540
541
542
543
544 public void setModelEncoding( String modelEncoding )
545 {
546 this.modelEncoding = modelEncoding;
547 }
548
549
550
551
552
553
554 public void setPreWrapperConf( String preWrapperConf )
555 {
556 this.preWrapperConf = preWrapperConf;
557 }
558
559
560
561
562
563
564 public void setRepositoryName( String repositoryName )
565 {
566 this.repositoryName = repositoryName;
567 }
568
569
570
571
572
573
574 public void setShowConsoleWindow( boolean showConsoleWindow )
575 {
576 this.showConsoleWindow = showConsoleWindow;
577 }
578
579
580
581
582
583
584 public void setUnixScriptTemplate( String unixScriptTemplate )
585 {
586 this.unixScriptTemplate = unixScriptTemplate;
587 }
588
589
590
591
592
593
594 public void setUseDaemonIdAsWrapperConfName( boolean useDaemonIdAsWrapperConfName )
595 {
596 this.useDaemonIdAsWrapperConfName = useDaemonIdAsWrapperConfName;
597 }
598
599
600
601
602
603
604
605
606
607 public void setUseDaemonIdAsWrapperExePrefixName( boolean useDaemonIdAsWrapperExePrefixName )
608 {
609 this.useDaemonIdAsWrapperExePrefixName = useDaemonIdAsWrapperExePrefixName;
610 }
611
612
613
614
615
616
617 public void setUseTimestampInSnapshotFileName( boolean useTimestampInSnapshotFileName )
618 {
619 this.useTimestampInSnapshotFileName = useTimestampInSnapshotFileName;
620 }
621
622
623
624
625
626
627 public void setUseWildcardClassPath( boolean useWildcardClassPath )
628 {
629 this.useWildcardClassPath = useWildcardClassPath;
630 }
631
632
633
634
635
636
637 public void setWindowsScriptTemplate( String windowsScriptTemplate )
638 {
639 this.windowsScriptTemplate = windowsScriptTemplate;
640 }
641
642
643
644
645
646
647 public void setWrapperLogFile( String wrapperLogFile )
648 {
649 this.wrapperLogFile = wrapperLogFile;
650 }
651
652
653
654
655
656
657 public void setWrapperMainClass( String wrapperMainClass )
658 {
659 this.wrapperMainClass = wrapperMainClass;
660 }
661
662
663 public java.util.List<ClasspathElement> getAllClasspathElements()
664 {
665 if ( classpath == null )
666 {
667 return java.util.Collections.EMPTY_LIST;
668 }
669
670 java.util.List<ClasspathElement> elements = new java.util.ArrayList<ClasspathElement>(
671 classpath.getDependencies().size() + classpath.getDirectories().size() );
672 elements.addAll( classpath.getDirectories() );
673 elements.addAll( classpath.getDependencies() );
674 return elements;
675 }
676
677 }