Interface IValidationServiceClient
- All Known Implementing Classes:
ValidationServiceClient
public interface IValidationServiceClient
The main interface to the validation service. Use
ValidationServiceClientBuilder to get an implementation object
providing the interface.-
Method Summary
Modifier and TypeMethodDescriptionMandator[]getAllMandators(Locale locale) validateMultipleRequests(UserRequest request, boolean pdfReport) Same asvalidateMultipleRequests(UserRequest, boolean, boolean)with thedoLogsparameter set tofalse.validateMultipleRequests(UserRequest request, boolean pdfReport, boolean doLogs) Validates a list of signature entries, each in its own request to the validation service.validateOneRequest(List<FileRequest> filesToValidate, boolean pdfReport, String userOrganization, String userName, String language, String pdfReportName) Same asvalidateOneRequest(List, boolean, String, String, String, String, boolean, boolean)with thedoLogsandprocessUnsignedFilesparameters set tofalse.validateOneRequest(List<FileRequest> filesToValidate, boolean pdfReport, String userOrganization, String userName, String language, String pdfReportName, boolean doLogs) Same asvalidateOneRequest(List, boolean, String, String, String, String, boolean, boolean)with theprocessUnsignedFilesparameter set tofalse.validateOneRequest(List<FileRequest> filesToValidate, boolean pdfReport, String userOrganization, String userName, String language, String pdfReportName, boolean doLogs, boolean processUnsignedFiles) Validates a list of files in a single request to the validation service.validateOneRequestS(List<StreamRequest> filesToValidate, boolean pdfReport, String userOrganization, String userName, String language, String pdfReportName) Same asvalidateOneRequest(List, boolean, String, String, String, String, boolean, boolean)with thedoLogsandprocessUnsignedFilesparameters set tofalse.validateOneRequestS(List<StreamRequest> filesToValidate, boolean pdfReport, String userOrganization, String userName, String language, String pdfReportName, boolean doLogs) Same asvalidateOneRequest(List, boolean, String, String, String, String, boolean, boolean)with theprocessUnsignedFilesparameter set tofalse.validateOneRequestS(List<StreamRequest> filesToValidate, boolean pdfReport, String userOrganization, String userName, String language, String pdfReportName, boolean doLogs, boolean processUnsignedFiles) Validates a list of input streams in a single request to the validation service.validateOneSignature(byte[] fileToValidate, String client, boolean pdfReport, String sigName, String docName, String userOrganization, String userName, String language, String pdfReportName) Same asvalidateOneSignature(byte[], String, boolean, String, String, String, String, String, String, boolean)with thedoLogsparameter set tofalse.validateOneSignature(byte[] fileToValidate, String client, boolean pdfReport, String sigName, String docName, String userOrganization, String userName, String language, String pdfReportName, boolean doLogs) Validates a single signature entry in a file.validatePkcs7(org.bouncycastle.cms.CMSSignedData pkcs7, byte[] plainHash, String client) validatePkcs7(org.bouncycastle.cms.CMSSignedData pkcs7, byte[] plainHash, String client, boolean doLogs)
-
Method Details
-
getAllMandators
-
validateMultipleRequests
List<ValidationResponse> validateMultipleRequests(UserRequest request, boolean pdfReport) throws NoSuchAlgorithmException, IOException Same asvalidateMultipleRequests(UserRequest, boolean, boolean)with thedoLogsparameter set tofalse.- Parameters:
request- theUserRequestdata structure containing the signature entries to validatepdfReport- a flag specifying whether the validation service should generate and return a report in PDF format- Returns:
- a list of
ValidationResponsedata structures, one for each signature entry given - Throws:
NoSuchAlgorithmException- if the SHA-256 hash algorithm is not availableIOException- if the file given in therequestparameter cannot be read
-
validateMultipleRequests
List<ValidationResponse> validateMultipleRequests(UserRequest request, boolean pdfReport, boolean doLogs) throws NoSuchAlgorithmException, IOException Validates a list of signature entries, each in its own request to the validation service. The signature entries to validate are contained in the givenUserRequestdata structure.- Parameters:
request- the UserRequest data structure containing the signature entries to validatepdfReport- a flag specifying whether the validation service should generate and return a report in PDF formatdoLogs- a flag specifying whether the call should write details about the service input and results to the log- Returns:
- a list of
ValidationResponsedata structures, one for each signature entry given - Throws:
NoSuchAlgorithmException- if the SHA-256 hash algorithm is not availableIOException- if the file given in therequestparameter cannot be read
-
validateOneRequest
ValidationResponse validateOneRequest(List<FileRequest> filesToValidate, boolean pdfReport, String userOrganization, String userName, String language, String pdfReportName) throws NoSuchAlgorithmException, IOException, IllegalArgumentException Same asvalidateOneRequest(List, boolean, String, String, String, String, boolean, boolean)with thedoLogsandprocessUnsignedFilesparameters set tofalse.- Parameters:
filesToValidate- the list of files to validatepdfReport- a flag specifying whether the validation service should generate and return a report in PDF formatuserOrganization- theuserOrganizationproperty to pass to the validation serviceuserName- theuserOrganizationproperty to pass to the validation servicelanguage- thelanguageproperty to pass to the validation servicepdfReportName- thepdfReportNameproperty that should be echoed by the validation service- Returns:
- the
ValidationResponsedata structure created by the validation service - Throws:
NoSuchAlgorithmException- if the SHA-256 hash algorithm is not availableIOException- if one of the files given in thefilesToValidateparameter cannot be readIllegalArgumentException- if none of the files given in thefilesToValidateparameter contains a signature
-
validateOneRequest
ValidationResponse validateOneRequest(List<FileRequest> filesToValidate, boolean pdfReport, String userOrganization, String userName, String language, String pdfReportName, boolean doLogs) throws NoSuchAlgorithmException, IOException, IllegalArgumentException Same asvalidateOneRequest(List, boolean, String, String, String, String, boolean, boolean)with theprocessUnsignedFilesparameter set tofalse.- Parameters:
filesToValidate- the list of files to validatepdfReport- a flag specifying whether the validation service should generate and return a report in PDF formatuserOrganization- theuserOrganizationproperty to pass to the validation serviceuserName- theuserOrganizationproperty to pass to the validation servicelanguage- thelanguageproperty to pass to the validation servicepdfReportName- thepdfReportNameproperty that should be echoed by the validation servicedoLogs- a flag specifying whether the call should write details about the service input and results to the log- Returns:
- the
ValidationResponsedata structure created by the validation service - Throws:
NoSuchAlgorithmException- if the SHA-256 hash algorithm is not availableIOException- if one of the files given in thefilesToValidateparameter cannot be readIllegalArgumentException- if none of the files given in thefilesToValidateparameter contains a signature
-
validateOneRequest
ValidationResponse validateOneRequest(List<FileRequest> filesToValidate, boolean pdfReport, String userOrganization, String userName, String language, String pdfReportName, boolean doLogs, boolean processUnsignedFiles) throws NoSuchAlgorithmException, IOException, IllegalArgumentException Validates a list of files in a single request to the validation service.- Parameters:
filesToValidate- the list of files to validatepdfReport- a flag specifying whether the validation service should generate and return a report in PDF formatuserOrganization- theuserOrganizationproperty to pass to the validation serviceuserName- theuserOrganizationproperty to pass to the validation servicelanguage- thelanguageproperty to pass to the validation servicepdfReportName- thepdfReportNameproperty that should be echoed by the validation servicedoLogs- a flag specifying whether the call should write details about the service input and results to the logprocessUnsignedFiles- a flag specifying whether files not containing a signature should be processed by the validation service- Returns:
- the
ValidationResponsedata structure created by the validation service - Throws:
NoSuchAlgorithmException- if the SHA-256 hash algorithm is not availableIOException- if one of the files given in thefilesToValidateparameter cannot be readIllegalArgumentException- if theprocessUnsignedFilesparameter isfalsenone of the files given in thefilesToValidateparameter contains a signature
-
validateOneRequestS
ValidationResponse validateOneRequestS(List<StreamRequest> filesToValidate, boolean pdfReport, String userOrganization, String userName, String language, String pdfReportName) throws NoSuchAlgorithmException, FileNotFoundException, IOException, IllegalArgumentException Same asvalidateOneRequest(List, boolean, String, String, String, String, boolean, boolean)with thedoLogsandprocessUnsignedFilesparameters set tofalse.- Parameters:
filesToValidate- the list of input streams to validatepdfReport- a flag specifying whether the validation service should generate and return a report in PDF formatuserOrganization- theuserOrganizationproperty to pass to the validation serviceuserName- theuserOrganizationproperty to pass to the validation servicelanguage- thelanguageproperty to pass to the validation servicepdfReportName- thepdfReportNameproperty that should be echoed by the validation service- Returns:
- the
ValidationResponsedata structure created by the validation service - Throws:
NoSuchAlgorithmException- if the SHA-256 hash algorithm is not availableIOException- if one of the input streams given in thefilesToValidateparameter cannot be readIllegalArgumentException- if none of the input streams given in thefilesToValidateparameter contains a signatureFileNotFoundException
-
validateOneRequestS
ValidationResponse validateOneRequestS(List<StreamRequest> filesToValidate, boolean pdfReport, String userOrganization, String userName, String language, String pdfReportName, boolean doLogs) throws NoSuchAlgorithmException, FileNotFoundException, IOException, IllegalArgumentException Same asvalidateOneRequest(List, boolean, String, String, String, String, boolean, boolean)with theprocessUnsignedFilesparameter set tofalse.- Parameters:
filesToValidate- the list of input streams to validatepdfReport- a flag specifying whether the validation service should generate and return a report in PDF formatuserOrganization- theuserOrganizationproperty to pass to the validation serviceuserName- theuserOrganizationproperty to pass to the validation servicelanguage- thelanguageproperty to pass to the validation servicepdfReportName- thepdfReportNameproperty that should be echoed by the validation servicedoLogs- a flag specifying whether the call should write details about the service input and results to the log- Returns:
- the
ValidationResponsedata structure created by the validation service - Throws:
NoSuchAlgorithmException- if the SHA-256 hash algorithm is not availableIOException- if one of the input streams given in thefilesToValidateparameter cannot be readIllegalArgumentException- if none of the input streams given in thefilesToValidateparameter contains a signatureFileNotFoundException
-
validateOneRequestS
ValidationResponse validateOneRequestS(List<StreamRequest> filesToValidate, boolean pdfReport, String userOrganization, String userName, String language, String pdfReportName, boolean doLogs, boolean processUnsignedFiles) throws NoSuchAlgorithmException, FileNotFoundException, IOException, IllegalArgumentException Validates a list of input streams in a single request to the validation service.- Parameters:
filesToValidate- the list of input streams to validatepdfReport- a flag specifying whether the validation service should generate and return a report in PDF formatuserOrganization- theuserOrganizationproperty to pass to the validation serviceuserName- theuserOrganizationproperty to pass to the validation servicelanguage- thelanguageproperty to pass to the validation servicepdfReportName- thepdfReportNameproperty that should be echoed by the validation servicedoLogs- a flag specifying whether the call should write details about the service input and results to the logprocessUnsignedFiles- a flag specifying whether files not containing a signature should be processed by the validation service- Returns:
- the
ValidationResponsedata structure created by the validation service - Throws:
NoSuchAlgorithmException- if the SHA-256 hash algorithm is not availableIOException- if one of the input streams given in thefilesToValidateparameter cannot be readIllegalArgumentException- if theprocessUnsignedFilesparameter isfalsenone of the input streams given in thefilesToValidateparameter contains a signatureFileNotFoundException
-
validateOneSignature
ValidationResponse validateOneSignature(byte[] fileToValidate, String client, boolean pdfReport, String sigName, String docName, String userOrganization, String userName, String language, String pdfReportName) throws NoSuchAlgorithmException, IOException Same asvalidateOneSignature(byte[], String, boolean, String, String, String, String, String, String, boolean)with thedoLogsparameter set tofalse.- Parameters:
fileToValidate- the data containing the signature to validateclient- theclientproperty to pass to the validation servicepdfReport- a flag specifying whether the validation service should generate and return a report in PDF formatsigName- the name of the signature to extract from the given file and validatedocName- the name of the given fileuserOrganization- theuserOrganizationproperty to pass to the validation serviceuserName- theuserOrganizationproperty to pass to the validation servicelanguage- thelanguageproperty to pass to the validation servicepdfReportName- thepdfReportNameproperty that should be echoed by the validation service- Returns:
- the
ValidationResponsedata structure created by the validation service - Throws:
NoSuchAlgorithmException- if the SHA-256 hash algorithm is not availableIOException
-
validateOneSignature
ValidationResponse validateOneSignature(byte[] fileToValidate, String client, boolean pdfReport, String sigName, String docName, String userOrganization, String userName, String language, String pdfReportName, boolean doLogs) throws NoSuchAlgorithmException, IOException Validates a single signature entry in a file.- Parameters:
fileToValidate- the data containing the signature to validateclient- theclientproperty to pass to the validation servicepdfReport- a flag specifying whether the validation service should generate and return a report in PDF formatsigName- the name of the signature to extract from the given file and validatedocName- the name of the given fileuserOrganization- theuserOrganizationproperty to pass to the validation serviceuserName- theuserOrganizationproperty to pass to the validation servicelanguage- thelanguageproperty to pass to the validation servicepdfReportName- thepdfReportNameproperty that should be echoed by the validation servicedoLogs- a flag specifying whether the call should write details about the service input and results to the log- Returns:
- the
ValidationResponsedata structure created by the validation service - Throws:
NoSuchAlgorithmException- if the SHA-256 hash algorithm is not availableIOException
-
validatePkcs7
ValidationResponse validatePkcs7(org.bouncycastle.cms.CMSSignedData pkcs7, byte[] plainHash, String client) throws IOException - Throws:
IOException
-
validatePkcs7
ValidationResponse validatePkcs7(org.bouncycastle.cms.CMSSignedData pkcs7, byte[] plainHash, String client, boolean doLogs) throws IOException - Throws:
IOException
-