Package eu.europa.esig.dss.validation
Class SignaturePolicy
java.lang.Object
eu.europa.esig.dss.validation.SignaturePolicy
- All Implemented Interfaces:
Serializable
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 descriptioneu.europa.esig.dss.model.DigestGets theDigesteu.europa.esig.dss.model.SpDocSpecificationGets the Document Specification Qualifier when presentGets the documentation references NOTE: optional, used in XAdESReturns the signature policy identifiereu.europa.esig.dss.model.DSSDocumentReturns 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)eu.europa.esig.dss.model.UserNoticeGets 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)voidsetDigest(eu.europa.esig.dss.model.Digest digest) Sets theDigestvoidsetDocSpecification(eu.europa.esig.dss.model.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(eu.europa.esig.dss.model.DSSDocument policyContent) Sets policy document contentvoidSets the signature policy URIvoidsetUserNotice(eu.europa.esig.dss.model.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
public eu.europa.esig.dss.model.DSSDocument getPolicyContent()Returns a DSSDocument with the signature policy content- Returns:
- a DSSDocument which contains the signature policy
-
setPolicyContent
public void setPolicyContent(eu.europa.esig.dss.model.DSSDocument policyContent) Sets policy document content- Parameters:
policyContent-DSSDocument
-
getDigest
public eu.europa.esig.dss.model.Digest getDigest()Gets theDigest- Returns:
Digest
-
setDigest
public void setDigest(eu.europa.esig.dss.model.Digest digest) 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
public eu.europa.esig.dss.model.UserNotice getUserNotice()Gets user notice that should be displayed when the signature is verified- Returns:
String
-
setUserNotice
public void setUserNotice(eu.europa.esig.dss.model.UserNotice userNotice) Sets user notice that should be displayed when the signature is verified- Parameters:
userNotice-UserNoticeuser notice
-
getDocSpecification
public eu.europa.esig.dss.model.SpDocSpecification getDocSpecification()Gets the Document Specification Qualifier when present- Returns:
SpDocSpecification
-
setDocSpecification
public void setDocSpecification(eu.europa.esig.dss.model.SpDocSpecification docSpecification) Sets the Document Specification qualifier- Parameters:
docSpecification-SpDocSpecification
-