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 classBuilder forPreparedPdfDocumentobjects. -
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 thereturnDocumentReferenceparameter 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 resultingVisiblePdfSignatureRequirementobject that should be passed as a property in theTbsDocumentholding the PDF document that is passed toSignServiceIntegrationService.createSignRequest(se.idsec.signservice.integration.SignRequestInput).voidsetExtension(Extension extension) Assigns the extension parameters for the instance.voidsetPdfDocumentReference(String pdfDocumentReference) If the service is running in stateful mode and the call toExtendedSignServiceIntegrationService.preparePdfDocument(String, byte[], PdfSignaturePagePreferences, Boolean, String)was made with thereturnDocumentReferenceparameter set, this field will hold the reference to the PDF document stored by the service.voidAssigns the policy under which the data held in this class may be used.voidsetPrepareReport(PdfPrepareReport prepareReport) Assigns the actions and warnings for the operation.voidsetUpdatedPdfDocument(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).voidsetUpdatedPdfDocumentReference(String pdfDocumentReference) Deprecated, for removal: This API element is subject to removal in a future version.voidsetVisiblePdfSignatureRequirement(VisiblePdfSignatureRequirement visiblePdfSignatureRequirement) Assigns the resultingVisiblePdfSignatureRequirementobject that should be passed as a property in theTbsDocumentholding 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, waitMethods 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
nullit means that the PDF document was not modified by thepreparePdfDocumentmethod.- Returns:
- the updated PDF document (in Base64 encoded form) or
nullif 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
nullit means that the PDF document was not modified by thepreparePdfDocumentmethod.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 thereturnDocumentReferenceparameter 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 thereturnDocumentReferenceparameter 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 thereturnDocumentReferenceparameter 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 resultingVisiblePdfSignatureRequirementobject that should be passed as a property in theTbsDocumentholding 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
nullif no sign image is being used
-
setVisiblePdfSignatureRequirement
public void setVisiblePdfSignatureRequirement(@Nonnull VisiblePdfSignatureRequirement visiblePdfSignatureRequirement) Assigns the resultingVisiblePdfSignatureRequirementobject that should be passed as a property in theTbsDocumentholding 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
nullif 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:
getExtensionin interfaceExtensible- Returns:
- the extension, or
nullif no extensions are set
-
setExtension
Assigns the extension parameters for the instance.- Specified by:
setExtensionin interfaceExtensible- Parameters:
extension- the extension
-