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.CommandLineException; 23 import org.apache.maven.shared.utils.cli.Commandline; 24 25 /** 26 * Describes the result of a JarSigner invocation. 27 * 28 * @author tchemit <chemit@codelutin.com> 29 * @version $Id: DefaultJarSignerResult.html 885985 2013-11-09 08:11:31Z tchemit $ 30 * @since 1.0 31 */ 32 public class DefaultJarSignerResult 33 implements JarSignerResult 34 { 35 36 /** 37 * The exception that prevented to execute the command line, will be <code>null</code> if jarSigner could be 38 * successfully started. 39 */ 40 private CommandLineException executionException; 41 42 /** 43 * The exit code reported by the Maven invocation. 44 */ 45 private int exitCode = Integer.MIN_VALUE; 46 47 private Commandline commandline; 48 49 /** 50 * Creates a new invocation result 51 */ 52 DefaultJarSignerResult() 53 { 54 // hide constructor 55 } 56 57 public int getExitCode() 58 { 59 return exitCode; 60 } 61 62 public Commandline getCommandline() 63 { 64 return commandline; 65 } 66 67 public CommandLineException getExecutionException() 68 { 69 return executionException; 70 } 71 72 /** 73 * Sets the exit code reported by the Jarsigner invocation. 74 * 75 * @param exitCode The exit code reported by the JarSigner invocation. 76 */ 77 void setExitCode( int exitCode ) 78 { 79 this.exitCode = exitCode; 80 } 81 82 /** 83 * Sets the exception that prevented to execute the command line. 84 * 85 * @param executionException The exception that prevented to execute the command line, may be <code>null</code>. 86 */ 87 void setExecutionException( CommandLineException executionException ) 88 { 89 this.executionException = executionException; 90 } 91 92 void setCommandline( Commandline commandline ) 93 { 94 this.commandline = commandline; 95 } 96 }