View Javadoc
1   package org.codehaus.mojo.webstart.generator;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with work for additional information
7    * regarding copyright ownership.  The ASF licenses file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import org.apache.maven.project.MavenProject;
23  
24  import java.io.File;
25  
26  /**
27   * Created on 1/6/14.
28   *
29   * @author Tony Chemit <chemit@codelutin.com>
30   * @since 1.0-beta-5
31   */
32  public class GeneratorTechnicalConfig
33  {
34  
35      private final MavenProject mavenProject;
36  
37      private final File outputFile;
38  
39      private final String mainClass;
40  
41      private final String encoding;
42  
43      private final File resourceLoaderPath;
44  
45      private final String defaultTemplateResourceName;
46  
47      private final String inputFileTemplatePath;
48  
49      private final String webstartJarURL;
50  
51      public GeneratorTechnicalConfig( MavenProject mavenProject, File resourceLoaderPath,
52                                       String defaultTemplateResourceName, File outputFile, String inputFileTemplatePath,
53                                       String mainClass, String webstartJarURL, String encoding )
54      {
55          if ( mavenProject == null )
56          {
57              throw new IllegalArgumentException( "mavenProject must not be null" );
58          }
59  
60          if ( resourceLoaderPath == null )
61          {
62              throw new IllegalArgumentException( "resourceLoaderPath must not be null" );
63          }
64  
65          if ( outputFile == null )
66          {
67              throw new IllegalArgumentException( "outputFile must not be null" );
68          }
69  
70  //        if ( mainClass == null )
71  //        {
72  //            throw new IllegalArgumentException( "mainClass must not be null" );
73  //        }
74  
75          this.mavenProject = mavenProject;
76          this.outputFile = outputFile;
77          this.mainClass = mainClass;
78          this.encoding = encoding;
79          this.resourceLoaderPath = resourceLoaderPath;
80          this.defaultTemplateResourceName = defaultTemplateResourceName;
81          this.inputFileTemplatePath = inputFileTemplatePath;
82          this.webstartJarURL = webstartJarURL;
83      }
84  
85      public MavenProject getMavenProject()
86      {
87          return mavenProject;
88      }
89  
90      public File getOutputFile()
91      {
92          return outputFile;
93      }
94  
95      public String getMainClass()
96      {
97          return mainClass;
98      }
99  
100     public String getEncoding()
101     {
102         return encoding;
103     }
104 
105     public File getResourceLoaderPath()
106     {
107         return resourceLoaderPath;
108     }
109 
110     public String getDefaultTemplateResourceName()
111     {
112         return defaultTemplateResourceName;
113     }
114 
115     public String getInputFileTemplatePath()
116     {
117         return inputFileTemplatePath;
118     }
119 
120     public String getWebstartJarURL()
121     {
122         return webstartJarURL;
123     }
124 }