View Javadoc

1   package org.apache.maven.shared.jarsigner;
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 org.apache.maven.shared.utils.cli.javatool.JavaToolRequest;
23  
24  import java.io.File;
25  
26  /**
27   * Specifies the common parameters used to control a JarSigner tool invocation.
28   *
29   * @author tchemit <chemit@codelutin.com>
30   * @version $Id: JarSignerRequest.java 1541710 2013-11-13 21:01:00Z tchemit $
31   * @since 1.0
32   */
33  public interface JarSignerRequest
34      extends JavaToolRequest
35  {
36  
37      /**
38       * Gets the value of the {@code verbose} field.
39       *
40       * @return the value of the {@code verbose} field.
41       */
42      boolean isVerbose();
43  
44      /**
45       * Gets the value of the {@code keystore} field.
46       *
47       * @return the value of the {@code keystore} field.
48       */
49      String getKeystore();
50  
51      /**
52       * Gets the value of the {@code alias} field.
53       *
54       * @return the value of the {@code alias} field.
55       */
56      String getAlias();
57  
58      /**
59       * Gets the value of the {@code maxMemory} field.
60       *
61       * @return the value of the {@code maxMemory} field.
62       */
63      String getMaxMemory();
64  
65      /**
66       * Gets the value of the {@code maxMemory} field.
67       *
68       * @return the value of the {@code maxMemory} field.
69       */
70      String[] getArguments();
71  
72      /**
73       * Gets the value of the {@code workingDirectory} field.
74       *
75       * @return the value of the {@code workingDirectory} field.
76       */
77      File getWorkingDirectory();
78  
79      /**
80       * Gets the value of the {@code archive} field.
81       * <p/>
82       * The archive field is in fact the file on which the jarsigner request will be executed.
83       *
84       * @return the value of the {@code archive} field.
85       */
86      File getArchive();
87  
88      /**
89       * Gets the value of the command line tool parameter <pre>protected</pre>
90       *
91       * @return true iff the password must be given via a protected
92       *         authentication path such as a dedicated PIN reader
93       */
94      boolean isProtectedAuthenticationPath();
95  
96      /**
97       * Sets the new given value to the field {@code verbose} of the request.
98       *
99       * @param verbose the new value of the field {@code verbose}.
100      */
101     void setVerbose( boolean verbose );
102 
103     /**
104      * Sets the new given value to the field {@code keystore} of the request.
105      *
106      * @param keystore the new value of the field {@code keystore}.
107      */
108     void setKeystore( String keystore);
109 
110     /**
111      * Sets the new given value to the field {@code alias} of the request.
112      *
113      * @param alias the new value of the field {@code alias}.
114      */
115     void setAlias( String alias);
116 
117     /**
118      * Sets the new given value to the field {@code maxMemory} of the request.
119      *
120      * @param maxMemory the new value of the field {@code maxMemory}.
121      */
122     void setMaxMemory( String maxMemory );
123 
124     /**
125      * Sets the new given value to the field {@code arguments} of the request.
126      *
127      * @param arguments the new value of the field {@code arguments}.
128      */
129     void setArguments( String... arguments );
130 
131     /**
132      * Sets the new given value to the field {@code workingDirectory} of the request.
133      *
134      * @param workingDirectory the new value of the field {@code workingDirectory}.
135      */
136     void setWorkingDirectory( File workingDirectory );
137 
138     /**
139      * Sets the new given value to the field {@code archive} of the request.
140      *
141      * @param archive the new value of the field {@code archive}.
142      */
143     void setArchive( File archive );
144 
145     /**
146      * Sets the value of the command line tool parameter <pre>protected</pre>
147      *
148      * @param protectedAuthenticationPath iff the password must be given via a protected
149      *                                    authentication path such as a dedicated PIN reader
150      */
151     void setProtectedAuthenticationPath( boolean protectedAuthenticationPath );
152 
153 }