|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.qoppa.pdf.SignatureValidity
public class SignatureValidity
This class returns information about the validity of a signature within the PDF document.
To determine whether a signature is completely valid, the host application can call the
isAllValid() method. If isAllValid returns false, the application can call isValidWithWarning() to
determine if the signature is valid but has warnings or isNotValid() to determine if the signature
is not valid at all.
The host application can use any of the is...() methods to determine the cause of the signature
status and it can also call getValidityText() to get a textual description of the signature status.
| Constructor Summary | |
|---|---|
SignatureValidity()
|
|
| Method Summary | |
|---|---|
void |
drawSmallIcon(Graphics2D g2d)
Draws a small icon that reflects the validity state of the signature. |
Throwable |
getException()
Returns any exception when reading the signature. |
String |
getExceptionMessage()
Returns a message associated with an exception when reading the signature. |
Icon |
getLargeIcon()
Returns an Icon that will draw the status of the signature with the same rules as drawSmallIcon(). |
Icon |
getSmallIcon()
|
List |
getValidationMessages()
|
String |
getValidityText()
Returns a textual description of the state of the signature. |
boolean |
isAllValid()
Checks if the signature is completely valid. |
boolean |
isContentAppended()
Gets a flag that indicates if there has been any content appended to this PDF. |
boolean |
isNotValid()
This method checks if the signature is considered NOT VALID. |
boolean |
isTested()
Returns a flag indicating if this signature has been tested. |
boolean |
isTrustedChain()
Gets the value of the trusted chain flag. |
boolean |
isTSTrustedChain()
Returns whether the TSA certificate chain is trusted. |
boolean |
isTSValid()
If there is a time stamp token, returns whether it is valid. |
boolean |
isTSValidCertificate()
If there is a time stamp token, returns whether its certificate is valid. |
boolean |
isValidCertificateChain()
Returns the status of the certificate chain validity. |
boolean |
isValidExpiration()
Gets the value of the valid expiration flag. |
boolean |
isValidKeyUsage()
Returns whether the key usage is valid. |
boolean |
isValidRevocationList()
Returns the status of the revocation list validity. |
boolean |
isValidSignatureHash()
Returns a flag indicating whether the stored signature hash matches the calculated signature hash. |
boolean |
isValidSignatureObject()
Gets a flag that indicates whether the signature object was readable. |
boolean |
isValidTimestamp()
Returns a flag indicating whether the signature has a valid timestamp. |
boolean |
isValidWithWarning()
Returns true if the signature is considered valid but has warnings associated with it. |
void |
setContentAppended(boolean contentAppended)
Sets the content appended flag. |
void |
setException(Throwable t,
String msg)
Sets the exception when reading the signature. |
void |
setTested(boolean tested)
Sets flag indicating that this signature has been tested. |
void |
setTrustedChain(boolean trustedChain)
Sets the value of the trusted chain flag. |
void |
setTSTrustedChain(boolean tsTrustedChain)
Sets the flag to indicate if the TSA certificate chain is trusted. |
void |
setTSValid(boolean valid)
Sets the flag to indicate that if a time stamp is present, if it is valid |
void |
setTSValidCertificate(boolean valid)
Sets the flag to indicate that if a time stamp is present that its certificate is valid. |
void |
setValidCertificateChain(boolean validCertificateChain)
Sets the status of the certificate chain validity. |
void |
setValidExpiration(boolean validExpiration)
Sets the value of the expiration flag. |
void |
setValidKeyUsage(boolean validKeyUsage)
Sets the flag to indicate that the key usage is valid. |
void |
setValidRevocationList(boolean validRevocationList)
Sets the status of the revocation list validity. |
void |
setValidSignatureHash(boolean validSignatureHash)
Sets the flag that indicates that the stored signature hash matches the calculated signature hash. |
void |
setValidSignatureObject(boolean validSignatureObject)
Sets the value of the valid signature object flag. |
void |
setValidTimestamp(boolean validTimestamp)
Sets the valid timestamp flag. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SignatureValidity()
| Method Detail |
|---|
public boolean isValidCertificateChain()
public void setValidCertificateChain(boolean validCertificateChain)
validCertificateChain - The status of the certificate chain validity.public boolean isValidRevocationList()
public void setValidRevocationList(boolean validRevocationList)
validRevocationList - The status of the revocation list validity.public boolean isValidSignatureHash()
public void setValidSignatureHash(boolean validSignatureHash)
validSignatureHash - Whether the signature hashes match.public boolean isValidTimestamp()
public void setValidTimestamp(boolean validTimestamp)
validTimestamp - The new value of the valid timestamp flag.public boolean isAllValid()
public boolean isValidWithWarning()
public boolean isNotValid()
public boolean isValidExpiration()
public void setValidExpiration(boolean validExpiration)
validExpiration - The new value of the expiration flag.public boolean isTrustedChain()
public void setTrustedChain(boolean trustedChain)
trustedChain - The new value of the trusted chain flag.public void drawSmallIcon(Graphics2D g2d)
g2d - The graphics object on which to draw the icon.public Icon getLargeIcon()
public Icon getSmallIcon()
public String getValidityText()
public List getValidationMessages()
public boolean isValidSignatureObject()
public void setValidSignatureObject(boolean validSignatureObject)
validSignatureObject - The new value of the valid signature object flag.public String getExceptionMessage()
public Throwable getException()
public void setException(Throwable t,
String msg)
t - The exception.msg - Any message associated with the exception.public boolean isTested()
public void setTested(boolean tested)
tested - The new value of the tested flag.public boolean isContentAppended()
public void setContentAppended(boolean contentAppended)
contentAppended - The new value of the content appended flag.public void setTSValid(boolean valid)
valid - public boolean isTSValid()
public void setTSValidCertificate(boolean valid)
valid - public boolean isTSValidCertificate()
public void setValidKeyUsage(boolean validKeyUsage)
validKeyUsage - public boolean isValidKeyUsage()
public void setTSTrustedChain(boolean tsTrustedChain)
public boolean isTSTrustedChain()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||