Class PreparedPdfDocument.PreparedPdfDocumentBuilder
java.lang.Object
se.idsec.signservice.integration.document.pdf.PreparedPdfDocument.PreparedPdfDocumentBuilder
- All Implemented Interfaces:
ObjectBuilder<PreparedPdfDocument>
- Enclosing class:
- PreparedPdfDocument
public static class PreparedPdfDocument.PreparedPdfDocumentBuilder
extends Object
implements ObjectBuilder<PreparedPdfDocument>
Builder for
PreparedPdfDocument
objects.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the object.Extensions for the object.The policy under which the data held in this class may be used.toString()
updatedPdfDocument
(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).updatedPdfDocumentReference
(String updatedPdfDocumentReference) IfPdfSignaturePagePreferences.getReturnDocumentReference()
istrue
the updated document will be returned as a reference instead of via aPreparedPdfDocument.getUpdatedPdfDocument()
call.visiblePdfSignatureRequirement
(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)
.
-
Method Details
-
policy
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- Returns:
this
.
-
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).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 callingPreparedPdfDocument.getUpdatedPdfDocumentReference()
.- Parameters:
updatedPdfDocument
- updated PDF document (in Base64 encoded form)- Returns:
this
.
-
updatedPdfDocumentReference
public PreparedPdfDocument.PreparedPdfDocumentBuilder updatedPdfDocumentReference(String updatedPdfDocumentReference) IfPdfSignaturePagePreferences.getReturnDocumentReference()
istrue
the updated document will be returned as a reference instead of via aPreparedPdfDocument.getUpdatedPdfDocument()
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- Returns:
this
.
-
visiblePdfSignatureRequirement
public PreparedPdfDocument.PreparedPdfDocumentBuilder visiblePdfSignatureRequirement(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- Returns:
this
.
-
extension
Extensions for the object.- Returns:
this
.
-
build
Description copied from interface:ObjectBuilder
Builds the object.- Specified by:
build
in interfaceObjectBuilder<PreparedPdfDocument>
- Returns:
- the object
-
toString
-