at.gv.egiz.pdfas.impl.api.commons
Class SignatureInformationAdapter

java.lang.Object
  extended byat.gv.egiz.pdfas.impl.api.commons.SignatureInformationAdapter
All Implemented Interfaces:
SignatureInformation
Direct Known Subclasses:
VerifyResultAdapter

public class SignatureInformationAdapter
extends Object
implements SignatureInformation

Adapter that converts a framework SignatureHolder to an API SignatureInformation.

Author:
wprinz

Field Summary
protected  List nonTextualObjects
           
protected  SignatureHolder signatureHolder
          The framework SignatureHolder to be adapted to an API SignatureInformation.
protected  String timeStamp
           
 
Constructor Summary
SignatureInformationAdapter(SignatureHolder signatureHolder)
          Constructor.
 
Method Summary
 Object getInternalSignatureInformation()
          Returns additional, internal information about the found signature.
 List getNonTextualObjects()
          Returns a list<NonTextObjectInfo> of non textual objects in the pdf document.
 String getSignatureType()
          Returns the type of this signature (binary/textual).
 DataSource getSignedData()
          Returns the DataSource providing the data that was signed.
 X509Certificate getSignerCertificate()
          Returns the certificate of the signer.
 Date getSigningTime()
          Returns the signing time, which is the time when the signature was created.
 String getTimeStampValue()
          Returns the embedded /TimeStamp value (b64 encoded) from the signature if available.
 boolean hasNonTextualObjects()
          Returns true if non textual objects have been found, false if not.
 void setNonTextualObjects(List nonTextualObjects)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

signatureHolder

protected SignatureHolder signatureHolder
The framework SignatureHolder to be adapted to an API SignatureInformation.


timeStamp

protected String timeStamp

nonTextualObjects

protected List nonTextualObjects
Constructor Detail

SignatureInformationAdapter

public SignatureInformationAdapter(SignatureHolder signatureHolder)
Constructor.

Parameters:
signatureHolder - The framework SignatureHolder to be adapted to an API SignatureInformation.
Method Detail

getSignedData

public DataSource getSignedData()
Description copied from interface: SignatureInformation
Returns the DataSource providing the data that was signed.

Note that this is the signed data as sent to the verification device by PDF-AS. The verification device (e.g. MOA) may perform several other transformations on the data before feeding it to the signature hash function. To get the actual hashed data use the ReturnHashInputData mechanism (which is very slow).

Specified by:
getSignedData in interface SignatureInformation
Returns:
Returns the DataSource providing the data that was signed.
See Also:
SignatureInformation.getSignedData()

getInternalSignatureInformation

public Object getInternalSignatureInformation()
Description copied from interface: SignatureInformation
Returns additional, internal information about the found signature.

Note that this provides a way for developers to gather core information about the signature. What information is returned strongly depends on the core implementation.

Specified by:
getInternalSignatureInformation in interface SignatureInformation
Returns:
Returns additional, internal information about the signature. Null means that no additional information is available.
See Also:
SignatureInformation.getInternalSignatureInformation()

getSignatureType

public String getSignatureType()
Description copied from interface: SignatureInformation
Returns the type of this signature (binary/textual).

May be Constants.SIGNATURE_TYPE_BINARY or Constants.SIGNATURE_TYPE_TEXTUAL.

Specified by:
getSignatureType in interface SignatureInformation
Returns:
Returns the type of this signature (binary/textual).
See Also:
SignatureInformation.getSignatureType()

getSignerCertificate

public X509Certificate getSignerCertificate()
Description copied from interface: SignatureInformation
Returns the certificate of the signer.

Information like subject name, issuer name or serial number can be retrieved form this certificate.

Specified by:
getSignerCertificate in interface SignatureInformation
Returns:
Returns the certificate of the signer.
See Also:
SignatureInformation.getSignerCertificate()

getSigningTime

public Date getSigningTime()
Description copied from interface: SignatureInformation
Returns the signing time, which is the time when the signature was created.

Specified by:
getSigningTime in interface SignatureInformation
Returns:
Returns the signing time, which is the time when the signature was created.
See Also:
SignatureInformation.getSigningTime()

getTimeStampValue

public String getTimeStampValue()
Description copied from interface: SignatureInformation
Returns the embedded /TimeStamp value (b64 encoded) from the signature if available.

Specified by:
getTimeStampValue in interface SignatureInformation
Returns:

getNonTextualObjects

public List getNonTextualObjects()
Description copied from interface: SignatureInformation
Returns a list<NonTextObjectInfo> of non textual objects in the pdf document. Only available for textual signatures. Show this to the user who signed the textual content only!

Specified by:
getNonTextualObjects in interface SignatureInformation
Returns:
List<NonTextObjectInfo or null of not available (binary signature)

hasNonTextualObjects

public boolean hasNonTextualObjects()
Description copied from interface: SignatureInformation
Returns true if non textual objects have been found, false if not.

Specified by:
hasNonTextualObjects in interface SignatureInformation
Returns:
true if non textual objects have been found, false if not.

setNonTextualObjects

public void setNonTextualObjects(List nonTextualObjects)
Specified by:
setNonTextualObjects in interface SignatureInformation


Copyright © 2006-2010. All Rights Reserved.