Interface TbsDocumentProcessor<T>
- Type Parameters:
T
- the type of documents handled by this processor
- All Superinterfaces:
DocumentProcessor<T>
- All Known Implementing Classes:
AbstractTbsDocumentProcessor
Interface for a processor of a "to be signed" document.
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Method Summary
Modifier and TypeMethodDescriptionpreProcess
(se.idsec.signservice.integration.document.TbsDocument document, se.idsec.signservice.integration.SignRequestInput signRequestInput, IntegrationServiceConfiguration config, DocumentCache documentCache, String callerId, String fieldName) Performs a pre-processing of the supplied document where the document is validated, and in some cases updated with default settings.se.swedenconnect.schemas.csig.dssext_1_1.SignTaskData
process
(ProcessedTbsDocument document, String signatureAlgorithm, IntegrationServiceConfiguration config) Prepares the document for signing by creating aSignTaskData
element.boolean
supports
(se.idsec.signservice.integration.document.TbsDocument document) Predicate that tells if the supplied document can be handled by this processor.Methods inherited from interface se.idsec.signservice.integration.document.DocumentProcessor
getDocumentDecoder, getDocumentEncoder
-
Method Details
-
supports
boolean supports(@Nonnull se.idsec.signservice.integration.document.TbsDocument document) Predicate that tells if the supplied document can be handled by this processor.- Parameters:
document
- the document- Returns:
- if the document can be processed by this instance true is returned, otherwise false
-
preProcess
ProcessedTbsDocument preProcess(se.idsec.signservice.integration.document.TbsDocument document, se.idsec.signservice.integration.SignRequestInput signRequestInput, IntegrationServiceConfiguration config, DocumentCache documentCache, String callerId, String fieldName) throws se.idsec.signservice.integration.core.error.InputValidationException Performs a pre-processing of the supplied document where the document is validated, and in some cases updated with default settings.- Parameters:
document
- the document to processsignRequestInput
- the sign request inputconfig
- the current policy configurationdocumentCache
- the document cachecallerId
- optional ID for the calling entityfieldName
- used for error reporting and logging- Returns:
- a processed (and possibly updated) document
- Throws:
se.idsec.signservice.integration.core.error.InputValidationException
- for validation errors
-
process
se.swedenconnect.schemas.csig.dssext_1_1.SignTaskData process(@Nonnull ProcessedTbsDocument document, @Nonnull String signatureAlgorithm, @Nonnull IntegrationServiceConfiguration config) throws DocumentProcessingException Prepares the document for signing by creating aSignTaskData
element.- Parameters:
document
- the document to signsignatureAlgorithm
- the signature algorithm to be used for signing the documentconfig
- profile configuration- Returns:
- a SignTaskData element
- Throws:
DocumentProcessingException
- for processing errors
-