View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.shared.jarsigner;
20  
21  import java.io.File;
22  
23  import org.apache.maven.shared.utils.cli.javatool.JavaToolRequest;
24  
25  /**
26   * Specifies the common parameters used to control a JarSigner tool invocation.
27   *
28   * @author Tony Chemit
29   * @since 1.0
30   */
31  public interface JarSignerRequest extends JavaToolRequest {
32  
33      /**
34       * Gets the value of the {@code verbose} field.
35       *
36       * @return the value of the {@code verbose} field.
37       */
38      boolean isVerbose();
39  
40      /**
41       * Gets the value of the {@code keystore} field.
42       *
43       * @return the value of the {@code keystore} field.
44       */
45      String getKeystore();
46  
47      /**
48       * Gets the value of the {@code storetype} field.
49       *
50       * @return the value of the {@code storetype} field.
51       */
52      String getStoretype();
53  
54      /**
55       * Gets the value of the {@code storepass} field.
56       *
57       * @return the value of the {@code storepass} field.
58       */
59      String getStorepass();
60  
61      /**
62       * Gets the value of the {@code providerName} field.
63       *
64       * @return the value of the {@code providerName} field.
65       */
66      String getProviderName();
67  
68      /**
69       * Gets the value of the {@code providerClass} field.
70       *
71       * @return the value of the {@code providerClass} field.
72       */
73      String getProviderClass();
74  
75      /**
76       * Gets the value of the {@code providerArg} field.
77       *
78       * @return the value of the {@code providerArg} field.
79       */
80      String getProviderArg();
81  
82      /**
83       * Gets the value of the {@code alias} field.
84       *
85       * @return the value of the {@code alias} field.
86       */
87      String getAlias();
88  
89      /**
90       * Gets the value of the {@code maxMemory} field.
91       *
92       * @return the value of the {@code maxMemory} field.
93       */
94      String getMaxMemory();
95  
96      /**
97       * Gets the value of the {@code maxMemory} field.
98       *
99       * @return the value of the {@code maxMemory} field.
100      */
101     String[] getArguments();
102 
103     /**
104      * Gets the value of the {@code workingDirectory} field.
105      *
106      * @return the value of the {@code workingDirectory} field.
107      */
108     File getWorkingDirectory();
109 
110     /**
111      * Gets the value of the {@code archive} field.
112      * <p>
113      * The archive field is in fact the file on which the jarsigner request will be executed.
114      * </p>
115      *
116      * @return the value of the {@code archive} field.
117      */
118     File getArchive();
119 
120     /**
121      * Gets the value of the command line tool parameter <pre>protected</pre>
122      *
123      * @return true iff the password must be given via a protected
124      * authentication path such as a dedicated PIN reader
125      */
126     boolean isProtectedAuthenticationPath();
127 
128     /**
129      * Sets the new given value to the field {@code verbose} of the request.
130      *
131      * @param verbose the new value of the field {@code verbose}.
132      */
133     void setVerbose(boolean verbose);
134 
135     /**
136      * Sets the new given value to the field {@code keystore} of the request.
137      *
138      * @param keystore the new value of the field {@code keystore}.
139      */
140     void setKeystore(String keystore);
141 
142     /**
143      * Sets the new given value to the field {@code storetype} of the request.
144      *
145      * @param storetype the new value of the field {@code storetype}.
146      */
147     void setStoretype(String storetype);
148 
149     /**
150      * Sets the new given value to the field {@code storepass} of the request.
151      *
152      * @param storepass the new value of the field {@code storepass}.
153      */
154     void setStorepass(String storepass);
155 
156     /**
157      * Sets the new given value to the field {@code alias} of the request.
158      *
159      * @param alias the new value of the field {@code alias}.
160      */
161     void setAlias(String alias);
162 
163     /**
164      * Sets the new given value to the field {@code providerName} of the request.
165      *
166      * @param providerName the new value of the field {@code providerName}.
167      */
168     void setProviderName(String providerName);
169 
170     /**
171      * Sets the new given value to the field {@code providerClass} of the request.
172      *
173      * @param providerClass the new value of the field {@code providerClass}.
174      */
175     void setProviderClass(String providerClass);
176 
177     /**
178      * Sets the new given value to the field {@code providerArg} of the request.
179      *
180      * @param providerArg the new value of the field {@code providerArg}.
181      */
182     void setProviderArg(String providerArg);
183 
184     /**
185      * Sets the new given value to the field {@code maxMemory} of the request.
186      *
187      * @param maxMemory the new value of the field {@code maxMemory}.
188      */
189     void setMaxMemory(String maxMemory);
190 
191     /**
192      * Sets the new given value to the field {@code arguments} of the request.
193      *
194      * @param arguments the new value of the field {@code arguments}.
195      */
196     void setArguments(String... arguments);
197 
198     /**
199      * Sets the new given value to the field {@code workingDirectory} of the request.
200      *
201      * @param workingDirectory the new value of the field {@code workingDirectory}.
202      */
203     void setWorkingDirectory(File workingDirectory);
204 
205     /**
206      * Sets the new given value to the field {@code archive} of the request.
207      *
208      * @param archive the new value of the field {@code archive}.
209      */
210     void setArchive(File archive);
211 
212     /**
213      * Sets the value of the command line tool parameter <pre>protected</pre>
214      *
215      * @param protectedAuthenticationPath iff the password must be given via a protected
216      *                                    authentication path such as a dedicated PIN reader
217      */
218     void setProtectedAuthenticationPath(boolean protectedAuthenticationPath);
219 }