uk.me.nxg.xoxa.gpg
Class GPGInformation

java.lang.Object
  extended by uk.me.nxg.xoxa.gpg.GPGInformation

public class GPGInformation
extends Object

Manage the status information returned by GPG.


Nested Class Summary
static class GPGInformation.Action
          Indicates the various actions that the GPG processor can perform
static class GPGInformation.KeyStatus
          Indicates the various status that a key can have.
static class GPGInformation.Validity
          Indicates different levels of GPG signature validity.
 
Method Summary
 GPGInformation.Action getAction()
          Obtain the GPG action which this information object is associated with.
 String getKeyFingerprint()
          Obtains the key fingerprint
 String getSignature()
          Obtain the ASCII-armoured signature.
 Date getSignatureDate()
          Obtains the date when the signature was made
 String getSignatureKeyId()
          Obtain the ID of the key associated with the signature.
 String getSignatureName()
          Obtain the name associated with the signature, either the name of the signature which is being verified, or else the name associated with the signature which was added.
 GPGInformation.KeyStatus getSignatureStatus()
          Obtains information about the validity of the key which was used to make the signature.
 String getStderr()
          Obtains any information which the call to GPG wrote to stderr.
 GPGInformation.Validity getValidity()
          Obtain information about the validity of the signature
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAction

public GPGInformation.Action getAction()
Obtain the GPG action which this information object is associated with. This is an instance of GPGInformation.Action.

Returns:
one of the valid actinos

getStderr

public String getStderr()
Obtains any information which the call to GPG wrote to stderr. If there was none, or if this is unavailable for some reason, then this will be null.

Returns:
stderr string

getSignatureName

public String getSignatureName()
Obtain the name associated with the signature, either the name of the signature which is being verified, or else the name associated with the signature which was added.

Returns:
the name associated with the signature

getSignatureKeyId

public String getSignatureKeyId()
Obtain the ID of the key associated with the signature.

Returns:
the key ID

getSignatureStatus

public GPGInformation.KeyStatus getSignatureStatus()
Obtains information about the validity of the key which was used to make the signature.

Returns:
the key status

getSignature

public String getSignature()
Obtain the ASCII-armoured signature. This is a GPG signature block, so is surrounded by the usual ----BEGIN/END PGP SIGNATURE----- blocks.

Returns:
a signature contained in a string

getValidity

public GPGInformation.Validity getValidity()
Obtain information about the validity of the signature

Returns:
signature validity

getKeyFingerprint

public String getKeyFingerprint()
Obtains the key fingerprint

Returns:
key fingerprint

getSignatureDate

public Date getSignatureDate()
Obtains the date when the signature was made

Returns:
signature date


Copyright © 2015. All rights reserved.