Class SignaturePolicy
java.lang.Object
eu.europa.esig.dss.model.signature.SignaturePolicy
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
XAdESSignaturePolicy
Represents the values of a SignaturePolicy extracted on a signature validation
- 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 verifiedGets validation result of the signature policyboolean
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
setValidationResult
(SignaturePolicyValidationResult validationResult) Sets the signature policy's validation resultvoid
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
-
setDescription
-
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
-
setDigest
-
getDocumentationReferences
-
setDocumentationReferences
-
getTransformsDescription
-
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
-
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
-
getValidationResult
Gets validation result of the signature policy- Returns:
SignaturePolicyValidationResult
-
setValidationResult
Sets the signature policy's validation result- Parameters:
validationResult
-SignaturePolicyValidationResult
-