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