Package eu.europa.esig.dss.validation
Class SignaturePolicy
java.lang.Object
eu.europa.esig.dss.validation.SignaturePolicy
public class SignaturePolicy extends Object
Represents the value of a SignaturePolicy
-
Constructor Summary
Constructors Constructor Description SignaturePolicy()The default constructor for SignaturePolicy.SignaturePolicy(String identifier)The default constructor for SignaturePolicy. -
Method Summary
Modifier and Type Method Description StringgetDescription()Gets descriptionDigestgetDigest()Gets theDigestList<String>getDocumentationReferences()Gets the documentation references NOTE: optional, used in XAdESStringgetIdentifier()Returns the signature policy identifierStringgetNotice()Gets user notice that should be displayed when the signature is verifiedDSSDocumentgetPolicyContent()Returns a DSSDocument with the signature policy contentElementgetTransforms()Returns a 'ds:Tranforms' element if found NOTE: XAdES onlyList<String>getTransformsDescription()Gets a list of Strings describing the 'ds:Tranforms' element NOTE: XAdES onlyStringgetUrl()Returns the signature policy url (if found)booleanisZeroHash()Gets if the policy is a zero-hash (no hash check shall be performed)voidsetDescription(String description)Sets description (*optional)voidsetDigest(Digest digest)Sets theDigestvoidsetDocumentationReferences(List<String> documentationReferences)Sets the documentation referencesvoidsetNotice(String notice)Sets user notice that should be displayed when the signature is verifiedvoidsetPolicyContent(DSSDocument policyContent)Sets policy document contentvoidsetTransforms(Element transforms)Sets a 'ds:Tranforms' nodevoidsetTransformsDescription(List<String> transformsDescription)Sets a list of Strings describing the 'ds:Tranforms' elementvoidsetUrl(String url)Sets the signature policy urlvoidsetZeroHash(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
-
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
-
getDigest
Gets theDigest- Returns:
Digest
-
setDigest
Sets theDigest- Parameters:
digest-Digest
-
getUrl
Returns the signature policy url (if found)- Returns:
- the url of the signature policy (or null if not available information)
-
setUrl
Sets the signature policy url- Parameters:
url- signature policy url
-
getDescription
Gets description- Returns:
String
-
setDescription
Sets description (*optional)- Parameters:
description-String
-
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
-
getTransforms
Returns a 'ds:Tranforms' element if found NOTE: XAdES only- Returns:
- 'ds:Tranforms'
Elementif found, NULL otherwise
-
setTransforms
Sets a 'ds:Tranforms' node- Parameters:
transforms-Element
-
getTransformsDescription
Gets a list of Strings describing the 'ds:Tranforms' element NOTE: XAdES only- Returns:
- a description of 'ds:Tranforms' if present, null otherwise
-
setTransformsDescription
Sets a list of Strings describing the 'ds:Tranforms' element- Parameters:
transformsDescription- a list of Strings describing the 'ds:Transforms' element
-
getNotice
Gets user notice that should be displayed when the signature is verified- Returns:
String
-
setNotice
Sets user notice that should be displayed when the signature is verified- Parameters:
notice-Stringuser notice
-
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
-