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 String
getDescription()
Gets descriptionDigest
getDigest()
Gets theDigest
List<String>
getDocumentationReferences()
Gets the documentation references NOTE: optional, used in XAdESString
getIdentifier()
Returns the signature policy identifierString
getNotice()
Gets user notice that should be displayed when the signature is verifiedDSSDocument
getPolicyContent()
Returns a DSSDocument with the signature policy contentElement
getTransforms()
Returns a 'ds:Tranforms' element if found NOTE: XAdES onlyList<String>
getTransformsDescription()
Gets a list of Strings describing the 'ds:Tranforms' element NOTE: XAdES onlyString
getUrl()
Returns the signature policy url (if found)boolean
isZeroHash()
Gets if the policy is a zero-hash (no hash check shall be performed)void
setDescription(String description)
Sets description (*optional)void
setDigest(Digest digest)
Sets theDigest
void
setDocumentationReferences(List<String> documentationReferences)
Sets the documentation referencesvoid
setNotice(String notice)
Sets user notice that should be displayed when the signature is verifiedvoid
setPolicyContent(DSSDocument policyContent)
Sets policy document contentvoid
setTransforms(Element transforms)
Sets a 'ds:Tranforms' nodevoid
setTransformsDescription(List<String> transformsDescription)
Sets a list of Strings describing the 'ds:Tranforms' elementvoid
setUrl(String url)
Sets the signature policy urlvoid
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
-
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
String
documentation references
-
setDocumentationReferences
Sets the documentation references- Parameters:
documentationReferences
- a list ofString
documentation references
-
getTransforms
Returns a 'ds:Tranforms' element if found NOTE: XAdES only- Returns:
- 'ds:Tranforms'
Element
if 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
-String
user 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
-