Class XMLDocumentValidator
java.lang.Object
eu.europa.esig.dss.validation.SignedDocumentValidator
eu.europa.esig.dss.xades.validation.XMLDocumentValidator
- All Implemented Interfaces:
DocumentValidator
,ProcessExecutorProvider<DocumentProcessExecutor>
Validator of XML Signed document
-
Field Summary
Modifier and TypeFieldDescriptionprotected Document
The root element of the document to validateprotected List<XAdESPaths>
This variable contains the list ofXAdESPaths
adapted to the specific signature schema.Fields inherited from class eu.europa.esig.dss.validation.SignedDocumentValidator
certificateVerifier, containerContents, detachedContents, document, manifestFile, processExecutor, signatureScopeFinder, signingCertificateSource, skipValidationContextExecution
-
Constructor Summary
ConstructorDescriptionXMLDocumentValidator
(DSSDocument dssDocument) The default constructor for XMLDocumentValidator. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addXAdESPathsHolder
(XAdESPaths xadesPathsHolder) This adds aXAdESPaths
.protected List<AdvancedSignature>
This method build a list of signatures to be extracted from a documentvoid
Removes all of the elements from the list of query holders.getOriginalDocuments
(AdvancedSignature advancedSignature) This method returns the signed document(s) without their signature(s)Returns the root element of the validating documentReturns an instance of a corresponding to the formatSignaturePolicyValidatorLoader
protected EncapsulatedTimestampScopeFinder
This method returns a timestamp scope finderThis getter returns theXAdESPaths
boolean
isSupported
(DSSDocument dssDocument) Checks if the document is supported by the current validatorvoid
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
addReference, appendCounterSignatures, assertConfigurationValid, buildDetachedTimestamps, createDiagnosticDataBuilder, findSignatureScopes, findTimestampScopes, fromDocument, getAllSignatures, getDefaultDigestAlgorithm, getDefaultProcessExecutor, getDetachedTimestamps, getDiagnosticData, getOriginalDocuments, getSignatureById, getSignaturePolicyProvider, getSignatures, getTimestampedReferences, getTokenIdentifierProvider, getValidationData, getValidationData, getValidationTime, initializeDiagnosticDataBuilder, instantiateValidationDataContainer, prepareDetachedTimestampValidationContext, prepareDiagnosticDataBuilder, prepareSignatureForVerification, prepareSignatureScopeFinder, prepareSignatureValidationContext, prepareTimestampScopeFinder, prepareValidationContext, processSignaturesValidation, processValidationPolicy, provideProcessExecutorInstance, setCertificateVerifier, setContainerContents, setDetachedContents, setEnableEtsiValidationReport, setIncludeSemantics, setLocale, setManifestFile, setProcessExecutor, setSignaturePolicyProvider, setSigningCertificateSource, setSkipValidationContextExecution, setTokenExtractionStrategy, setTokenIdentifierProvider, setValidationLevel, setValidationTime, validateContext, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument, validateDocument
-
Field Details
-
xadesPathsHolders
This variable contains the list ofXAdESPaths
adapted to the specific signature schema. -
rootElement
The root element of the document to validate
-
-
Constructor Details
-
XMLDocumentValidator
The default constructor for XMLDocumentValidator. The created instance is initialised with defaultXAdESPaths
.- Parameters:
dssDocument
- The instance ofDSSDocument
to validate
-
-
Method Details
-
isSupported
Description copied from class:SignedDocumentValidator
Checks if the document is supported by the current validator- Specified by:
isSupported
in classSignedDocumentValidator
- Parameters:
dssDocument
-DSSDocument
to check- Returns:
- TRUE if the document is supported, FALSE otherwise
-
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
-
buildSignatures
Description copied from class:SignedDocumentValidator
This method build a list of signatures to be extracted from a document- Overrides:
buildSignatures
in classSignedDocumentValidator
- Returns:
- a list of
AdvancedSignature
s
-
getOriginalDocuments
Description copied from interface:DocumentValidator
This method returns the signed document(s) without their signature(s)- Parameters:
advancedSignature
-AdvancedSignature
to find signer documents for- Returns:
- list of
DSSDocument
s
-
getXAdESPathsHolder
This getter returns theXAdESPaths
- Returns:
- a list of
XAdESPaths
-
addXAdESPathsHolder
This adds aXAdESPaths
. This is useful when the signature follows a particular schema.- Parameters:
xadesPathsHolder
-XAdESPaths
-
clearQueryHolders
public void clearQueryHolders()Removes all of the elements from the list of query holders. The list will be empty after this call returns. -
getRootElement
Returns the root element of the validating document- Returns:
Document
-
getSignaturePolicyValidatorLoader
Description copied from class:SignedDocumentValidator
Returns an instance of a corresponding to the formatSignaturePolicyValidatorLoader
- Overrides:
getSignaturePolicyValidatorLoader
in classSignedDocumentValidator
- Returns:
SignaturePolicyValidatorLoader
-
getTimestampScopeFinder
Description copied from class:SignedDocumentValidator
This method returns a timestamp scope finder- Overrides:
getTimestampScopeFinder
in classSignedDocumentValidator
- Returns:
TimestampScopeFinder
-