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.StreamConsumer;
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.html 885985 2013-11-09 08:11:31Z tchemit $
31 * @since 1.0
32 */
33 public interface JarSignerRequest
34 {
35
36 /**
37 * Gets the value of the {@code verbose} field.
38 *
39 * @return the value of the {@code verbose} field.
40 */
41
42 boolean isVerbose();
43
44 /**
45 * Gets the value of the {@code maxMemory} field.
46 *
47 * @return the value of the {@code maxMemory} field.
48 */
49 String getMaxMemory();
50
51 /**
52 * Gets the value of the {@code maxMemory} field.
53 *
54 * @return the value of the {@code maxMemory} field.
55 */
56 String[] getArguments();
57
58 /**
59 * Gets the value of the {@code workingDirectory} field.
60 *
61 * @return the value of the {@code workingDirectory} field.
62 */
63 File getWorkingDirectory();
64
65 /**
66 * Gets the value of the {@code archive} field.
67 * <p/>
68 * The archive field is in fact the file on which the jarsigner request will be executed.
69 *
70 * @return the value of the {@code archive} field.
71 */
72 File getArchive();
73
74 /**
75 * Gets the value of the {@code systemOutStreamConsumer} field.
76 * <p/>
77 * This option field if filled is used by the commandline tool to consume system ouput stream of the jarsigner
78 * command.
79 *
80 * @return the value of the {@code systemOutStreamConsumer} field.
81 */
82 StreamConsumer getSystemOutStreamConsumer();
83
84 /**
85 * Gets the value of the {@code systemErrorStreamConsumer} field.
86 * <p/>
87 * This option field if filled is used by the commandline tool to consume system error stream of the jarsigner
88 * command.
89 *
90 * @return the value of the {@code systemErrorStreamConsumer} field.
91 */
92 StreamConsumer getSystemErrorStreamConsumer();
93
94 /**
95 * Sets the new given value to the field {@code verbose} of the request.
96 *
97 * @param verbose the new value of the field {@code verbose}.
98 */
99 void setVerbose( boolean verbose );
100
101 /**
102 * Sets the new given value to the field {@code maxMemory} of the request.
103 *
104 * @param maxMemory the new value of the field {@code maxMemory}.
105 */
106 void setMaxMemory( String maxMemory );
107
108 /**
109 * Sets the new given value to the field {@code arguments} of the request.
110 *
111 * @param arguments the new value of the field {@code arguments}.
112 */
113 void setArguments( String[] arguments );
114
115 /**
116 * Sets the new given value to the field {@code workingDirectory} of the request.
117 *
118 * @param workingDirectory the new value of the field {@code workingDirectory}.
119 */
120 void setWorkingDirectory( File workingDirectory );
121
122 /**
123 * Sets the new given value to the field {@code archive} of the request.
124 *
125 * @param archive the new value of the field {@code archive}.
126 */
127 void setArchive( File archive );
128
129 /**
130 * Sets the new given value to the field {@code systemOutStreamConsumer} of the request.
131 *
132 * @param systemOutStreamConsumer the new value of the field {@code systemOutStreamConsumer}.
133 */
134 void setSystemOutStreamConsumer( StreamConsumer systemOutStreamConsumer );
135
136 /**
137 * Sets the new given value to the field {@code systemErrorStreamConsumer} of the request.
138 *
139 * @param systemErrorStreamConsumer the new value of the field {@code systemErrorStreamConsumer}.
140 */
141 void setSystemErrorStreamConsumer( StreamConsumer systemErrorStreamConsumer );
142
143
144 }