Class SignatureProvider.SignatureState

    • Constructor Detail

      • SignatureState

        public SignatureState​(FormSignature sig)
        Create a new SignatureState
        Parameters:
        sig - the signature
    • Method Detail

      • initialize

        public void initialize​(Boolean validity,
                               String reason,
                               boolean alteredsince,
                               Exception exception)
        Initialize the SignatureState. This method is called immediately after the constructor
        Parameters:
        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
        Since:
        2.28.7 - prior to that these properties were set in the constructor
      • 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