Class XMLDocumentValidator

java.lang.Object
eu.europa.esig.dss.validation.SignedDocumentValidator
eu.europa.esig.dss.xades.validation.XMLDocumentValidator
All Implemented Interfaces:
eu.europa.esig.dss.validation.DocumentValidator, eu.europa.esig.dss.validation.executor.ProcessExecutorProvider<eu.europa.esig.dss.validation.executor.DocumentProcessExecutor>

public class XMLDocumentValidator extends eu.europa.esig.dss.validation.SignedDocumentValidator
Validator of XML Signed document

In order to perform validation-process, please ensure the `dss-validation` module is loaded within the dependencies list of your project.

  • Field Summary

    Fields inherited from class eu.europa.esig.dss.validation.SignedDocumentValidator

    documentAnalyzer, processExecutor
  • Constructor Summary

    Constructors
    Constructor
    Description
    XMLDocumentValidator(eu.europa.esig.dss.model.DSSDocument dssDocument)
    The default constructor for XMLDocumentValidator.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addXAdESPathsHolder(XAdESPath xadesPathsHolder)
    This adds a XAdESPaths.
    void
    Removes all elements from the list of query holders.
     
    Returns the root element of the validating document
    This getter returns the XAdESPaths
    void
    setDisableXSWProtection(boolean disableXSWProtection)
    NOT RECOMMENDED : This parameter allows disabling protection against XML Signature wrapping attacks (XSW).

    Methods inherited from class eu.europa.esig.dss.validation.SignedDocumentValidator

    assertConfigurationValid, fromDocument, getDefaultProcessExecutor, getDetachedEvidenceRecords, getDetachedTimestamps, getDiagnosticData, getOriginalDocuments, getOriginalDocuments, getSignatureById, getSignatures, getValidationData, getValidationData, initializeDiagnosticDataBuilder, isSupported, loadValidationPolicy, processValidationPolicy, provideProcessExecutorInstance, setCertificateVerifier, setContainerContents, setDefaultDigestAlgorithm, setDetachedContents, setDetachedEvidenceRecordDocuments, setEnableEtsiValidationReport, setIncludeSemantics, setLocale, setManifestFile, setProcessExecutor, setSignaturePolicyProvider, setSigningCertificateSource, setTokenExtractionStrategy, setTokenIdentifierProvider, setValidationContextExecutor, setValidationLevel, setValidationTime, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument

    Methods inherited from class java.lang.Object

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

    • XMLDocumentValidator

      public XMLDocumentValidator(eu.europa.esig.dss.model.DSSDocument dssDocument)
      The default constructor for XMLDocumentValidator. The created instance is initialised with default XAdESPaths .
      Parameters:
      dssDocument - The instance of DSSDocument to validate
  • Method Details

    • getDocumentAnalyzer

      public XMLDocumentAnalyzer getDocumentAnalyzer()
      Overrides:
      getDocumentAnalyzer in class eu.europa.esig.dss.validation.SignedDocumentValidator
    • setDisableXSWProtection

      public void setDisableXSWProtection(boolean disableXSWProtection)
      NOT RECOMMENDED : This parameter allows disabling protection against XML Signature wrapping attacks (XSW). It disables the research by XPath expression for defined Type attributes.
      Parameters:
      disableXSWProtection - true to disable the protection
    • getXAdESPathsHolder

      public List<XAdESPath> getXAdESPathsHolder()
      This getter returns the XAdESPaths
      Returns:
      a list of XAdESPath
    • addXAdESPathsHolder

      public void addXAdESPathsHolder(XAdESPath xadesPathsHolder)
      This adds a XAdESPaths. This is useful when the signature follows a particular schema.
      Parameters:
      xadesPathsHolder - XAdESPath
    • clearQueryHolders

      public void clearQueryHolders()
      Removes all elements from the list of query holders. The list will be empty after this call returns.
    • getRootElement

      public Document getRootElement()
      Returns the root element of the validating document
      Returns:
      Document