Package eu.europa.esig.dss.validation
Class SignaturePolicy
java.lang.Object
eu.europa.esig.dss.validation.SignaturePolicy
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
XAdESSignaturePolicy
Represents the values of a SignaturePolicy
- See Also:
-
Constructor Summary
ConstructorDescriptionThe default constructor for SignaturePolicy.SignaturePolicy
(String identifier) The default constructor for SignaturePolicy. -
Method Summary
Modifier and TypeMethodDescriptionGets descriptionGets theDigest
Gets the Document Specification Qualifier when presentGets the documentation references NOTE: optional, used in XAdESReturns the signature policy identifierReturns a DSSDocument with the signature policy contentGets a list of Strings describing the 'ds:Transforms' element NOTE: XAdES onlygetUri()
Returns the signature policy URI (if found)Gets user notice that should be displayed when the signature is verifiedboolean
Gets if the digest should be computed as specified in the relevant technical specificationboolean
Gets if the policy is a zero-hash (no hash check shall be performed)void
setDescription
(String description) Sets description (*optional)void
Sets theDigest
void
setDocSpecification
(SpDocSpecification docSpecification) Sets the Document Specification qualifiervoid
setDocumentationReferences
(List<String> documentationReferences) Sets the documentation referencesvoid
setHashAsInTechnicalSpecification
(boolean hashAsInTechnicalSpecification) Sets should the digest be computed as specified in a corresponding technical specificationvoid
setPolicyContent
(DSSDocument policyContent) Sets policy document contentvoid
Sets the signature policy URIvoid
setUserNotice
(UserNotice userNotice) Sets user notice that should be displayed when the signature is verifiedvoid
setZeroHash
(boolean zeroHash) Sets if the policy is a zero-hash (no hash check shall be performed)
-
Constructor Details
-
SignaturePolicy
public SignaturePolicy()The default constructor for SignaturePolicy. It represents the implied policy. -
SignaturePolicy
The default constructor for SignaturePolicy.- Parameters:
identifier
- the policy identifier
-
-
Method Details
-
getIdentifier
Returns the signature policy identifier- Returns:
- the signature policy identifier
-
getDescription
Gets description- Returns:
String
-
setDescription
Sets description (*optional)- Parameters:
description
-String
-
getPolicyContent
Returns a DSSDocument with the signature policy content- Returns:
- a DSSDocument which contains the signature policy
-
setPolicyContent
Sets policy document content- Parameters:
policyContent
-DSSDocument
-
getDigest
Gets theDigest
- Returns:
Digest
-
setDigest
Sets theDigest
- Parameters:
digest
-Digest
-
getDocumentationReferences
Gets the documentation references NOTE: optional, used in XAdES- Returns:
- a list of
String
documentation references
-
setDocumentationReferences
Sets the documentation references- Parameters:
documentationReferences
- a list ofString
documentation references
-
getTransformsDescription
Gets a list of Strings describing the 'ds:Transforms' element NOTE: XAdES only- Returns:
- a description of 'ds:Transforms' if present, null otherwise
-
isZeroHash
public boolean isZeroHash()Gets if the policy is a zero-hash (no hash check shall be performed)- Returns:
- TRUE if the policy is a zero-hash, FALSE otherwise
-
setZeroHash
public void setZeroHash(boolean zeroHash) Sets if the policy is a zero-hash (no hash check shall be performed)- Parameters:
zeroHash
- if the policy is a zero-hash
-
isHashAsInTechnicalSpecification
public boolean isHashAsInTechnicalSpecification()Gets if the digest should be computed as specified in the relevant technical specification- Returns:
- TRUE if the digest should be computed as specified in the relevant technical specification, FALSE otherwise
-
setHashAsInTechnicalSpecification
public void setHashAsInTechnicalSpecification(boolean hashAsInTechnicalSpecification) Sets should the digest be computed as specified in a corresponding technical specification- Parameters:
hashAsInTechnicalSpecification
- should the digest be computed as in technical specification
-
getUri
Returns the signature policy URI (if found)- Returns:
- the URI of the signature policy (or null if not available information)
-
setUri
Sets the signature policy URI- Parameters:
uri
- signature policy URI
-
getUserNotice
Gets user notice that should be displayed when the signature is verified- Returns:
String
-
setUserNotice
Sets user notice that should be displayed when the signature is verified- Parameters:
userNotice
-UserNotice
user notice
-
getDocSpecification
Gets the Document Specification Qualifier when present- Returns:
SpDocSpecification
-
setDocSpecification
Sets the Document Specification qualifier- Parameters:
docSpecification
-SpDocSpecification
-