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 java.io.File;
23
24 /**
25 * Specifies the parameters used to control a jar signer sign operation invocation.
26 *
27 * @author Tony Chemit
28 * @since 1.0
29 */
30 public class JarSignerSignRequest
31 extends AbstractJarSignerRequest
32 {
33
34 /**
35 * See <a href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/jarsigner.html#Options">options</a>.
36 */
37 private String keypass;
38
39 /**
40 * See <a href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/jarsigner.html#Options">options</a>.
41 */
42 private String sigfile;
43
44 /**
45 * See <a href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/jarsigner.html#Options">options</a>.
46 */
47 private String tsaLocation;
48
49 /**
50 * See <a href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/jarsigner.html#Options">options</a>.
51 */
52 private String tsaAlias;
53
54 /**
55 * See <a href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/jarsigner.html#Options">options</a>.
56 */
57 protected File signedjar;
58
59 /**
60 * Location of the extra certchain file to be used during signing.
61 *
62 * See <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jarsigner.html#Options">options</a>.
63 * @since 3.0.0
64 */
65 protected File certchain;
66
67 public String getKeypass()
68 {
69 return keypass;
70 }
71
72 public String getSigfile()
73 {
74 return sigfile;
75 }
76
77 public String getTsaLocation()
78 {
79 return tsaLocation;
80 }
81
82 public String getTsaAlias()
83 {
84 return tsaAlias;
85 }
86
87 public void setKeypass( String keypass )
88 {
89 this.keypass = keypass;
90 }
91
92 public void setSigfile( String sigfile )
93 {
94 this.sigfile = sigfile;
95 }
96
97 public void setTsaLocation( String tsaLocation )
98 {
99 this.tsaLocation = tsaLocation;
100 }
101
102 public void setTsaAlias( String tsaAlias )
103 {
104 this.tsaAlias = tsaAlias;
105 }
106
107 public File getSignedjar()
108 {
109 return signedjar;
110 }
111
112 public void setSignedjar( File signedjar )
113 {
114 this.signedjar = signedjar;
115 }
116
117 /**
118 * Sets certchain to be used.
119 *
120 * @param certchain Cert Chain file path or {@code null} to remove the option
121 * @since 3.0.0
122 */
123 public void setCertchain( File certchain )
124 {
125 this.certchain = certchain;
126 }
127
128 /**
129 * Get certificate chain.
130 * @return Path to the certificate chain file or {@code null} if undefined
131 */
132 public File getCertchain()
133 {
134 return certchain;
135 }
136 }