View Javadoc
1   /*
2    * Copyright (C) 2021, Thomas Wolf <thomas.wolf@paranor.ch> and others
3    *
4    * This program and the accompanying materials are made available under the
5    * terms of the Eclipse Distribution License v. 1.0 which is available at
6    * https://www.eclipse.org/org/documents/edl-v10.php.
7    *
8    * SPDX-License-Identifier: BSD-3-Clause
9    */
10  package org.eclipse.jgit.api;
11  
12  import org.eclipse.jgit.lib.GpgSignatureVerifier;
13  import org.eclipse.jgit.revwalk.RevObject;
14  
15  /**
16   * A {@code VerificationResult} describes the outcome of a signature
17   * verification.
18   *
19   * @see VerifySignatureCommand
20   *
21   * @since 5.11
22   */
23  public interface VerificationResult {
24  
25  	/**
26  	 * If an error occurred during signature verification, this retrieves the
27  	 * exception.
28  	 *
29  	 * @return the exception, or {@code null} if none occurred
30  	 */
31  	Throwable getException();
32  
33  	/**
34  	 * Retrieves the signature verification result.
35  	 *
36  	 * @return the result, or {@code null} if none was computed
37  	 */
38  	GpgSignatureVerifier.SignatureVerification getVerification();
39  
40  	/**
41  	 * Retrieves the git object of which the signature was verified.
42  	 *
43  	 * @return the git object
44  	 */
45  	RevObject getObject();
46  }