You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VerificationResult.java 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. import org.eclipse.jgit.lib.GpgSignatureVerifier;
  12. import org.eclipse.jgit.revwalk.RevObject;
  13. /**
  14. * A {@code VerificationResult} describes the outcome of a signature
  15. * verification.
  16. *
  17. * @see VerifySignatureCommand
  18. *
  19. * @since 5.11
  20. */
  21. public interface VerificationResult {
  22. /**
  23. * If an error occurred during signature verification, this retrieves the
  24. * exception.
  25. *
  26. * @return the exception, or {@code null} if none occurred
  27. */
  28. Throwable getException();
  29. /**
  30. * Retrieves the signature verification result.
  31. *
  32. * @return the result, or {@code null} if none was computed
  33. */
  34. GpgSignatureVerifier.SignatureVerification getVerification();
  35. /**
  36. * Retrieves the git object of which the signature was verified.
  37. *
  38. * @return the git object
  39. */
  40. RevObject getObject();
  41. }