Class RemoteDocumentValidationService

java.lang.Object
eu.europa.esig.dss.ws.validation.common.RemoteDocumentValidationService

public class RemoteDocumentValidationService extends Object
The remote validation service
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default construction instantiating object with null certificate verifier
  • Method Summary

    Modifier and Type
    Method
    Description
    List<eu.europa.esig.dss.ws.dto.RemoteDocument>
    getOriginalDocuments(eu.europa.esig.dss.ws.validation.dto.DataToValidateDTO dataToValidate)
    Gets the original documents
    protected eu.europa.esig.dss.validation.SignedDocumentValidator
    initValidator(eu.europa.esig.dss.ws.validation.dto.DataToValidateDTO dataToValidate)
    Instantiates a SignedDocumentValidator based on the request data DTO
    void
    setDefaultValidationPolicy(eu.europa.esig.dss.model.policy.ValidationPolicy validationPolicy)
    Sets the validation policy to be used by default, when no policy provided within the request
    void
    Sets the validation policy to be used by default, when no policy provided within the request
    void
    setDefaultValidationPolicy(InputStream validationPolicy, InputStream cryptographicSuite)
    Sets the validation policy with a custom cryptographic suite to be used by default, when no policy provided within the request.
    void
    setVerifier(eu.europa.esig.dss.spi.validation.CertificateVerifier verifier)
    Sets the certificate verifier
    eu.europa.esig.dss.ws.validation.dto.WSReportsDTO
    validateDocument(eu.europa.esig.dss.ws.validation.dto.DataToValidateDTO dataToValidate)
    Validates the document

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RemoteDocumentValidationService

      public RemoteDocumentValidationService()
      Default construction instantiating object with null certificate verifier
  • Method Details

    • setVerifier

      public void setVerifier(eu.europa.esig.dss.spi.validation.CertificateVerifier verifier)
      Sets the certificate verifier
      Parameters:
      verifier - CertificateVerifier
    • setDefaultValidationPolicy

      public void setDefaultValidationPolicy(InputStream validationPolicy)
      Sets the validation policy to be used by default, when no policy provided within the request
      Parameters:
      validationPolicy - InputStream
    • setDefaultValidationPolicy

      public void setDefaultValidationPolicy(InputStream validationPolicy, InputStream cryptographicSuite)
      Sets the validation policy with a custom cryptographic suite to be used by default, when no policy provided within the request. If cryptographic suite is set, the constraints from validation policy will be overwritten by the constraints retrieved from the cryptographic suite. When set, the cryptographic suite constraints are applied with the default behavior, using FAIL level. For a customizable cryptographic suite and its applicability context, please use eu.europa.esig.dss.validation.policy.ValidationPolicyLoader.

      The format of validation policy should correspond to the DSS XML Validation policy (please include 'dss-policy-jaxb' module in your classpath), unless a custom validation policy has been implemented. The format of cryptographic suite should correspond to XML or JSON schema as defined in ETSI TS 119 322 (please include 'dss-policy-crypto-xml' or 'dss-policy-crypto-json' to the classpath), unless a custom cryptographic suite has been implemented.

      The InputStream parameters contains the constraint files. If null the default file is used.

      Parameters:
      validationPolicy - InputStream
      cryptographicSuite - InputStream
    • setDefaultValidationPolicy

      public void setDefaultValidationPolicy(eu.europa.esig.dss.model.policy.ValidationPolicy validationPolicy)
      Sets the validation policy to be used by default, when no policy provided within the request
      Parameters:
      validationPolicy - ValidationPolicy
    • validateDocument

      public eu.europa.esig.dss.ws.validation.dto.WSReportsDTO validateDocument(eu.europa.esig.dss.ws.validation.dto.DataToValidateDTO dataToValidate)
      Validates the document
      Parameters:
      dataToValidate - DataToValidateDTO the request
      Returns:
      WSReportsDTO response
    • getOriginalDocuments

      public List<eu.europa.esig.dss.ws.dto.RemoteDocument> getOriginalDocuments(eu.europa.esig.dss.ws.validation.dto.DataToValidateDTO dataToValidate)
      Gets the original documents
      Parameters:
      dataToValidate - DataToValidateDTO request
      Returns:
      a list of RemoteDocuments
    • initValidator

      protected eu.europa.esig.dss.validation.SignedDocumentValidator initValidator(eu.europa.esig.dss.ws.validation.dto.DataToValidateDTO dataToValidate)
      Instantiates a SignedDocumentValidator based on the request data DTO
      Parameters:
      dataToValidate - DataToValidateDTO representing the request data
      Returns:
      SignedDocumentValidator