Class PreparedPdfDocument
- All Implemented Interfaces:
Serializable
,Extensible
PreparedPdfDocument
is the representation of the object that is returned from
ExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)
.
The preparePdfSignaturePage
method is used to set up a PDF document along with its visible signature
requirements (VisiblePdfSignatureRequirement
) before
SignServiceIntegrationService.createSignRequest(se.idsec.signservice.integration.SignRequestInput)
is
called.
The preparePdfSignaturePage
method may also be called without sign pages in order to validate and potentially
fix the document before it is signed.
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder forPreparedPdfDocument
objects. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the extension parameters for the instance.If the service is running in stateful mode and the call toExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)
was made with thereturnDocumentReference
parameter set, this field will hold the reference to the PDF document stored by the service.Gets the policy under which the data held in this class may be used.Gets the actions and warnings for the operation.If the PDF document passed toExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)
was updated this property holds the updated PDf document (in its Base64 encoded form).Deprecated.Gets 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
setPdfDocumentReference
(String pdfDocumentReference) If the service is running in stateful mode and the call toExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)
was made with thereturnDocumentReference
parameter set, this field will hold the reference to the PDF document stored by the service.void
Assigns the policy under which the data held in this class may be used.void
setPrepareReport
(PdfPrepareReport prepareReport) Assigns the actions and warnings for the operation.void
setUpdatedPdfDocument
(String updatedPdfDocument) If the PDF document passed toExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)
was updated this property holds the updated PDf document (in its Base64 encoded form).void
setUpdatedPdfDocumentReference
(String pdfDocumentReference) Deprecated, for removal: This API element is subject to removal in a future version.void
setVisiblePdfSignatureRequirement
(VisiblePdfSignatureRequirement visiblePdfSignatureRequirement) Assigns 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)
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface se.idsec.signservice.integration.core.Extensible
addExtensionValue, getExtensionValue
-
Constructor Details
-
PreparedPdfDocument
public PreparedPdfDocument()
-
-
Method Details
-
getPolicy
Gets 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.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)
.- Returns:
- the policy
-
setPolicy
Assigns the policy under which the data held in this class may be used.- Parameters:
policy
- the policy
-
getUpdatedPdfDocument
If the PDF document passed toExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)
was updated 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 by thepreparePdfDocument
method.- 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
-
setUpdatedPdfDocument
If the PDF document passed toExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)
was updated 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 by thepreparePdfDocument
method.Note: This property should only assigned if the service is running in stateful mode and the call to
ExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)
was made with thereturnDocumentReference
parameter set.- Parameters:
updatedPdfDocument
- updated PDF document (in Base64 encoded form)
-
getPdfDocumentReference
If the service is running in stateful mode and the call toExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)
was made with thereturnDocumentReference
parameter set, this field will hold the reference to the PDF document stored by the service.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
-
getUpdatedPdfDocumentReference
Deprecated. -
setPdfDocumentReference
If the service is running in stateful mode and the call toExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)
was made with thereturnDocumentReference
parameter set, this field will hold the reference to the PDF document stored by the service.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 to
SignServiceIntegrationService.createSignRequest(se.idsec.signservice.integration.SignRequestInput)
the reference is set inTbsDocument.setContentReference(String)
.- Parameters:
pdfDocumentReference
- reference to the updated document
-
setUpdatedPdfDocumentReference
@Deprecated(forRemoval=true) public void setUpdatedPdfDocumentReference(@Nonnull String pdfDocumentReference) Deprecated, for removal: This API element is subject to removal in a future version. -
getVisiblePdfSignatureRequirement
Gets 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, or
null
if no sign image is being used
-
setVisiblePdfSignatureRequirement
public void setVisiblePdfSignatureRequirement(@Nonnull VisiblePdfSignatureRequirement visiblePdfSignatureRequirement) Assigns 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
-
getPrepareReport
Gets the actions and warnings for the operation.- Returns:
- the actions and warnings for the operation, or
null
if nothing needs to be reported
-
setPrepareReport
Assigns the actions and warnings for the operation.- Parameters:
prepareReport
- the actions and warnings for the operation
-
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
-