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 Tony Chemit 30 * @since 1.0 31 */ 32 public interface JarSignerRequest 33 extends JavaToolRequest 34 { 35 36 /** 37 * Gets the value of the {@code verbose} field. 38 * 39 * @return the value of the {@code verbose} field. 40 */ 41 boolean isVerbose(); 42 43 /** 44 * Gets the value of the {@code keystore} field. 45 * 46 * @return the value of the {@code keystore} field. 47 */ 48 String getKeystore(); 49 50 /** 51 * Gets the value of the {@code storetype} field. 52 * 53 * @return the value of the {@code storetype} field. 54 */ 55 String getStoretype(); 56 57 /** 58 * Gets the value of the {@code storepass} field. 59 * 60 * @return the value of the {@code storepass} field. 61 */ 62 String getStorepass(); 63 64 /** 65 * Gets the value of the {@code providerName} field. 66 * 67 * @return the value of the {@code providerName} field. 68 */ 69 String getProviderName(); 70 71 /** 72 * Gets the value of the {@code providerClass} field. 73 * 74 * @return the value of the {@code providerClass} field. 75 */ 76 String getProviderClass(); 77 78 /** 79 * Gets the value of the {@code providerArg} field. 80 * 81 * @return the value of the {@code providerArg} field. 82 */ 83 String getProviderArg(); 84 85 /** 86 * Gets the value of the {@code alias} field. 87 * 88 * @return the value of the {@code alias} field. 89 */ 90 String getAlias(); 91 92 /** 93 * Gets the value of the {@code maxMemory} field. 94 * 95 * @return the value of the {@code maxMemory} field. 96 */ 97 String getMaxMemory(); 98 99 /** 100 * Gets the value of the {@code maxMemory} field. 101 * 102 * @return the value of the {@code maxMemory} field. 103 */ 104 String[] getArguments(); 105 106 /** 107 * Gets the value of the {@code workingDirectory} field. 108 * 109 * @return the value of the {@code workingDirectory} field. 110 */ 111 File getWorkingDirectory(); 112 113 /** 114 * Gets the value of the {@code archive} field. 115 * <p> 116 * The archive field is in fact the file on which the jarsigner request will be executed. 117 * </p> 118 * 119 * @return the value of the {@code archive} field. 120 */ 121 File getArchive(); 122 123 /** 124 * Gets the value of the command line tool parameter <pre>protected</pre> 125 * 126 * @return true iff the password must be given via a protected 127 * authentication path such as a dedicated PIN reader 128 */ 129 boolean isProtectedAuthenticationPath(); 130 131 /** 132 * Sets the new given value to the field {@code verbose} of the request. 133 * 134 * @param verbose the new value of the field {@code verbose}. 135 */ 136 void setVerbose( boolean verbose ); 137 138 /** 139 * Sets the new given value to the field {@code keystore} of the request. 140 * 141 * @param keystore the new value of the field {@code keystore}. 142 */ 143 void setKeystore( String keystore ); 144 145 /** 146 * Sets the new given value to the field {@code storetype} of the request. 147 * 148 * @param storetype the new value of the field {@code storetype}. 149 */ 150 void setStoretype( String storetype ); 151 152 /** 153 * Sets the new given value to the field {@code storepass} of the request. 154 * 155 * @param storepass the new value of the field {@code storepass}. 156 */ 157 void setStorepass( String storepass ); 158 159 /** 160 * Sets the new given value to the field {@code alias} of the request. 161 * 162 * @param alias the new value of the field {@code alias}. 163 */ 164 void setAlias( String alias ); 165 166 /** 167 * Sets the new given value to the field {@code providerName} of the request. 168 * 169 * @param providerName the new value of the field {@code providerName}. 170 */ 171 void setProviderName( String providerName ); 172 173 /** 174 * Sets the new given value to the field {@code providerClass} of the request. 175 * 176 * @param providerClass the new value of the field {@code providerClass}. 177 */ 178 void setProviderClass( String providerClass ); 179 180 /** 181 * Sets the new given value to the field {@code providerArg} of the request. 182 * 183 * @param providerArg the new value of the field {@code providerArg}. 184 */ 185 void setProviderArg( String providerArg ); 186 187 /** 188 * Sets the new given value to the field {@code maxMemory} of the request. 189 * 190 * @param maxMemory the new value of the field {@code maxMemory}. 191 */ 192 void setMaxMemory( String maxMemory ); 193 194 /** 195 * Sets the new given value to the field {@code arguments} of the request. 196 * 197 * @param arguments the new value of the field {@code arguments}. 198 */ 199 void setArguments( String... arguments ); 200 201 /** 202 * Sets the new given value to the field {@code workingDirectory} of the request. 203 * 204 * @param workingDirectory the new value of the field {@code workingDirectory}. 205 */ 206 void setWorkingDirectory( File workingDirectory ); 207 208 /** 209 * Sets the new given value to the field {@code archive} of the request. 210 * 211 * @param archive the new value of the field {@code archive}. 212 */ 213 void setArchive( File archive ); 214 215 /** 216 * Sets the value of the command line tool parameter <pre>protected</pre> 217 * 218 * @param protectedAuthenticationPath iff the password must be given via a protected 219 * authentication path such as a dedicated PIN reader 220 */ 221 void setProtectedAuthenticationPath( boolean protectedAuthenticationPath ); 222 223 }