View Javadoc
1   package org.codehaus.mojo.webstart;
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 this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this 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 java.io.File;
23  import java.util.Map;
24  
25  /**
26   * Bean to host part of the JnlpMojo configuration.
27   *
28   * @author <a href="jerome@coffeebreaks.org">Jerome Lacoste</a>
29   * @version $Id$
30   */
31  public class JnlpConfig
32  {
33  
34      private String inputTemplateResourcePath;
35  
36      private String inputTemplate;
37  
38      private String outputFile;
39  
40      private String spec;
41  
42      private String version;
43  
44      private String j2seVersion;
45  
46      private String allPermissions;
47  
48      private String offlineAllowed;
49  
50      private String href;
51  
52      private String mainClass;
53  
54      private Map<String,String> properties;
55  
56      /**
57       * The path containing any resources which will be added to the webstart artifact
58       * Obsolete. Will be removed after 1.0-alpha- series.
59       */
60      private File resources;
61  
62      private JnlpFileType type = JnlpFileType.application;
63  
64      public void setInputTemplateResourcePath( String inputTemplateResourcePath )
65      {
66          this.inputTemplateResourcePath = inputTemplateResourcePath;
67      }
68  
69      public void setInputTemplate( String inputTemplate )
70      {
71          this.inputTemplate = inputTemplate;
72      }
73  
74      public void setOutputFile( String outputFile )
75      {
76          this.outputFile = outputFile;
77      }
78  
79      public void setSpec( String spec )
80      {
81          this.spec = spec;
82      }
83  
84      public void setVersion( String version )
85      {
86          this.version = version;
87      }
88  
89      public void setJ2seVersion( String j2seVersion )
90      {
91          this.j2seVersion = j2seVersion;
92      }
93  
94      public void setOfflineAllowed( String offlineAllowed )
95      {
96          this.offlineAllowed = offlineAllowed;
97      }
98  
99      public void setAllPermissions( String allPermissions )
100     {
101         this.allPermissions = allPermissions;
102     }
103 
104     public void setHref( String href )
105     {
106         this.href = href;
107     }
108 
109     public void setMainClass( String mainClass )
110     {
111         this.mainClass = mainClass;
112     }
113 
114     public void setProperties( Map<String, String> properties )
115     {
116         this.properties = properties;
117     }
118 
119     public void setType( String type )
120     {
121         this.type = JnlpFileType.valueOf( type );
122     }
123 
124     public void setType( JnlpFileType type )
125     {
126         this.type = type;
127     }
128 
129     public String getInputTemplateResourcePath()
130     {
131         return inputTemplateResourcePath;
132     }
133 
134     public String getInputTemplate()
135     {
136         return inputTemplate;
137     }
138 
139     public void setResources( File resources )
140     {
141         this.resources = resources;
142     }
143 
144     public String getOutputFile()
145     {
146         return outputFile;
147     }
148 
149     public String getSpec()
150     {
151         return spec;
152     }
153 
154     public String getVersion()
155     {
156         return version;
157     }
158 
159     public String getJ2seVersion()
160     {
161         return j2seVersion;
162     }
163 
164     public String getAllPermissions()
165     {
166         return allPermissions;
167     }
168 
169     public String getOfflineAllowed()
170     {
171         return offlineAllowed;
172     }
173 
174     public File getResources()
175     {
176         return resources;
177     }
178 
179     public String getHref()
180     {
181         return href;
182     }
183 
184     public String getMainClass()
185     {
186         return mainClass;
187     }
188 
189     public Map<String, String> getProperties()
190     {
191         return properties;
192     }
193 
194     public JnlpFileType getType()
195     {
196         return type;
197     }
198 
199     public boolean isRequireMainClass()
200     {
201         return type.isRequireMainClass();
202     }
203 }