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
ConstructorsConstructorDescriptionThe default constructor for SignaturePolicy.SignaturePolicy(String identifier) The default constructor for SignaturePolicy. -
Method Summary
Modifier and TypeMethodDescriptionGets descriptionGets theDigestGets 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 verifiedbooleanGets if the digest should be computed as specified in the relevant technical specificationbooleanGets if the policy is a zero-hash (no hash check shall be performed)voidsetDescription(String description) Sets description (*optional)voidSets theDigestvoidsetDocSpecification(SpDocSpecification docSpecification) Sets the Document Specification qualifiervoidsetDocumentationReferences(List<String> documentationReferences) Sets the documentation referencesvoidsetHashAsInTechnicalSpecification(boolean hashAsInTechnicalSpecification) Sets should the digest be computed as specified in a corresponding technical specificationvoidsetPolicyContent(DSSDocument policyContent) Sets policy document contentvoidSets the signature policy URIvoidsetUserNotice(UserNotice userNotice) Sets user notice that should be displayed when the signature is verifiedvoidsetZeroHash(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
Stringdocumentation references
-
setDocumentationReferences
Sets the documentation references- Parameters:
documentationReferences- a list ofStringdocumentation 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-UserNoticeuser notice
-
getDocSpecification
Gets the Document Specification Qualifier when present- Returns:
SpDocSpecification
-
setDocSpecification
Sets the Document Specification qualifier- Parameters:
docSpecification-SpDocSpecification
-