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.codehaus.mojo.webstart.ResolvedJarResource;
23  
24  import java.util.Collection;
25  import java.util.List;
26  import java.util.Map;
27  
28  /**
29   * Created on 1/6/14.
30   *
31   * @author Tony Chemit <chemit@codelutin.com>
32   * @since 1.0-beta-5
33   */
34  public class JarResourceGeneratorConfig
35      implements GeneratorExtraConfig
36  {
37  
38      private final Collection<ResolvedJarResource> jarResources;
39  
40      private final String libPath;
41  
42      private final String codebase;
43  
44      private final Map<String, String> properties;
45  
46      private List<String> arguments;
47  
48      public JarResourceGeneratorConfig( Collection<ResolvedJarResource> jarResources, String libPath, String codebase,
49                                         Map<String, String> properties, List<String> arguments )
50      {
51          this.jarResources = jarResources;
52          this.libPath = libPath;
53          this.codebase = codebase;
54          this.properties = properties;
55          this.arguments = arguments;
56      }
57  
58      public Collection<ResolvedJarResource> getJarResources()
59      {
60          return jarResources;
61      }
62  
63      public String getLibPath()
64      {
65          return libPath;
66      }
67  
68      /**
69       * {@inheritDoc}
70       */
71      public String getJnlpSpec()
72      {
73          return "1.0+";
74      }
75  
76      /**
77       * {@inheritDoc}
78       */
79      public String getOfflineAllowed()
80      {
81          return "false";
82      }
83  
84      /**
85       * {@inheritDoc}
86       */
87      public String getAllPermissions()
88      {
89          return "true";
90      }
91  
92      /**
93       * {@inheritDoc}
94       */
95      public String getJ2seVersion()
96      {
97          return "1.5+";
98      }
99  
100     /**
101      * {@inheritDoc}
102      */
103     public String getJnlpCodeBase()
104     {
105         return codebase;
106     }
107 
108     /**
109      * {@inheritDoc}
110      */
111     public Map<String, String> getProperties()
112     {
113         return properties;
114     }
115 
116     public List<String> getArguments()
117     {
118         return arguments;
119     }
120 }