Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AbstractJarSignerRequest |
|
| 1.0;1 |
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.codehaus.plexus.util.cli.StreamConsumer; | |
23 | ||
24 | import java.io.File; | |
25 | ||
26 | /** | |
27 | * Specifies the commons parameters used to control a jar signer invocation. | |
28 | * | |
29 | * @author tchemit <chemit@codelutin.com> | |
30 | * @version $Id: AbstractJarSignerRequest.java 1195496 2011-10-31 15:00:50Z olamy $ | |
31 | * @since 1.0 | |
32 | */ | |
33 | 3 | public abstract class AbstractJarSignerRequest |
34 | implements JarSignerRequest | |
35 | { | |
36 | /** | |
37 | * See <a href="http://java.sun.com/javase/6/docs/technotes/tools/windows/jarsigner.html#Options">options</a>. | |
38 | */ | |
39 | private boolean verbose; | |
40 | ||
41 | /** | |
42 | * The maximum memory available to the JAR signer, e.g. <code>256M</code>. See <a | |
43 | * href="http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html#Xms">-Xmx</a> for more details. | |
44 | */ | |
45 | private String maxMemory; | |
46 | ||
47 | /** | |
48 | * List of additional arguments to append to the jarsigner command line. | |
49 | */ | |
50 | private String[] arguments; | |
51 | ||
52 | /** | |
53 | * Location of the working directory. | |
54 | */ | |
55 | private File workingDirectory; | |
56 | ||
57 | /** | |
58 | * Archive to treat. | |
59 | */ | |
60 | private File archive; | |
61 | ||
62 | /** | |
63 | * Optional system out stream consumer used by the commandline execution. | |
64 | */ | |
65 | private StreamConsumer systemOutStreamConsumer; | |
66 | ||
67 | /** | |
68 | * Optional system error stream consumer used by the commandline execution. | |
69 | */ | |
70 | private StreamConsumer systemErrorStreamConsumer; | |
71 | ||
72 | public boolean isVerbose() | |
73 | { | |
74 | 6 | return verbose; |
75 | } | |
76 | ||
77 | public String getMaxMemory() | |
78 | { | |
79 | 3 | return maxMemory; |
80 | } | |
81 | ||
82 | public String[] getArguments() | |
83 | { | |
84 | 3 | return arguments; |
85 | } | |
86 | ||
87 | public File getWorkingDirectory() | |
88 | { | |
89 | 3 | return workingDirectory; |
90 | } | |
91 | ||
92 | public File getArchive() | |
93 | { | |
94 | 3 | return archive; |
95 | } | |
96 | ||
97 | public StreamConsumer getSystemOutStreamConsumer() | |
98 | { | |
99 | 3 | return systemOutStreamConsumer; |
100 | } | |
101 | ||
102 | public StreamConsumer getSystemErrorStreamConsumer() | |
103 | { | |
104 | 3 | return systemErrorStreamConsumer; |
105 | } | |
106 | ||
107 | public void setVerbose( boolean verbose ) | |
108 | { | |
109 | 3 | this.verbose = verbose; |
110 | 3 | } |
111 | ||
112 | public void setMaxMemory( String maxMemory ) | |
113 | { | |
114 | 0 | this.maxMemory = maxMemory; |
115 | 0 | } |
116 | ||
117 | public void setArguments( String[] arguments ) | |
118 | { | |
119 | 0 | this.arguments = arguments; |
120 | 0 | } |
121 | ||
122 | public void setWorkingDirectory( File workingDirectory ) | |
123 | { | |
124 | 0 | this.workingDirectory = workingDirectory; |
125 | 0 | } |
126 | ||
127 | public void setArchive( File archive ) | |
128 | { | |
129 | 3 | this.archive = archive; |
130 | 3 | } |
131 | ||
132 | public void setSystemOutStreamConsumer( StreamConsumer systemOutStreamConsumer ) | |
133 | { | |
134 | 0 | this.systemOutStreamConsumer = systemOutStreamConsumer; |
135 | 0 | } |
136 | ||
137 | public void setSystemErrorStreamConsumer( StreamConsumer systemErrorStreamConsumer ) | |
138 | { | |
139 | 0 | this.systemErrorStreamConsumer = systemErrorStreamConsumer; |
140 | 0 | } |
141 | } |