Class PreparedPdfDocument
- All Implemented Interfaces:
Serializable
,Extensible
PreparedPdfDocument
is the representation of the object that is returned from
ExtendedSignServiceIntegrationService.preparePdfSignaturePage(String, byte[], PdfSignaturePagePreferences)
.
The preparePdfSignaturePage
method is used to setup a PDF document along with its visible signature
requirements (VisiblePdfSignatureRequirement
) before
SignServiceIntegrationService.createSignRequest(se.idsec.signservice.integration.SignRequestInput)
is called.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder forPreparedPdfDocument
objects. -
Constructor Summary
ConstructorDescriptionPreparedPdfDocument
(String policy, String updatedPdfDocument, String updatedPdfDocumentReference, VisiblePdfSignatureRequirement visiblePdfSignatureRequirement, Extension extension) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Returns the extension parameters for the instance.The policy under which the data held in this class may be used.If the PDF document passed toExtendedSignServiceIntegrationService.preparePdfSignaturePage(String, byte[], PdfSignaturePagePreferences)
was updated with a PDF signature page this property holds the updated PDf document (in its Base64 encoded form).IfPdfSignaturePagePreferences.getReturnDocumentReference()
istrue
the updated document will be returned as a reference instead of via agetUpdatedPdfDocument()
call.The resultingVisiblePdfSignatureRequirement
object that should be passed as a property in theTbsDocument
holding the PDF document that is passed toSignServiceIntegrationService.createSignRequest(se.idsec.signservice.integration.SignRequestInput)
.void
setExtension
(Extension extension) Assigns the extension parameters for the instance.void
The policy under which the data held in this class may be used.void
setUpdatedPdfDocument
(String updatedPdfDocument) If the PDF document passed toExtendedSignServiceIntegrationService.preparePdfSignaturePage(String, byte[], PdfSignaturePagePreferences)
was updated with a PDF signature page this property holds the updated PDf document (in its Base64 encoded form).void
setUpdatedPdfDocumentReference
(String updatedPdfDocumentReference) IfPdfSignaturePagePreferences.getReturnDocumentReference()
istrue
the updated document will be returned as a reference instead of via agetUpdatedPdfDocument()
call.void
setVisiblePdfSignatureRequirement
(VisiblePdfSignatureRequirement visiblePdfSignatureRequirement) The resultingVisiblePdfSignatureRequirement
object that should be passed as a property in theTbsDocument
holding the PDF document that is passed toSignServiceIntegrationService.createSignRequest(se.idsec.signservice.integration.SignRequestInput)
.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface se.idsec.signservice.integration.core.Extensible
addExtensionValue, getExtensionValue
-
Constructor Details
-
PreparedPdfDocument
public PreparedPdfDocument() -
PreparedPdfDocument
public PreparedPdfDocument(String policy, String updatedPdfDocument, String updatedPdfDocumentReference, VisiblePdfSignatureRequirement visiblePdfSignatureRequirement, Extension extension)
-
-
Method Details
-
getExtension
Returns the extension parameters for the instance.- Specified by:
getExtension
in interfaceExtensible
- Returns:
- the extension, or
null
if no extensions are set
-
setExtension
Assigns the extension parameters for the instance.- Specified by:
setExtension
in interfaceExtensible
- Parameters:
extension
- the extension
-
builder
-
toString
-
setPolicy
The policy under which the data held in this class may be used. This is always the same as the policy given in the call toExtendedSignServiceIntegrationService.preparePdfSignaturePage(String, byte[], PdfSignaturePagePreferences)
.- Parameters:
policy
- the policy
-
getPolicy
The policy under which the data held in this class may be used. This is always the same as the policy given in the call toExtendedSignServiceIntegrationService.preparePdfSignaturePage(String, byte[], PdfSignaturePagePreferences)
.- Returns:
- the policy
-
setUpdatedPdfDocument
If the PDF document passed toExtendedSignServiceIntegrationService.preparePdfSignaturePage(String, byte[], PdfSignaturePagePreferences)
was updated with a PDF signature page this property holds the updated PDf document (in its Base64 encoded form).If the property is
null
it means that the PDF document was not modified bypreparePdfSignaturePage
.Note: This property is only assigned if
PdfSignaturePagePreferences.getReturnDocumentReference()
isfalse
. If document references should be used the reference for the updated document is obtained by callinggetUpdatedPdfDocumentReference()
.- Parameters:
updatedPdfDocument
- updated PDF document (in Base64 encoded form)
-
getUpdatedPdfDocument
If the PDF document passed toExtendedSignServiceIntegrationService.preparePdfSignaturePage(String, byte[], PdfSignaturePagePreferences)
was updated with a PDF signature page this property holds the updated PDf document (in its Base64 encoded form).If the property is
null
it means that the PDF document was not modified bypreparePdfSignaturePage
.Note: This property is only assigned if
PdfSignaturePagePreferences.getReturnDocumentReference()
isfalse
. If document references should be used the reference for the updated document is obtained by callinggetUpdatedPdfDocumentReference()
.- Returns:
- the updated PDF document (in Base64 encoded form) or null if the initial PDF document was not updated or if document references are used
-
setUpdatedPdfDocumentReference
IfPdfSignaturePagePreferences.getReturnDocumentReference()
istrue
the updated document will be returned as a reference instead of via agetUpdatedPdfDocument()
call. The reason for using document references is that a potentially heavy document only has to be uploaded once. Later when including the document in a call toSignServiceIntegrationService.createSignRequest(se.idsec.signservice.integration.SignRequestInput)
the reference is set inTbsDocument.setContentReference(String)
.Note: If document references are used a reference is set in all cases (even if no update of the document was necessary).
- Parameters:
updatedPdfDocumentReference
- reference to the updated document
-
getUpdatedPdfDocumentReference
IfPdfSignaturePagePreferences.getReturnDocumentReference()
istrue
the updated document will be returned as a reference instead of via agetUpdatedPdfDocument()
call. The reason for using document references is that a potentially heavy document only has to be uploaded once. Later when including the document in a call toSignServiceIntegrationService.createSignRequest(se.idsec.signservice.integration.SignRequestInput)
the reference is set inTbsDocument.setContentReference(String)
.Note: If document references are used a reference is set in all cases (even if no update of the document was necessary).
- Returns:
- reference to the updated document or null
-
setVisiblePdfSignatureRequirement
public void setVisiblePdfSignatureRequirement(VisiblePdfSignatureRequirement visiblePdfSignatureRequirement) The resultingVisiblePdfSignatureRequirement
object that should be passed as a property in theTbsDocument
holding the PDF document that is passed toSignServiceIntegrationService.createSignRequest(se.idsec.signservice.integration.SignRequestInput)
.- Parameters:
visiblePdfSignatureRequirement
- a VisiblePdfSignatureRequirement object to be used in a TbsDocument for the PDF document that is about to be signed with a signature image
-
getVisiblePdfSignatureRequirement
The resultingVisiblePdfSignatureRequirement
object that should be passed as a property in theTbsDocument
holding the PDF document that is passed toSignServiceIntegrationService.createSignRequest(se.idsec.signservice.integration.SignRequestInput)
.- Returns:
- a VisiblePdfSignatureRequirement object to be used in a TbsDocument for the PDF document that is about to be signed with a signature image
-