org.faceless.pdf2.viewer2
Class SignatureProvider.SignatureState

java.lang.Object
  extended by org.faceless.pdf2.viewer2.SignatureProvider.SignatureState
Direct Known Subclasses:
KeyStoreSignatureProvider.X509SignatureState
Enclosing class:
SignatureProvider

public class SignatureProvider.SignatureState
extends Object

A SignatureState contains information about a FormSignature once it's been verified. This is used to display information about the signatures in the dialog displayed by showVerifyDialog(), and to determine which Icon to display on any visual representation of the Signature in the PDF (see SignatureProvider.getIcon(org.faceless.pdf2.viewer2.DocumentPanel, org.faceless.pdf2.FormSignature)). Subclasses of SignatureState may extend this class to store additional information if necessary.


Constructor Summary
SignatureProvider.SignatureState(FormSignature sig, Boolean validity, String reason, boolean alteredsince, Exception exception)
          Create a new SignatureState
 
Method Summary
 Exception getException()
          Return the Exception that occurred when trying to verify the signature or certificate, or null if none was thrown.
 ImageIcon getIcon()
          Return an Icon that visually represents the state of the signature.
 String getReason()
          Return the descriptive text describing this state
 FormSignature getSignature()
          Return the signature itself
 SignatureProvider getSignatureProvider()
          Return the SignatureProvider that verified the Signature and created this SignatureState object.
 Boolean getValidity()
          Return the validity of the Signature.
 boolean isAlteredSince()
          Return true of the PDF has been altered since the signature was applied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignatureProvider.SignatureState

public SignatureProvider.SignatureState(FormSignature sig,
                                        Boolean validity,
                                        String reason,
                                        boolean alteredsince,
                                        Exception exception)
Create a new SignatureState

Parameters:
sig - the signature
validity - Boolean.TRUE, Boolean.FALSE or null to indicate the signature is valid, invalid or hasn't be validated
reason - the reason for signing
alteredsince - whether the PDF has been altered since the signature was applied
exception - the exception encountered during validation, or null if it succeeded
Method Detail

getValidity

public Boolean getValidity()
Return the validity of the Signature. Boolean.TRUE for valid, Boolean.FALSE for invalid or null for unknown validity.


getReason

public String getReason()
Return the descriptive text describing this state


isAlteredSince

public boolean isAlteredSince()
Return true of the PDF has been altered since the signature was applied. Only useful if getValidity() returns True.


getException

public Exception getException()
Return the Exception that occurred when trying to verify the signature or certificate, or null if none was thrown.


getSignature

public FormSignature getSignature()
Return the signature itself


getSignatureProvider

public SignatureProvider getSignatureProvider()
Return the SignatureProvider that verified the Signature and created this SignatureState object.


getIcon

public ImageIcon getIcon()
Return an Icon that visually represents the state of the signature. This will be displayed in the DocumentPanel and in the dialog displayed by showVerifyDialog()



Copyright © 2001-2014 Big Faceless Organization